summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_symbol_table.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-06-20 16:48:02 -0700
committerKenneth Graunke <[email protected]>2016-06-23 11:58:50 -0700
commitacf544404472488eec85fff249cbface7fa477b1 (patch)
tree14e9f1e2325cc466bba1c0338108eb583f31504d /src/compiler/glsl/glsl_symbol_table.cpp
parent3487d2e7bfc3625eee8bf87cee28cf2950e314cc (diff)
glsl: Make constant propagation's folder not propagate into an LHS.
opt_constant_propagation.cpp contains constant folding code which can actually do constant propagation in some cases. It was happily propagating constants into the left-hand-side of assignments. For example, (assign () (var_ref temp) (constant ...)) would brilliantly be turned into: (assign () (constant ...) (constant ....)) This is a bigger hammer than necessary - it prevents propagation into the left-hand-side altogether. We could certainly do better someday. Notably, the constant propagation pass itself already takes this approach - it's just the constant propagation pass's built-in constant folding code (which actually propagates, too) that was broken. No change in shader-db, but prevents regressions after future commits. It seems plausible that this could be hit today, but I haven't seen it happen. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_symbol_table.cpp')
0 files changed, 0 insertions, 0 deletions