summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-04 02:54:06 -0400
committerGravatar Lioncash2018-08-04 02:55:03 -0400
commitdde5dce7366e58a35dce308ef81fa9debb038334 (patch)
treee9f2c0afda97c8a9d62be690fcc5a52f9e389482 /src
parentMerge pull request #908 from lioncash/memory (diff)
downloadyuzu-dde5dce7366e58a35dce308ef81fa9debb038334.tar.gz
yuzu-dde5dce7366e58a35dce308ef81fa9debb038334.tar.xz
yuzu-dde5dce7366e58a35dce308ef81fa9debb038334.zip
gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()
Ensures both operands have the same sign in the comparison. While we're at it, we can get rid of the redundant casting of ub_size to an int. This type will always be trivial and alias a built-in type (not doing so would break backwards compatibility at a standard level).
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_manager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_manager.cpp b/src/video_core/renderer_opengl/gl_shader_manager.cpp
index e81fcbbc4..1d88f8cec 100644
--- a/src/video_core/renderer_opengl/gl_shader_manager.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_manager.cpp
@@ -17,9 +17,8 @@ static void SetShaderUniformBlockBinding(GLuint shader, const char* name,
17 if (ub_index != GL_INVALID_INDEX) { 17 if (ub_index != GL_INVALID_INDEX) {
18 GLint ub_size = 0; 18 GLint ub_size = 0;
19 glGetActiveUniformBlockiv(shader, ub_index, GL_UNIFORM_BLOCK_DATA_SIZE, &ub_size); 19 glGetActiveUniformBlockiv(shader, ub_index, GL_UNIFORM_BLOCK_DATA_SIZE, &ub_size);
20 ASSERT_MSG(ub_size == expected_size, 20 ASSERT_MSG(static_cast<size_t>(ub_size) == expected_size,
21 "Uniform block size did not match! Got {}, expected {}", 21 "Uniform block size did not match! Got {}, expected {}", ub_size, expected_size);
22 static_cast<int>(ub_size), expected_size);
23 glUniformBlockBinding(shader, ub_index, static_cast<GLuint>(binding)); 22 glUniformBlockBinding(shader, ub_index, static_cast<GLuint>(binding));
24 } 23 }
25} 24}