summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-04-13 05:29:25 +0200
committerbunnei <bunneidev@gmail.com>2016-04-14 05:04:52 +0200
commit847fb951e29bb9bfb2735cf6bb1186e0374f3654 (patch)
treec39b3db1af2bc11d39478b6a54a37d578648b3e0 /src
parentshader_jit_x64: Use a sorted vector instead of a set for keeping track of return addresses. (diff)
downloadyuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar.gz
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar.bz2
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar.lz
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar.xz
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.tar.zst
yuzu-847fb951e29bb9bfb2735cf6bb1186e0374f3654.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/shader_jit_x64.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp
index e32a4e720..773542283 100644
--- a/src/video_core/shader/shader_jit_x64.cpp
+++ b/src/video_core/shader/shader_jit_x64.cpp
@@ -845,6 +845,12 @@ void JitCompiler::Compile() {
SetJumpTarget(branch.first, code_ptr[branch.second]);
}
+ // Free memory that's no longer needed
+ return_offsets.clear();
+ return_offsets.shrink_to_fit();
+ fixup_branches.clear();
+ fixup_branches.shrink_to_fit();
+
uintptr_t size = reinterpret_cast<uintptr_t>(GetCodePtr()) - reinterpret_cast<uintptr_t>(program);
ASSERT_MSG(size <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!");