Mesa (master): r600: Dump a few more variables when requested

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 21 15:20:08 UTC 2020


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

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Wed Apr 15 17:04:41 2020 +0200

r600: Dump a few more variables when requested

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>

---

 src/gallium/drivers/r600/r600_dump.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_dump.c b/src/gallium/drivers/r600/r600_dump.c
index 29a89605e22..76b56bc7d53 100644
--- a/src/gallium/drivers/r600/r600_dump.c
+++ b/src/gallium/drivers/r600/r600_dump.c
@@ -26,6 +26,7 @@
 
 #include "r600_dump.h"
 #include "r600_shader.h"
+#include "tgsi/tgsi_strings.h"
 
 void print_shader_info(FILE *f , int id, struct r600_shader *shader)
 {
@@ -165,4 +166,35 @@ void print_pipe_info(FILE *f, struct tgsi_shader_info *shader)
    PRINT_UINT_MEMBER(writes_memory);
    PRINT_UINT_MEMBER(file_mask[TGSI_FILE_HW_ATOMIC]);
    PRINT_UINT_MEMBER(file_count[TGSI_FILE_HW_ATOMIC]);
+
+   for(unsigned int i = 0; i < TGSI_PROPERTY_COUNT; ++i) {
+      if (shader->properties[i] != 0)
+	 fprintf(stderr, "PROP: %s = %d\n", tgsi_property_names[i], shader->properties[i]);
+   }
+
+#define PRINT_UINT_ARRAY_MEMBER(M, IDX) \
+   if (shader-> M [ IDX ])  fprintf(f, #M "[%d] = %d\n",  IDX, (unsigned) shader-> M [ IDX ]);
+
+   for (int i = 0; i < shader->num_inputs; ++i) {
+      PRINT_UINT_ARRAY_MEMBER(input_semantic_name, i); /**< TGSI_SEMANTIC_x */
+      PRINT_UINT_ARRAY_MEMBER(input_semantic_index, i);
+      PRINT_UINT_ARRAY_MEMBER(input_interpolate, i);
+      PRINT_UINT_ARRAY_MEMBER(input_interpolate_loc, i);
+      PRINT_UINT_ARRAY_MEMBER(input_usage_mask, i);
+      PRINT_UINT_ARRAY_MEMBER(input_cylindrical_wrap, i);
+   }
+
+   for (int i = 0; i < shader->num_inputs; ++i) {
+      PRINT_UINT_ARRAY_MEMBER(output_semantic_name, i);
+      PRINT_UINT_ARRAY_MEMBER(output_semantic_index, i);
+      PRINT_UINT_ARRAY_MEMBER(output_usagemask, i);
+      PRINT_UINT_ARRAY_MEMBER(output_streams, i);
+   }
+
+   for (int i = 0; i < shader->num_system_values; ++i)
+      PRINT_UINT_ARRAY_MEMBER(system_value_semantic_name, i);
+
+   PRINT_UINT_MEMBER(reads_pervertex_outputs);
+   PRINT_UINT_MEMBER(reads_perpatch_outputs);
+   PRINT_UINT_MEMBER(reads_tessfactor_outputs);
 }



More information about the mesa-commit mailing list