i965/fs: Use the LRP instruction for ir_triop_lrp when possible.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 2 Dec 2012 08:08:15 +0000 (00:08 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 28 Feb 2013 21:19:00 +0000 (13:19 -0800)
commit0a1d145e5f1e6120e70e9b46e069167a0d653579
tree30e57f6ef19800b87e8ad0fd859eec726fd97a69
parent015a48743dfcf138cce5752098e01a6cfd6efefe
i965/fs: Use the LRP instruction for ir_triop_lrp when possible.

v2 [mattst88]:
   - Add BRW_OPCODE_LRP to list of CSE-able expressions.
   - Fix op_var[] array size.
   - Rename arguments to emit_lrp to (x, y, a) to clear confusion.
   - Add LRP function to brw_fs.cpp/.h.
   - Corrected comment about LRP instruction arguments in emit_lrp.
v3 [mattst88]:
   - Duplicate MAD code for LRP instead of using a function pointer.
   - Check for != GRF instead of == IMM in emit_lrp.
   - Lower LRP on gen < 6.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
1
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
src/mesa/drivers/dri/i965/brw_fs_cse.cpp
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp