From 23d56c842dee85b96ffaac78a751256354a46b46 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 7 Jun 2020 09:52:13 +1000 Subject: [PATCH] nvir/nir: implement nir_op_urol Signed-off-by: Ben Skeggs Reviewed-by: Karol Herbst Part-of: --- .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 2272746eeae..0e9a29253c2 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -2842,6 +2842,16 @@ Converter::visit(nir_alu_instr *insn) mkOp3(OP_PERMT, TYPE_U32, newDefs[0], getSrc(&insn->src[0]), prmt, loadImm(NULL, 0)); break; } + case nir_op_urol: { + DEFAULT_CHECKS; + LValues &newDefs = convert(&insn->dest); + mkOp3(OP_SHF, TYPE_U32, newDefs[0], getSrc(&insn->src[0]), + getSrc(&insn->src[1]), getSrc(&insn->src[0])) + ->subOp = NV50_IR_SUBOP_SHF_L | + NV50_IR_SUBOP_SHF_W | + NV50_IR_SUBOP_SHF_HI; + break; + } // boolean conversions case nir_op_b2f32: { DEFAULT_CHECKS; -- 2.30.2