ntt: translate nir_intrinsic_shader_clock
authorGert Wollny <gert.wollny@collabora.com>
Tue, 12 Apr 2022 14:03:59 +0000 (16:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Apr 2022 18:47:08 +0000 (18:47 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15889>

src/gallium/auxiliary/nir/nir_to_tgsi.c
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h

index 943811b..20c3d7f 100644 (file)
@@ -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);
index 856f4a5..684c061 100644 (file)
@@ -206,6 +206,8 @@ OP12(INTERP_OFFSET)
 
 OP11(FBFETCH)
 
+OP10(CLOCK)
+
 #undef OP00
 #undef OP01
 #undef OP10