summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-24 18:19:39 +0200
committerLioncash <mathew1800@gmail.com>2018-07-24 18:24:49 +0200
commit0162f8b3a74498f9ecf974594266239744d3187c (patch)
treed3933d4d377204cba80166ac53e074fcc6e851e2 /src
parentgl_rasterizer: Use std::string_view instead of std::string when checking for extensions (diff)
downloadyuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar.gz
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar.bz2
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar.lz
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar.xz
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.tar.zst
yuzu-0162f8b3a74498f9ecf974594266239744d3187c.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index f45fbbcd4..a1c47bae9 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -689,10 +689,12 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr
glBindBuffer(GL_UNIFORM_BUFFER, 0);
// Now configure the bindpoint of the buffer inside the shader
- std::string buffer_name = used_buffer.GetName();
- GLuint index = glGetProgramResourceIndex(program, GL_UNIFORM_BLOCK, buffer_name.c_str());
- if (index != -1)
+ const std::string buffer_name = used_buffer.GetName();
+ const GLuint index =
+ glGetProgramResourceIndex(program, GL_UNIFORM_BLOCK, buffer_name.c_str());
+ if (index != GL_INVALID_INDEX) {
glUniformBlockBinding(program, index, buffer_draw_state.bindpoint);
+ }
}
state.Apply();