r600: Update state code to accept NIR shaders
[mesa.git] / src / gallium / drivers / r600 / eg_debug.c
index 43c4f41f237df55e7d012b284f25c22f2a796a1e..56195df296479287afdcd7563dbcaced7a153bd5 100644 (file)
@@ -78,7 +78,7 @@ static void print_named_value(FILE *file, const char *name, uint32_t value,
 static void eg_dump_reg(FILE *file, unsigned offset, uint32_t value,
                        uint32_t field_mask)
 {
-       int r, f;
+       unsigned r, f;
 
        for (r = 0; r < ARRAY_SIZE(egd_reg_table); r++) {
                const struct eg_reg *reg = &egd_reg_table[r];
@@ -134,7 +134,7 @@ static void ac_parse_set_reg_packet(FILE *f, uint32_t *ib, unsigned count,
                                    unsigned reg_offset)
 {
        unsigned reg = (ib[1] << 2) + reg_offset;
-       int i;
+       unsigned i;
 
        for (i = 0; i < count; i++)
                eg_dump_reg(f, reg + i*4, ib[2+i], ~0);
@@ -148,7 +148,8 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
        unsigned count = PKT_COUNT_G(ib[0]);
        unsigned op = PKT3_IT_OPCODE_G(ib[0]);
        const char *predicate = PKT3_PREDICATE(ib[0]) ? "(predicate)" : "";
-       int i;
+       const char *compute_mode = (ib[0] & 0x2) ? "(C)" : "";
+       unsigned i;
 
        /* Print the name first. */
        for (i = 0; i < ARRAY_SIZE(packet3_table); i++)
@@ -162,14 +163,14 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
                    op == PKT3_SET_CONFIG_REG ||
                    op == PKT3_SET_UCONFIG_REG ||
                    op == PKT3_SET_SH_REG)
-                       fprintf(f, COLOR_CYAN "%s%s" COLOR_CYAN ":\n",
-                               name, predicate);
+                       fprintf(f, COLOR_CYAN "%s%s%s" COLOR_CYAN ":\n",
+                               name, compute_mode, predicate);
                else
-                       fprintf(f, COLOR_GREEN "%s%s" COLOR_RESET ":\n",
-                               name, predicate);
+                       fprintf(f, COLOR_GREEN "%s%s%s" COLOR_RESET ":\n",
+                               name, compute_mode, predicate);
        } else
-               fprintf(f, COLOR_RED "PKT3_UNKNOWN 0x%x%s" COLOR_RESET ":\n",
-                       op, predicate);
+               fprintf(f, COLOR_RED "PKT3_UNKNOWN 0x%x%s%s" COLOR_RESET ":\n",
+                       op, compute_mode, predicate);
 
        /* Print the contents. */
        switch (op) {