diff options
author | Timothy Arceri <[email protected]> | 2016-12-29 08:56:43 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-30 10:57:16 +1100 |
commit | 41dd6c35396434be53581b59c4b477dd95e8b774 (patch) | |
tree | 2138552dfb7787641b3318ad907ce3b4784baaef /src/mesa/main/shader_query.cpp | |
parent | 0de6f6223ab917ec532e3fe3afd14f8f5cd3b87b (diff) |
mesa/glsl: move subroutine metadata to gl_program
This will allow us to store gl_program rather than gl_shader_program
as the current program perstage which allows us to simplify code
that makes use of the CurrentProgram list.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 1d1616b7eaa..2f157733a48 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -1248,7 +1248,7 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg, return 1; case GL_COMPATIBLE_SUBROUTINES: { const struct gl_uniform_storage *uni; - struct gl_linked_shader *sh; + struct gl_program *p; unsigned count, i; int j; @@ -1261,10 +1261,10 @@ _mesa_program_resource_prop(struct gl_shader_program *shProg, goto invalid_operation; uni = RESOURCE_UNI(res); - sh = shProg->_LinkedShaders[_mesa_shader_stage_from_subroutine_uniform(res->Type)]; + p = shProg->_LinkedShaders[_mesa_shader_stage_from_subroutine_uniform(res->Type)]->Program; count = 0; - for (i = 0; i < sh->NumSubroutineFunctions; i++) { - struct gl_subroutine_function *fn = &sh->SubroutineFunctions[i]; + for (i = 0; i < p->sh.NumSubroutineFunctions; i++) { + struct gl_subroutine_function *fn = &p->sh.SubroutineFunctions[i]; for (j = 0; j < fn->num_compat_types; j++) { if (fn->types[j] == uni->type) { val[count++] = i; |