summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-08-20 21:55:52 -0400
committerIlia Mirkin <[email protected]>2015-08-28 18:28:04 -0400
commit275c5810ca7e38560b2a77281e7a0498c50126f8 (patch)
tree9096495089118805d0e4d042b7186b91f17f2842 /src/mesa/state_tracker
parent889a946a455c54a5a9bca144b2ea2fe66be39274 (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 7a8c4e1b8fa..95a25c12fb4 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6020,7 +6020,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
LOWER_UNPACK_HALF_2x16;
if (ctx->Extensions.ARB_gpu_shader5)
- lower_inst |= LOWER_PACK_USE_BFI;
+ lower_inst |= LOWER_PACK_USE_BFI |
+ LOWER_PACK_USE_BFE;
lower_packing_builtins(ir, lower_inst);
}