History log of /external/mesa3d/src/glsl/lower_instructions.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1853f467c6c0a6e7636b40fe99e1195c43b847aa 02-Jul-2012 Brian Paul <brianp@vmware.com> glsl: fix unop/binop errors in comments
/external/mesa3d/src/glsl/lower_instructions.cpp
478034f34a59969103237eb78bc82f9e70fe81c2 28-Aug-2011 Bryan Cain <bryancain3@gmail.com> glsl: Use a separate div_to_mul_rcp lowering flag for integers.

Using multiply and reciprocal for integer division involves potentially
lossy floating point conversions. This is okay for older GPUs that
represent integers as floating point, but undesirable for GPUs with
native integer division instructions.

TGSI, for example, has UDIV/IDIV instructions for integer division,
so it makes sense to handle this directly. Likewise for i965.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Bryan Cain <bryancain3@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/lower_instructions.cpp
af501e2b29c7fb161671dc5b3395eee1d1b16d3f 12-Aug-2011 Paul Berry <stereotype441@gmail.com> glsl: Fix type error when lowering integer divisions

This patch fixes a bug when lowering an integer division:

x/y

to a multiplication by a reciprocal:

int(float(x)*reciprocal(float(y)))

If x was a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to be float, when in fact
it should be vecN. This caused mesa to abort with an IR validation
error.

Fixes piglit tests {fs,vs}-op-div-int-ivec{2,3,4}.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/lower_instructions.cpp
578f6a9534ec6ea1ffc6638b98f0b5570a85a19d 15-Jun-2011 Kenneth Graunke <kenneth@whitecape.org> glsl: Don't use MOD_TO_FRACT lowering on GLSL 1.30's % operator.

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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glsl/lower_instructions.cpp
ed92b912120394f3b19958effaa819d29bc6d059 15-Jun-2011 Kenneth Graunke <kenneth@whitecape.org> glsl: Fix DIV_TO_MUL_RCP lowering for uint result types.

f2i results in an int/ivec; we need i2u to get a uint/uvec.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glsl/lower_instructions.cpp
c4285be9a5bd1adaa89050989374b95a9a601cdc 25-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Lower ir_binop_pow to a sequence of EXP2 and LOG2
/external/mesa3d/src/glsl/lower_instructions.cpp
da61afa7388f1ce50ef612b89aba2302a052a3bb 24-Nov-2010 Ian Romanick <ian.d.romanick@intel.com> glsl: Use M_LOG2E constant instead of calling log2
/external/mesa3d/src/glsl/lower_instructions.cpp
63684a9ae7a66f68df1f2c68cd9358e5622122a3 19-Nov-2010 Kenneth Graunke <kenneth@whitecape.org> glsl: Combine many instruction lowering passes into one.

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 <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/lower_instructions.cpp