diff options
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/shader/shader_jit_x64.cpp | 6 |
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!"); |