From: Ben Skeggs Date: Sat, 6 Jun 2020 23:52:17 +0000 (+1000) Subject: nvir/nir: nir expects the shift amount to wrap, rather than clamp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59b44f90aa4db9425ed05d415c61ef63ced66726;p=mesa.git nvir/nir: nir expects the shift amount to wrap, rather than clamp Signed-off-by: Ben Skeggs Reviewed-by: Karol Herbst Part-of: --- 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; }