diff options
author | Dave Airlie <airlied@redhat.com> | 2016-05-17 14:22:57 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-05-23 16:19:57 +1000 |
commit | 7fa0250f9446ec57caab581b8cac2c011c1cb497 (patch) | |
tree | a7f28af88db8317e1976ac53d23d37d4cecd10ac /src/mesa/main/shaderapi.c | |
parent | 22db9b10ebd46c777a87da890f5089ad24686441 (diff) | |
download | external_mesa3d-7fa0250f9446ec57caab581b8cac2c011c1cb497.zip external_mesa3d-7fa0250f9446ec57caab581b8cac2c011c1cb497.tar.gz external_mesa3d-7fa0250f9446ec57caab581b8cac2c011c1cb497.tar.bz2 |
mesa/subroutines: count number subroutines properly.
The code was implementing the ACTIVE_SUBROUTINE_UNIFORMS
incorrectly, using the number of types not the number of
uniforms. This is different than the locations as the
locations may be sparsly allocated.
This fixes:
GL43-CTS.shader_subroutine.four_subroutines_with_two_uniforms
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 47666d8..7909767 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: { |