summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBoyan Ding <[email protected]>2017-04-04 22:44:46 +0800
committerIlia Mirkin <[email protected]>2017-04-09 13:03:13 -0400
commit6c3dd8f0ed020f3009153ea8058f0b9340823a41 (patch)
tree1a0a76778eca53d8b6a2ce6d590f399173ed74f9 /src/gallium/drivers/nouveau
parente2e2c69927558e190140fa45e5a67858c9309376 (diff)
nv50/ir: Handle TGSI_OPCODE_CLOCK
Signed-off-by: Boyan Ding <[email protected]> [imirkin: make zero mov non-fixed] Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp7
1 files changed, 7 insertions, 0 deletions
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 1e2f6111fc4..3ed7d345c4b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -3404,6 +3404,13 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
mkCvt(OP_CVT, TYPE_U32, dst0[c], TYPE_U8, val0);
}
break;
+ case TGSI_OPCODE_CLOCK:
+ // Stick the 32-bit clock into the high dword of the logical result.
+ if (!tgsi.getDst(0).isMasked(0))
+ mkOp1(OP_MOV, TYPE_U32, dst0[0], zero);
+ 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;