summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-10 23:44:16 -0500
committerGravatar Lioncash2018-12-10 23:44:18 -0500
commit861bfdbf5def6a468017b66cd091661c0fc84202 (patch)
tree1db7a71e818087191ee13d031b0352872ff220cc
parentMerge pull request #1846 from lioncash/dir (diff)
downloadyuzu-861bfdbf5def6a468017b66cd091661c0fc84202.tar.gz
yuzu-861bfdbf5def6a468017b66cd091661c0fc84202.tar.xz
yuzu-861bfdbf5def6a468017b66cd091661c0fc84202.zip
gl_shader_cache: Resolve truncation compiler warning
The previous code would cause a warning, as it was truncating size_t (64-bit) to a u32 (32-bit) implicitly.
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index a4265f498..d6680489b 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -145,7 +145,7 @@ GLuint CachedShader::LazyGeometryProgram(OGLProgram& target_program,
145 return target_program.handle; 145 return target_program.handle;
146}; 146};
147 147
148static bool IsSchedInstruction(u32 offset, u32 main_offset) { 148static bool IsSchedInstruction(std::size_t offset, std::size_t main_offset) {
149 // sched instructions appear once every 4 instructions. 149 // sched instructions appear once every 4 instructions.
150 static constexpr std::size_t SchedPeriod = 4; 150 static constexpr std::size_t SchedPeriod = 4;
151 const std::size_t absolute_offset = offset - main_offset; 151 const std::size_t absolute_offset = offset - main_offset;