From c3096e562daa27b0ab9da04a38eb640ed8ce1db5 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Tue, 12 Apr 2022 16:03:59 +0200 Subject: [PATCH] ntt: translate nir_intrinsic_shader_clock Signed-off-by: Gert Wollny Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi.c | 6 +++++- src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 943811ba81a..20c3d7ffae4 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -160,7 +160,7 @@ static inline void ntt_##op(struct ntt_compile *c, #define OP10( op ) \ static inline void ntt_##op(struct ntt_compile *c, \ - struct ureg_dst tgsi_dst_register) \ + struct ureg_dst dst) \ { \ ntt_insn(c, TGSI_OPCODE_##op, dst, ureg_src_undef(), ureg_src_undef(), ureg_src_undef(), ureg_src_undef()); \ } @@ -2553,6 +2553,10 @@ ntt_emit_intrinsic(struct ntt_compile *c, nir_intrinsic_instr *instr) ntt_store(c, &instr->dest, ntt_get_src(c, instr->src[0])); break; + case nir_intrinsic_shader_clock: + ntt_CLOCK(c, ntt_get_dest(c, &instr->dest)); + break; + default: fprintf(stderr, "Unknown intrinsic: "); nir_print_instr(&instr->instr, stderr); diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h index 856f4a5c515..684c06144f1 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h +++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h @@ -206,6 +206,8 @@ OP12(INTERP_OFFSET) OP11(FBFETCH) +OP10(CLOCK) + #undef OP00 #undef OP01 #undef OP10