mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-30 21:34:18 +01:00
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).
This commit is contained in:
parent
40e63ede6d
commit
dde5dce736
@ -17,9 +17,8 @@ static void SetShaderUniformBlockBinding(GLuint shader, const char* name,
|
|||||||
if (ub_index != GL_INVALID_INDEX) {
|
if (ub_index != GL_INVALID_INDEX) {
|
||||||
GLint ub_size = 0;
|
GLint ub_size = 0;
|
||||||
glGetActiveUniformBlockiv(shader, ub_index, GL_UNIFORM_BLOCK_DATA_SIZE, &ub_size);
|
glGetActiveUniformBlockiv(shader, ub_index, GL_UNIFORM_BLOCK_DATA_SIZE, &ub_size);
|
||||||
ASSERT_MSG(ub_size == expected_size,
|
ASSERT_MSG(static_cast<size_t>(ub_size) == expected_size,
|
||||||
"Uniform block size did not match! Got {}, expected {}",
|
"Uniform block size did not match! Got {}, expected {}", ub_size, expected_size);
|
||||||
static_cast<int>(ub_size), expected_size);
|
|
||||||
glUniformBlockBinding(shader, ub_index, static_cast<GLuint>(binding));
|
glUniformBlockBinding(shader, ub_index, static_cast<GLuint>(binding));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user