glsl: Add a pass to lower bitfield-insert into bfm+bfi.
authorMatt Turner <mattst88@gmail.com>
Wed, 10 Apr 2013 05:43:05 +0000 (22:43 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 6 May 2013 17:17:13 +0000 (10:17 -0700)
commitdafd050883660a42b2902388826cfecbfc9b8b83
treeea6bba7a3f32ffab590953297a141c97148d1365
parent9c04b8c28c3a8b60e896492fd1bccc923916c1c4
glsl: Add a pass to lower bitfield-insert into bfm+bfi.

i965/Gen7+ and Radeon/Evergreen+ have bfm/bfi instructions to implement
bitfieldInsert() from ARB_gpu_shader5.

v2: Add ir_binop_bfm and ir_triop_bfi to st_glsl_to_tgsi.cpp.
    Remove spurious temporary assignment and dereference.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_optimization.h
src/glsl/ir_validate.cpp
src/glsl/lower_instructions.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp