_mesa_GetActiveSubroutineUniformiv needs to check
against the number of types here.
Noticed while playing with ogl conform.
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
return;
}
+ if (index >= sh->NumSubroutineUniformTypes) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s: invalid index greater than GL_ACTIVE_SUBROUTINE_UNIFORMS", api_name);
+ return;
+ }
+
switch (pname) {
case GL_NUM_COMPATIBLE_SUBROUTINES: {
res = _mesa_program_resource_find_index(shProg, resource_type, index);