aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/shaderapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index edc23bcefe3..00c51e2bd3d 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -729,7 +729,11 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
if (!has_ubo)
break;
- *params = shProg->NumUniformBlocks;
+ *params = 0;
+ for (unsigned i = 0; i < shProg->NumUniformBlocks; i++) {
+ if (!shProg->UniformBlocks[i].IsShaderStorage)
+ (*params)++;
+ }
return;
case GL_PROGRAM_BINARY_RETRIEVABLE_HINT:
/* This enum isn't part of the OES extension for OpenGL ES 2.0. It is