summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2016-06-21 15:14:03 -0700
committerIan Romanick <ian.d.romanick@intel.com>2016-07-19 12:19:29 -0700
commitde20086eed47e6bfe7c25835d72383114f99c7a9 (patch)
treee39a73795c12c7694c544954f0dedd3002d9b532 /src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
parent26c7f04d4a55b694623a389a564c9516d91c0026 (diff)
downloadexternal_mesa3d-de20086eed47e6bfe7c25835d72383114f99c7a9.zip
external_mesa3d-de20086eed47e6bfe7c25835d72383114f99c7a9.tar.gz
external_mesa3d-de20086eed47e6bfe7c25835d72383114f99c7a9.tar.bz2
i965: Use LZD to implement nir_op_ufind_msb
This uses one less instruction. v2: Move emit_find_msb_using_lzd out of the visitor classes. Suggested by Curro. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_generator.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 3878c4a..7ad4f86 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1637,6 +1637,9 @@ generate_code(struct brw_codegen *p,
/* FBL only supports UD type for dst. */
brw_FBL(p, retype(dst, BRW_REGISTER_TYPE_UD), src[0]);
break;
+ case BRW_OPCODE_LZD:
+ brw_LZD(p, dst, src[0]);
+ break;
case BRW_OPCODE_CBIT:
assert(devinfo->gen >= 7);
/* CBIT only supports UD type for dst. */