pan/bi: Add support for ushr
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7472>
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 9fbd595..48146cd 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -897,6 +897,7 @@
case nir_op_inot:
case nir_op_ishl:
case nir_op_ishr:
+ case nir_op_ushr:
return BI_BITWISE;
BI_CASE_CMP(nir_op_flt)
@@ -1204,6 +1205,9 @@
alu.src[2] = BIR_INDEX_ZERO;
alu.src_types[2] = nir_type_uint8;
break;
+ case nir_op_ushr:
+ alu.bitwise.rshift = true;
+ /* fallthrough */
case nir_op_ishl:
alu.op.bitwise = BI_BITWISE_OR;
/* move src1 to src2 and replace with zero. underlying op is (src0 << src2) | src1 */