diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2014-02-23 15:14:27 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2014-02-28 12:28:19 +0100 |
| commit | 6914eca167d35b4ffb3e1979bb690b378bb8448a (patch) | |
| tree | 6b635bbccc4a04ed7e1c1db37a52ab27bc8aa692 /Source/Core/VideoCommon | |
| parent | a3508823def6b3a013436e91653ed758aadf27eb (diff) | |
Fix various warnings reported by clang
- mostly remove unused variables
- rename some generic JIT identifiers
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/BPFunctions.cpp | 1 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_x64.cpp | 7 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.cpp | 28 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.h | 9 |
4 files changed, 20 insertions, 25 deletions
diff --git a/Source/Core/VideoCommon/BPFunctions.cpp b/Source/Core/VideoCommon/BPFunctions.cpp index a3bcd3af30..1149392179 100644 --- a/Source/Core/VideoCommon/BPFunctions.cpp +++ b/Source/Core/VideoCommon/BPFunctions.cpp @@ -14,7 +14,6 @@ #include "VideoCommon/VertexShaderManager.h" #include "VideoCommon/VideoConfig.h" -const bool renderFog = false; namespace BPFunctions { // ---------------------------------------------- diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp index d00a9bb454..875ba8f8e2 100644 --- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp @@ -177,13 +177,6 @@ int TexDecoder_GetPaletteSize(int format) } } -static inline u32 decodeIA8(u16 val) -{ - int a = val >> 8; - int i = val & 0xFF; - return (a << 24) | (i << 16) | (i << 8) | i; -} - static inline u32 decode5A3(u16 val) { int r,g,b,a; diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index a9bdb468b8..29abdb227c 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -28,11 +28,6 @@ //BBox #include "VideoCommon/XFMemory.h" -#ifndef _M_GENERIC -#ifndef __APPLE__ -#define USE_JIT -#endif -#endif #define COMPILED_CODE_SIZE 4096 @@ -472,7 +467,6 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) m_compiledCode = NULL; m_numLoadedVertices = 0; m_VertexSize = 0; - m_numPipelineStages = 0; m_NativeFmt = 0; loop_counter = 0; VertexLoader_Normal::Init(); @@ -482,11 +476,12 @@ 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 + #ifdef USE_VERTEX_LOADER_JIT AllocCodeSpace(COMPILED_CODE_SIZE); CompileVertexTranslator(); WriteProtect(); #else + m_numPipelineStages = 0; CompileVertexTranslator(); #endif @@ -494,7 +489,7 @@ VertexLoader::VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr) VertexLoader::~VertexLoader() { - #ifdef USE_JIT + #ifdef USE_VERTEX_LOADER_JIT FreeCodeSpace(); #endif delete m_NativeFmt; @@ -505,7 +500,7 @@ void VertexLoader::CompileVertexTranslator() m_VertexSize = 0; const TVtxAttr &vtx_attr = m_VtxAttr; -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT if (m_compiledCode) PanicAlert("Trying to recompile a vertex translator"); @@ -531,6 +526,9 @@ void VertexLoader::CompileVertexTranslator() WriteSetVariable(32, &s_texmtxwrite, Imm32(0)); WriteSetVariable(32, &s_texmtxread, Imm32(0)); } +#else + // Reset pipeline + m_numPipelineStages = 0; #endif // Colors @@ -544,8 +542,6 @@ void VertexLoader::CompileVertexTranslator() m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const u32)((m_VtxDesc.Hex >> 31) & 3) }; - // Reset pipeline - m_numPipelineStages = 0; u32 components = 0; // Position in pc vertex format. @@ -770,7 +766,7 @@ void VertexLoader::CompileVertexTranslator() native_stride = nat_offset; vtx_decl.stride = native_stride; -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT // End loop here #ifdef _M_X64 MOV(64, R(RAX), Imm64((u64)&loop_counter)); @@ -790,7 +786,7 @@ void VertexLoader::CompileVertexTranslator() void VertexLoader::WriteCall(TPipelineFunction func) { -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT #ifdef _M_X64 MOV(64, R(RAX), Imm64((u64)func)); CALLptr(R(RAX)); @@ -805,7 +801,7 @@ void VertexLoader::WriteCall(TPipelineFunction func) #ifndef _M_GENERIC void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address) { -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT #ifdef _M_X64 MOV(64, R(RAX), Imm64((u64)address)); MOV(bits, dest, MatR(RAX)); @@ -817,7 +813,7 @@ void VertexLoader::WriteGetVariable(int bits, OpArg dest, void *address) void VertexLoader::WriteSetVariable(int bits, void *address, OpArg value) { -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT #ifdef _M_X64 MOV(64, R(RAX), Imm64((u64)address)); MOV(bits, MatR(RAX), value); @@ -870,7 +866,7 @@ void VertexLoader::SetupRunVertices(int vtx_attr_group, int primitive, int const void VertexLoader::ConvertVertices ( int count ) { -#ifdef USE_JIT +#ifdef USE_VERTEX_LOADER_JIT if (count > 0) { loop_counter = count; diff --git a/Source/Core/VideoCommon/VertexLoader.h b/Source/Core/VideoCommon/VertexLoader.h index 6b720b54aa..01c4bb0acd 100644 --- a/Source/Core/VideoCommon/VertexLoader.h +++ b/Source/Core/VideoCommon/VertexLoader.h @@ -17,6 +17,11 @@ #include "VideoCommon/DataReader.h" #include "VideoCommon/NativeVertexFormat.h" +#ifndef _M_GENERIC +#ifndef __APPLE__ +#define USE_VERTEX_LOADER_JIT +#endif +#endif class VertexLoaderUID { @@ -119,9 +124,11 @@ private: NativeVertexFormat *m_NativeFmt; int native_stride; - // Pipeline. To be JIT compiled in the future. +#ifndef USE_VERTEX_LOADER_JIT + // Pipeline. TPipelineFunction m_PipelineStages[64]; // TODO - figure out real max. it's lower. int m_numPipelineStages; +#endif const u8 *m_compiledCode; |
