Mesa (master): nir: Print formats on image intrinsics as text

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 9 17:35:47 UTC 2020


Module: Mesa
Branch: master
Commit: 72f1c9aef5d586ea18eb14388b59b9c8c3ce4dd9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=72f1c9aef5d586ea18eb14388b59b9c8c3ce4dd9

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Jun  5 12:30:05 2020 -0500

nir: Print formats on image intrinsics as text

Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7509>

---

 src/compiler/nir/nir_print.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 9286636aed3..5cdf778b635 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -906,6 +906,12 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
          break;
       }
 
+      case NIR_INTRINSIC_FORMAT: {
+         enum pipe_format format = nir_intrinsic_format(instr);
+         fprintf(fp, " format=%s ", util_format_short_name(format));
+         break;
+      }
+
       case NIR_INTRINSIC_DESC_TYPE: {
          VkDescriptorType desc_type = nir_intrinsic_desc_type(instr);
          fprintf(fp, " desc_type=%s", vulkan_descriptor_type_name(desc_type));



More information about the mesa-commit mailing list