diff options
author | Ilia Mirkin <[email protected]> | 2015-08-20 20:52:32 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-08-28 18:28:04 -0400 |
commit | 889a946a455c54a5a9bca144b2ea2fe66be39274 (patch) | |
tree | 4eddb51b9a62abb5be1217166f04d3c0f3cc8418 /src/mesa | |
parent | c676c432f30158190c260e7f3731ee6667ad4103 (diff) |
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 <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 695644117ac..7a8c4e1b8fa 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6019,6 +6019,9 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) LOWER_PACK_HALF_2x16 | LOWER_UNPACK_HALF_2x16; + if (ctx->Extensions.ARB_gpu_shader5) + lower_inst |= LOWER_PACK_USE_BFI; + lower_packing_builtins(ir, lower_inst); } |