aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_copy_propagation_elements.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl/opt_cpe: Fix a crash when a kill kills for two reasons.Eric Anholt2011-04-131-1/+3
| | | | | | | Fixes glsl-copy-propagation-loop-2 when this optimization pass is re-enabled. Reported-by: David Lamparter <[email protected]>
* glsl/opt_cpe: Kill when the assignment isn't something we recognize.Eric Anholt2011-04-131-2/+9
| | | | | | | | | A few GLES2 tests tripped over this when using array dereferences to hit channels on the LHS (see piglit test glsl-copy-propagation-vector-indexing). We wouldn't find the ir_dereference_variable, and assume that that meant that it wasn't an assignment to a scalar/vector, and thus not notice that the variable had been changed.
* glsl: Remove extra checks for constant true assignment conditions.Eric Anholt2011-02-041-5/+2
| | | | These are already stripped by opt_constant_folding.cpp.
* glsl: Add a new opt_copy_propagation variant that does it channel-wise.Eric Anholt2011-02-041-0/+461
This patch cleans up many of the extra copies in GLSL IR introduced by i965's scalarizing passes. It doesn't result in a statistically significant performance difference on nexuiz high settings (n=3) or my demo (n=10), due to brw_fs.cpp's register coalescing covering most of those extra moves anyway. However, it does make the debug of wine's GLSL shaders much more tractable, and reduces instruction count of glsl-fs-convolution-2 from 376 to 288.