From: Karol Herbst Date: Tue, 9 Jan 2018 23:35:47 +0000 (+0100) Subject: nv50/ir/nir: implement intrinsic shader_clock X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b866012f7ba4bd83ad0e3904eae2116205bd256b;p=mesa.git nv50/ir/nir: implement intrinsic shader_clock v9: mark as fixed Signed-off-by: Karol Herbst --- 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 c379eb72c1e..627848a457f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp @@ -2444,6 +2444,14 @@ Converter::visit(nir_intrinsic_instr *insn) bar->subOp = getSubOp(op); break; } + case nir_intrinsic_shader_clock: { + const DataType dType = getDType(insn); + LValues &newDefs = convert(&insn->dest); + + loadImm(newDefs[0], 0u); + mkOp1(OP_RDSV, dType, newDefs[1], mkSysVal(SV_CLOCK, 0))->fixed = 1; + break; + } default: ERROR("unknown nir_intrinsic_op %s\n", nir_intrinsic_infos[op].name); return false;