glsl: provide the option of using BFE for unpack builting lowering
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 21 Aug 2015 01:55:52 +0000 (21:55 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 28 Aug 2015 22:28:04 +0000 (18:28 -0400)
commit275c5810ca7e38560b2a77281e7a0498c50126f8
tree9096495089118805d0e4d042b7186b91f17f2842
parent889a946a455c54a5a9bca144b2ea2fe66be39274
glsl: provide the option of using BFE for unpack builting lowering

This greatly improves generated code, especially for the snorm variants,
since it is able to get rid of the lshift/rshift for sext, as well as
replacing each shift + mask with a single op.

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