mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
glsl2: Don't consider uniform initializers as constant expressions.
We were happily optimizing away the body of glsl-uniform-initializer-* to never use the uniforms.
This commit is contained in:
parent
b10bb527ea
commit
5704ed27dd
1 changed files with 6 additions and 0 deletions
|
|
@ -674,6 +674,12 @@ ir_dereference_variable::constant_expression_value()
|
|||
if (!var)
|
||||
return NULL;
|
||||
|
||||
/* The constant_value of a uniform variable is its initializer,
|
||||
* not the lifetime constant value of the uniform.
|
||||
*/
|
||||
if (var->mode == ir_var_uniform)
|
||||
return NULL;
|
||||
|
||||
return var->constant_value ? var->constant_value->clone(NULL) : NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue