summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/shaderapi.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 569e0acc1ec..05b20590369 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2436,6 +2436,7 @@ struct gl_shader
* Subroutine uniform remap table
* based on the program level uniform remap table.
*/
+ GLuint NumSubroutineUniforms; /* non-sparse total */
GLuint NumSubroutineUniformRemapTable;
struct gl_uniform_storage **SubroutineUniformRemapTable;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 47666d83ded..79097679e90 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2368,7 +2368,7 @@ _mesa_GetActiveSubroutineUniformiv(GLuint program, GLenum shadertype,
return;
}
- if (index >= sh->NumSubroutineUniformTypes) {
+ if (index >= sh->NumSubroutineUniforms) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s: invalid index greater than GL_ACTIVE_SUBROUTINE_UNIFORMS", api_name);
return;
}
@@ -2672,7 +2672,7 @@ _mesa_GetProgramStageiv(GLuint program, GLenum shadertype,
values[0] = sh->NumSubroutineUniformRemapTable;
break;
case GL_ACTIVE_SUBROUTINE_UNIFORMS:
- values[0] = sh->NumSubroutineUniformTypes;
+ values[0] = sh->NumSubroutineUniforms;
break;
case GL_ACTIVE_SUBROUTINE_MAX_LENGTH:
{