summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexLoader.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-03-04 15:38:43 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-03-04 15:47:56 -0600
commitf3f89e1d00171ac476fc06e605518747c50ab407 (patch)
tree1c1fd0bed94887cd03e70d3f8477d2892a5ff044 /Source/Core/VideoCommon/Src/VertexLoader.cpp
parentbf58c70e9b5a16c56113fe5114a845f8000d4a9d (diff)
parent0041ec618c46ea2bf99fb1fc068e7c4a263cb4c2 (diff)
Merge branch 'master' into vertex-loader-cleanup
Conflicts: Source/Core/Common/Src/CommonFuncs.h Source/Core/VideoCommon/Src/VertexLoader.cpp
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexLoader.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexLoader.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexLoader.cpp b/Source/Core/VideoCommon/Src/VertexLoader.cpp
index bbee1c0411..6c85324ba8 100644
--- a/Source/Core/VideoCommon/Src/VertexLoader.cpp
+++ b/Source/Core/VideoCommon/Src/VertexLoader.cpp
@@ -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)
{