Explorar el Código

Report shader uniform block size in case of mismatch

Jannik Vogel hace 9 años
padre
commit
4088afe23c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/video_core/renderer_opengl/gl_rasterizer.cpp

+ 3 - 1
src/video_core/renderer_opengl/gl_rasterizer.cpp

@@ -1083,7 +1083,9 @@ void RasterizerOpenGL::SetShader() {
         GLint block_size;
         glGetActiveUniformBlockiv(current_shader->shader.handle, block_index,
                                   GL_UNIFORM_BLOCK_DATA_SIZE, &block_size);
-        ASSERT_MSG(block_size == sizeof(UniformData), "Uniform block size did not match!");
+        ASSERT_MSG(block_size == sizeof(UniformData),
+                   "Uniform block size did not match! Got %d, expected %zu",
+                   static_cast<int>(block_size), sizeof(UniformData));
         glUniformBlockBinding(current_shader->shader.handle, block_index, 0);
 
         // Update uniforms