diff options
| author | 2016-12-04 13:11:48 +0100 | |
|---|---|---|
| committer | 2016-12-05 21:11:24 +0100 | |
| commit | 4088afe23c8a109d84d97c9d1e7708606a9dfffe (patch) | |
| tree | b0152406e455f930a2ce8cbd0c8a416e2351d811 /src | |
| parent | Print broken shader code to log (diff) | |
| download | yuzu-4088afe23c8a109d84d97c9d1e7708606a9dfffe.tar.gz yuzu-4088afe23c8a109d84d97c9d1e7708606a9dfffe.tar.xz yuzu-4088afe23c8a109d84d97c9d1e7708606a9dfffe.zip | |
Report shader uniform block size in case of mismatch
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 3f2255e06..ba65db419 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -1083,7 +1083,9 @@ void RasterizerOpenGL::SetShader() { | |||
| 1083 | GLint block_size; | 1083 | GLint block_size; |
| 1084 | glGetActiveUniformBlockiv(current_shader->shader.handle, block_index, | 1084 | glGetActiveUniformBlockiv(current_shader->shader.handle, block_index, |
| 1085 | GL_UNIFORM_BLOCK_DATA_SIZE, &block_size); | 1085 | GL_UNIFORM_BLOCK_DATA_SIZE, &block_size); |
| 1086 | ASSERT_MSG(block_size == sizeof(UniformData), "Uniform block size did not match!"); | 1086 | ASSERT_MSG(block_size == sizeof(UniformData), |
| 1087 | "Uniform block size did not match! Got %d, expected %zu", | ||
| 1088 | static_cast<int>(block_size), sizeof(UniformData)); | ||
| 1087 | glUniformBlockBinding(current_shader->shader.handle, block_index, 0); | 1089 | glUniformBlockBinding(current_shader->shader.handle, block_index, 0); |
| 1088 | 1090 | ||
| 1089 | // Update uniforms | 1091 | // Update uniforms |