mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
glsl: build stageref mask using IR, not symbol table
Instead of using symbol table, build mask by inspecting IR. This
change is required by further patches to move resource list creation
to happen later when symbol table does not exist anymore.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
(cherry picked from commit ccaf37f449)
This commit is contained in:
parent
90f74f1c0e
commit
6b9ea26d7f
1 changed files with 11 additions and 3 deletions
|
|
@ -2617,9 +2617,17 @@ build_stageref(struct gl_shader_program *shProg, const char *name)
|
|||
struct gl_shader *sh = shProg->_LinkedShaders[i];
|
||||
if (!sh)
|
||||
continue;
|
||||
ir_variable *var = sh->symbols->get_variable(name);
|
||||
if (var)
|
||||
stages |= (1 << i);
|
||||
|
||||
/* Shader symbol table may contain variables that have
|
||||
* been optimized away. Search IR for the variable instead.
|
||||
*/
|
||||
foreach_in_list(ir_instruction, node, sh->ir) {
|
||||
ir_variable *var = node->as_variable();
|
||||
if (var && strcmp(var->name, name) == 0) {
|
||||
stages |= (1 << i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return stages;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue