aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_rebalance_tree.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Make the tree rebalancer use vector_elements, not components().Kenneth Graunke2014-07-161-2/+2
| | | | | | | | | | | components() includes matrix columns, so if this code encountered a matrix, it would ask for something like a vec9 or vec16. This is clearly not what you want. Earlier code now prevents this from seeing matrices, but we should still use vector_elements, for clarity. Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Guard against error_type in the tree rebalancer.Kenneth Graunke2014-07-161-1/+3
| | | | | | This helped me track down the bug fixed in the previous commit. Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Make the tree rebalancer bail on matrix operands.Kenneth Graunke2014-07-161-1/+3
| | | | | | | | | It doesn't handle things like (vector * matrix) correctly, and apparently Matt's intention was to bail. Fixes shader compilation in Natural Selection 2. Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Update expression types after rebalancing the tree.Matt Turner2014-07-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we saw a tree that looked like vec3 / \ vec3 float / \ vec3 float / \ vec3 float We would see that all of the expression types were vec3, and then rebalance to vec3 / \ vec3 vec3 <-- should be float / \ / \ vec3 float float float This patch adds code to visit the rebalanced tree and update the expression types from the bottom up. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80880 Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Rebalance expression trees that are reduction operations.Matt Turner2014-06-191-0/+300
The intention of this pass was to give us better instruction scheduling opportunities, but it unexpectedly reduced some instruction counts as well: total instructions in shared programs: 1666639 -> 1666073 (-0.03%) instructions in affected programs: 54612 -> 54046 (-1.04%) (and trades 4 SIMD16 programs in SS3)