diff options
author | Lioncash <mathew1800@gmail.com> | 2018-12-11 05:47:17 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-12-11 05:47:20 +0100 |
commit | 4c2b94559b886f6d06590a25ce505e7f99cece81 (patch) | |
tree | 6345e9db98bb5351edbfc3814976ead43d506ecb /src/video_core/renderer_opengl/gl_shader_cache.cpp | |
parent | gl_shader_cache: Resolve truncation compiler warning (diff) | |
download | yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar.gz yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar.bz2 yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar.lz yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar.xz yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.tar.zst yuzu-4c2b94559b886f6d06590a25ce505e7f99cece81.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index d6680489b..aea6bf1af 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -153,7 +153,7 @@ static bool IsSchedInstruction(std::size_t offset, std::size_t main_offset) { } static std::size_t CalculateProgramSize(const GLShader::ProgramCode& program) { - const std::size_t start_offset = 10; + constexpr std::size_t start_offset = 10; std::size_t offset = start_offset; std::size_t size = start_offset * sizeof(u64); while (offset < program.size()) { @@ -163,7 +163,7 @@ static std::size_t CalculateProgramSize(const GLShader::ProgramCode& program) { break; } } - size += 8; + size += sizeof(inst); offset++; } return size; |