Merge branch 'master' into vertex-loader-cleanup

Conflicts:
	Source/Core/Common/Src/CommonFuncs.h
	Source/Core/VideoCommon/Src/VertexLoader.cpp
This commit is contained in:
Jordan Woyak
2013-03-04 15:38:43 -06:00
289 changed files with 11758 additions and 2519 deletions

View File

@ -23,7 +23,7 @@
#include "MemoryUtil.h"
#include "StringUtil.h"
#include "x64Emitter.h"
#include "ABI.h"
#include "x64ABI.h"
#include "PixelEngine.h"
#include "Host.h"
@ -43,8 +43,9 @@
//BBox
#include "XFMemory.h"
extern float GC_ALIGNED16(g_fProjectionMatrix[16]);
#ifndef _M_GENERIC
#define USE_JIT
#endif
#define COMPILED_CODE_SIZE 4096
@ -86,8 +87,9 @@ static const float fractionTable[32] = {
1.0f / (1U << 24), 1.0f / (1U << 25), 1.0f / (1U << 26), 1.0f / (1U << 27),
1.0f / (1U << 28), 1.0f / (1U << 29), 1.0f / (1U << 30), 1.0f / (1U << 31),
};
#ifdef USE_JIT
using namespace Gen;
#endif
void LOADERDECL PosMtx_ReadDirect_UByte()
{
@ -199,14 +201,19 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr)
m_VtxDesc = vtx_desc;
SetVAT(vtx_attr.g0.Hex, vtx_attr.g1.Hex, vtx_attr.g2.Hex);
#ifdef USE_JIT
AllocCodeSpace(COMPILED_CODE_SIZE);
CompileVertexTranslator();
WriteProtect();
#endif
}
VertexLoader::~VertexLoader()
{
#ifdef USE_JIT
FreeCodeSpace();
#endif
delete m_NativeFmt;
}
@ -492,7 +499,8 @@ void VertexLoader::WriteCall(TPipelineFunction func)
m_PipelineStages[m_numPipelineStages++] = func;
#endif
}
// ARMTODO: This should be done in a better way
#ifndef _M_GENERIC
void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address)
{
#ifdef USE_JIT
@ -516,6 +524,7 @@ void VertexLoader::WriteSetVariable(int bits, void *address, OpArg value)
#endif
#endif
}
#endif
int VertexLoader::SetupRunVertices(int vtx_attr_group, int primitive, int const count)
{