pan/midgard: Validate barriers use a barrier tag
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 24 Jan 2020 02:20:16 +0000 (21:20 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Jan 2020 13:38:41 +0000 (13:38 +0000)
...and that non-barriers don't use a barrier tag. It's not clear what
the difference means quite yet, though.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3580>

src/panfrost/midgard/disassemble.c

index a3eddaa514ac0fb7cc3ace3fe3ab7316aff6c3d8..f99a13f2908db27294ecbbb830dc3195ce9c469d 100644 (file)
@@ -1288,6 +1288,9 @@ print_texture_barrier(FILE *fp, uint32_t *word)
 {
         midgard_texture_barrier_word *barrier = (midgard_texture_barrier_word *) word;
 
+        if (barrier->type != 0x4)
+                fprintf(fp, "/* barrier tag %X != 0x4 */ ", barrier->type);
+
         if (!barrier->cont)
                 fprintf(fp, "/* cont missing? */");
 
@@ -1329,7 +1332,8 @@ print_texture_word(FILE *fp, uint32_t *word, unsigned tabs, unsigned in_reg_base
         if (texture->op == TEXTURE_OP_BARRIER) {
                 print_texture_barrier(fp, word);
                 return;
-        }
+        } else  if (texture->type == 0x4)
+                fprintf (fp, "/* nonbarrier had tag 0x4 */ ");
 
         /* Specific format in question */
         print_texture_format(fp, texture->format);