aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2020-06-07 09:52:17 +1000
committerMarge Bot <[email protected]>2020-06-10 22:52:41 +0000
commit59b44f90aa4db9425ed05d415c61ef63ced66726 (patch)
treef77d86165db6a12f1fa18c51415fbc3c54d12da9
parent126954aade982ab79fde07de35c9911737eb0d04 (diff)
nvir/nir: nir expects the shift amount to wrap, rather than clamp
Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5377>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index 21d3033cdc2..1ed34ae2652 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -571,6 +571,10 @@ Converter::getSubOp(nir_op op)
case nir_op_imul_high:
case nir_op_umul_high:
return NV50_IR_SUBOP_MUL_HIGH;
+ case nir_op_ishl:
+ case nir_op_ishr:
+ case nir_op_ushr:
+ return NV50_IR_SUBOP_SHIFT_WRAP;
default:
return 0;
}