Mesa (main): ntt: translate nir_intrinsic_shader_clock
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 19:11:35 UTC 2022
Module: Mesa
Branch: main
Commit: c3096e562daa27b0ab9da04a38eb640ed8ce1db5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c3096e562daa27b0ab9da04a38eb640ed8ce1db5
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Tue Apr 12 16:03:59 2022 +0200
ntt: translate nir_intrinsic_shader_clock
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15889>
---
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
More information about the mesa-commit
mailing list