(*val)++;
}
return 1;
- case GL_ACTIVE_VARIABLES:
+ case GL_ACTIVE_VARIABLES: {
+ unsigned num_values = 0;
for (unsigned i = 0; i < RESOURCE_UBO(res)->NumUniforms; i++) {
const char *iname = RESOURCE_UBO(res)->Uniforms[i].IndexName;
struct gl_program_resource *uni =
continue;
*val++ =
_mesa_program_resource_index(shProg, uni);
+ num_values++;
}
- return RESOURCE_UBO(res)->NumUniforms;
+ return num_values;
+ }
}
} else if (res->Type == GL_SHADER_STORAGE_BLOCK) {
switch (prop) {
(*val)++;
}
return 1;
- case GL_ACTIVE_VARIABLES:
+ case GL_ACTIVE_VARIABLES: {
+ unsigned num_values = 0;
for (unsigned i = 0; i < RESOURCE_UBO(res)->NumUniforms; i++) {
const char *iname = RESOURCE_UBO(res)->Uniforms[i].IndexName;
struct gl_program_resource *uni =
continue;
*val++ =
_mesa_program_resource_index(shProg, uni);
+ num_values++;
}
- return RESOURCE_UBO(res)->NumUniforms;
+ return num_values;
+ }
}
} else if (res->Type == GL_ATOMIC_COUNTER_BUFFER) {
switch (prop) {