diff options
author | Timothy Arceri <[email protected]> | 2016-07-11 12:11:42 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-07-19 09:42:00 +1000 |
commit | cd5cbf0f6b69557ef0c6123c11f9732d43490f4f (patch) | |
tree | 712eaf5ff391488e85a1bcfbd0ce819903059c20 /src | |
parent | 198074a41c20300373ec4f906a34da89cad63fbf (diff) |
glsl: use linked shaders rather than compiled shaders
At this point there is no reason not to be using the linked shaders,
using the linked shaders should be faster and will make things simpler
for upcoming shader cache work.
The previous variable name suggests the linked shaders were intended
to be used here anyway.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index d963f540a52..6d45a025da3 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4112,12 +4112,12 @@ calculate_array_size_and_stride(struct gl_shader_program *shProg, } } - for (unsigned i = 0; i < shProg->NumShaders; i++) { - if (shProg->Shaders[i] == NULL) + for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) { + const gl_linked_shader *sh = shProg->_LinkedShaders[i]; + if (sh == NULL) continue; - const gl_shader *stage = shProg->Shaders[i]; - foreach_in_list(ir_instruction, node, stage->ir) { + foreach_in_list(ir_instruction, node, sh->ir) { ir_variable *var = node->as_variable(); if (!var || !var->get_interface_type() || var->data.mode != ir_var_shader_storage) |