According to LLVM, s_sendmsg_rtn(GET_REALTIME) should be used instead
of s_memrealtime.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19267>
/* "((size - 1) << 11) | register" (SHADER_CYCLES is encoded as register 29) */
Temp clock = bld.sopk(aco_opcode::s_getreg_b32, bld.def(s1), ((20 - 1) << 11) | 29);
bld.pseudo(aco_opcode::p_create_vector, Definition(dst), clock, Operand::zero());
+ } else if (nir_intrinsic_memory_scope(instr) == NIR_SCOPE_DEVICE &&
+ ctx->options->gfx_level >= GFX11) {
+ bld.sop1(aco_opcode::s_sendmsg_rtn_b64, Definition(dst),
+ Operand::c32(sendmsg_rtn_get_realtime));
} else {
aco_opcode opcode = nir_intrinsic_memory_scope(instr) == NIR_SCOPE_DEVICE
? aco_opcode::s_memrealtime