glsl: use bitfield_insert instead of and + shift + or for packing
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 21 Aug 2015 00:52:32 +0000 (20:52 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 28 Aug 2015 22:28:04 +0000 (18:28 -0400)
commit889a946a455c54a5a9bca144b2ea2fe66be39274
tree4eddb51b9a62abb5be1217166f04d3c0f3cc8418
parentc676c432f30158190c260e7f3731ee6667ad4103
glsl: use bitfield_insert instead of and + shift + or for packing

It is fairly tricky to detect the proper conditions for using bitfield
insert, but easy to just use it up front. This removes a lot of
instructions on nvc0 when invoking the packing builtins.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ir_optimization.h
src/glsl/lower_packing_builtins.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp