summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_cse.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Move the CSE equality functions to the ir class.Eric Anholt2013-11-151-179/+1
| | | | | | | | I want to reuse them in opt_algebraic. v2: Merge in Chris Forbes's break fix. Reviewed-by: Jordan Justen <[email protected]>
* glsl: fix missing breaks in equals(ir_texture,..)Chris Forbes2013-11-101-0/+2
| | | | | | Signed-off-by: Chris Forbes <[email protected]> Cc: "10.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add a CSE pass.Eric Anholt2013-11-011-0/+599
This only operates on constant/uniform values for now, because otherwise I'd have to deal with killing my available CSE entries when assignments happen, and getting even this working in the tree ir was painful enough. As is, it has the following effect in shader-db: total instructions in shared programs: 1524077 -> 1521964 (-0.14%) instructions in affected programs: 50629 -> 48516 (-4.17%) GAINED: 0 LOST: 0 And, for tropics, that accounts for most of the effect, the FPS improvement is 11.67% +/- 0.72% (n=3). v2: Use read_only field of the variable, manually check the lod_info union members, use get_num_operands(), rename cse_operands_visitor to is_cse_candidate_visitor, move all is-a-candidate logic to that function, and call it before checking for CSE on a given rvalue, more comments, use private keyword. Reviewed-by: Paul Berry <[email protected]>