summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-10-16 11:16:46 +0200
committerIago Toral Quiroga <[email protected]>2015-10-19 08:20:40 +0200
commitfba582efc7d66140b5c18ada4d5cd93c9c1e5967 (patch)
treef55dfa83cf3decb98dc206ed452979f7fb2eafe0 /src/mesa/main
parent86ccb2a16f6d21be29cd99d38831eab6079ce107 (diff)
main: Use NumUniformBlocks to count UBOs
Now that we have separate index spaces for UBOs and SSBOs we do not need to iterate through BufferInterfaceBlocks any more, we can just take the UBO count directly from NumUniformBlocks. Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderapi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 6a2f60db77e..26995add386 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -729,11 +729,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
if (!has_ubo)
break;
- *params = 0;
- for (unsigned i = 0; i < shProg->NumBufferInterfaceBlocks; i++) {
- if (!shProg->BufferInterfaceBlocks[i].IsShaderStorage)
- (*params)++;
- }
+ *params = shProg->NumUniformBlocks;
return;
case GL_PROGRAM_BINARY_RETRIEVABLE_HINT:
/* This enum isn't part of the OES extension for OpenGL ES 2.0. It is