glsl: Don't dead-code eliminate a uniform initializer.
Partial fix for glsl-uniform-initializer-5.
This commit is contained in:
parent
37f0654fa5
commit
7de4d8fe11
1 changed files with 8 additions and 0 deletions
|
|
@ -92,6 +92,14 @@ do_dead_code(exec_list *instructions)
|
|||
/* If there are no assignments or references to the variable left,
|
||||
* then we can remove its declaration.
|
||||
*/
|
||||
|
||||
/* uniform initializers are precious, and could get used by another
|
||||
* stage.
|
||||
*/
|
||||
if (entry->var->mode == ir_var_uniform &&
|
||||
entry->var->constant_value)
|
||||
continue;
|
||||
|
||||
entry->var->remove();
|
||||
progress = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue