From 861bfdbf5def6a468017b66cd091661c0fc84202 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 10 Dec 2018 23:44:16 -0500 Subject: [PATCH] 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. --- src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index a4265f4986..d6680489b6 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, return target_program.handle; }; -static bool IsSchedInstruction(u32 offset, u32 main_offset) { +static bool IsSchedInstruction(std::size_t offset, std::size_t main_offset) { // sched instructions appear once every 4 instructions. static constexpr std::size_t SchedPeriod = 4; const std::size_t absolute_offset = offset - main_offset;