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 <krh@bitplanet.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Iago Toral Quiroga
2015-10-16 11:16:46 +02:00
parent 86ccb2a16f
commit fba582efc7
+1 -5
View File
@@ -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