mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
glsl: Use constant_initializer instead of constant_value to determine whether to keep an unused uniform
This even matches the comment "uniform initializers are precious, and
could get used by another stage."
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5bc68f0f2b)
This commit is contained in:
parent
8e9b698c24
commit
0c6b210749
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
|
|||
*/
|
||||
if (entry->var->data.mode == ir_var_uniform ||
|
||||
entry->var->data.mode == ir_var_shader_storage) {
|
||||
if (uniform_locations_assigned || entry->var->constant_value)
|
||||
if (uniform_locations_assigned || entry->var->constant_initializer)
|
||||
continue;
|
||||
|
||||
/* Section 2.11.6 (Uniform Variables) of the OpenGL ES 3.0.3 spec
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue