From 72eed1aa821ead18b2d8738b085012acd2911d9c Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 3 Jul 2015 13:01:46 +0200 Subject: [PATCH 1/3] JitCache: drop unused method --- Source/Core/Core/PowerPC/JitCommon/JitCache.cpp | 12 ------------ Source/Core/Core/PowerPC/JitCommon/JitCache.h | 1 - 2 files changed, 13 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 840dd672c5..31cf7ec3be 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -95,18 +95,6 @@ using namespace Gen; return num_blocks; } - bool JitBaseBlockCache::RangeIntersect(int s1, int e1, int s2, int e2) const - { - // check if any endpoint is inside the other range - if ((s1 >= s2 && s1 <= e2) || - (e1 >= s2 && e1 <= e2) || - (s2 >= s1 && s2 <= e1) || - (e2 >= s1 && e2 <= e1)) - return true; - else - return false; - } - int JitBaseBlockCache::AllocateBlock(u32 em_address) { JitBlock &b = blocks[num_blocks]; diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h index af0580ac85..b5a2a27a99 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h @@ -112,7 +112,6 @@ class JitBaseBlockCache bool m_initialized; - bool RangeIntersect(int s1, int e1, int s2, int e2) const; void LinkBlockExits(int i); void LinkBlock(int i); void UnlinkBlock(int i); From 405554e327f398527d14e8a7bb61f1c6df53510a Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Fri, 3 Jul 2015 13:05:37 +0200 Subject: [PATCH 2/3] Jit64: remove unnecessary indirection --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 0cfcc614af..08806d3e89 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -318,7 +318,7 @@ bool Jit64::Cleanup() if (MMCR0.Hex || MMCR1.Hex) { ABI_PushRegistersAndAdjustStack({}, 0); - ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, jit->js.numLoadStoreInst, jit->js.numFloatingPointInst); + ABI_CallFunctionCCC((void *)&PowerPC::UpdatePerformanceMonitor, js.downcountAmount, js.numLoadStoreInst, js.numFloatingPointInst); ABI_PopRegistersAndAdjustStack({}, 0); did_something = true; } @@ -562,8 +562,8 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc js.blockStart = em_address; js.fifoBytesThisBlock = 0; js.curBlock = b; - jit->js.numLoadStoreInst = 0; - jit->js.numFloatingPointInst = 0; + js.numLoadStoreInst = 0; + js.numFloatingPointInst = 0; PPCAnalyst::CodeOp *ops = code_buf->codebuffer; @@ -675,7 +675,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc } // Gather pipe writes using a non-immediate address are discovered by profiling. - bool gatherPipeIntCheck = jit->js.fifoWriteAddresses.find(ops[i].address) != jit->js.fifoWriteAddresses.end(); + bool gatherPipeIntCheck = js.fifoWriteAddresses.find(ops[i].address) != js.fifoWriteAddresses.end(); // Gather pipe writes using an immediate address are explicitly tracked. if (jo.optimizeGatherPipe && js.fifoBytesThisBlock >= 32) @@ -849,10 +849,10 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc fpr.StoreFromRegister(j); if (opinfo->flags & FL_LOADSTORE) - ++jit->js.numLoadStoreInst; + ++js.numLoadStoreInst; if (opinfo->flags & FL_USE_FPU) - ++jit->js.numFloatingPointInst; + ++js.numFloatingPointInst; } #if defined(_DEBUG) || defined(DEBUGFAST) From a8c8f52f20d388a37fa245fbb0a42ae99dcc864e Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sat, 5 Sep 2015 10:55:36 +0200 Subject: [PATCH 3/3] OGL: remove unused variable --- Source/Core/VideoBackends/OGL/PostProcessing.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/PostProcessing.cpp b/Source/Core/VideoBackends/OGL/PostProcessing.cpp index 4bb52a652d..64eee7a0db 100644 --- a/Source/Core/VideoBackends/OGL/PostProcessing.cpp +++ b/Source/Core/VideoBackends/OGL/PostProcessing.cpp @@ -19,15 +19,6 @@ namespace OGL { -static const char s_vertex_workaround_shader[] = - "in vec4 rawpos;\n" - "out vec2 uv0;\n" - "uniform vec4 src_rect;\n" - "void main(void) {\n" - " gl_Position = vec4(rawpos.xy, 0.0, 1.0);\n" - " uv0 = rawpos.zw * src_rect.zw + src_rect.xy;\n" - "}\n"; - static const char s_vertex_shader[] = "out vec2 uv0;\n" "uniform vec4 src_rect;\n"