summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_optimization.h
Commit message (Collapse)AuthorAgeFilesLines
* glsl2: Add a pass for converting if statements to conditional assignment.Eric Anholt2010-07-191-0/+1
| | | | This will be used on 915 and similar hardware of that generation.
* glsl2: Add a new pass at the IR level to break down matrix ops to vector ops.Eric Anholt2010-07-121-0/+1
| | | | | | | This will be used by the Mesa IR and likely most HW backends, as it allows other optimizations to occur that might not otherwise. Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.
* glsl2: Add a pass to simplify if statements returning from both sides.Eric Anholt2010-07-071-0/+1
| | | | | | | | | | | | | | | This allows function inlining making the following tests work even without function calls implemented: glsl-fs-functions-2 glsl-fs-functions-3 glsl-vs-functions glsl-vs-functions-2 glsl-vs-functions-3 glsl-vs-vec4-indexing-5 (Note that those tests were designed to trigger actual function calls, and this defeats them. However, those testcases ended up catching the bug in the previous commit.)
* glsl2: Add pass for supporting variable vector indexing in rvalues.Eric Anholt2010-07-061-0/+1
| | | | | | | The Mesa IR needs this to support vector indexing correctly, and hardware backends such as 915 would want this behavior as well. Fixes glsl-vs-vec4-indexing-2.
* glsl2: Add a pass to break ir_binop_div to _mul and _rcp.Eric Anholt2010-07-021-0/+1
| | | | This results in constant folding of a constant divisor.
* glsl2: Add a pass to convert mod(a, b) to b * fract(a/b).Eric Anholt2010-07-011-0/+1
| | | | This is used by the Mesa IR backend to implement mod, fixing glsl-fs-mod.
* glsl2: Use the parser state as the talloc context for dead code elimination.Eric Anholt2010-06-251-2/+4
| | | | This cuts runtime by around 20% from talloc_parent() lookups.
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+41