v2: Check if the input channels are enabled
Set lower 32 bits zero instead of clockhi
Signed-off-by: Boyan Ding <[email protected]>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 7aaeedf8dd..fa12fe8175 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -3410,6 +3410,12 @@ Converter::handleInstruction(const struct
tgsi_full_instruction *insn)
mkCvt(OP_CVT, TYPE_U32, dst0[c], TYPE_U8, val0);
}
break;
+ case TGSI_OPCODE_CLOCK:
+ if (!tgsi.getDst(0).isMasked(0))
+ mkOp1(OP_MOV, TYPE_U32, dst0[0], zero)->fixed = 1;
+ if (!tgsi.getDst(0).isMasked(1))
+ mkOp1(OP_RDSV, TYPE_U32, dst0[1], mkSysVal(SV_CLOCK, 0))->fixed = 1;
+ break;
case TGSI_OPCODE_KILL_IF:
val0 = new_LValue(func, FILE_PREDICATE);
mask = 0;
--
2.12.0
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev