[Mesa-dev] [PATCH v8 33/33] nvir/nir: implement intrinsic shader_clock
Karol Herbst
kherbst at redhat.com
Mon Jul 16 16:10:26 UTC 2018
On Mon, Jul 16, 2018 at 5:54 PM, Rhys Perry <pendingchaos02 at gmail.com> wrote:
> The instructions should probably be marked as fixed so they aren't CSE'd.
>
mhh, but then also prevents us from doing DCE :/ I guess we can depend
on nir eliminating such high level instructions, but with TGSI we also
mark that as fixed, so I guess I just go ahead and change that. Thanks
for pointing that out.
> On Fri, Jun 29, 2018 at 11:32 PM, Karol Herbst <kherbst at redhat.com> wrote:
>> Signed-off-by: Karol Herbst <kherbst at redhat.com>
>> ---
>> src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 8 ++++++++
>> 1 file changed, 8 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 f4875113d00..ed2453136fd 100644
>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
>> @@ -2344,6 +2344,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);
>> + mkOp1v(OP_RDSV, dType, newDefs[1], mkSysVal(SV_CLOCK, 0));
>> + break;
>> + }
>> default:
>> ERROR("unknown nir_intrinsic_op %s\n", nir_intrinsic_infos[op].name);
>> return false;
>> --
>> 2.17.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list