summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Don't use MOD_TO_FRACT lowering on GLSL 1.30's % operator.Kenneth Graunke2011-06-291-1/+1
| | | | | | | | | | | | | MOD_TO_FRACT was designed to lower the GLSL 1.20 mod() function, which operates on floating point values. However, we also use ir_binop_mod for GLSL 1.30's % operator, which operates on integers. For now, make MOD_TO_FRACT only apply to floating-point mod operations. In the future, we may want to add a lowering pass for integer-based mod. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Fix DIV_TO_MUL_RCP lowering for uint result types.Kenneth Graunke2011-06-291-2/+7
| | | | | | | | f2i results in an int/ivec; we need i2u to get a uint/uvec. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2Ian Romanick2010-12-011-0/+26
|
* glsl: Use M_LOG2E constant instead of calling log2Ian Romanick2010-12-011-3/+3
|
* glsl: Combine many instruction lowering passes into one.Kenneth Graunke2010-11-191-0/+262
This should save on the overhead of tree-walking and provide a convenient place to add more instruction lowering in the future. Signed-off-by: Ian Romanick <[email protected]>