pan/mdg: Identify barrier out-of-order field
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 13 Aug 2020 21:14:58 +0000 (17:14 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Aug 2020 12:08:51 +0000 (12:08 +0000)
All barrier types are implied regardless, this is an optimization for
out-of-order.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>

src/panfrost/midgard/disassemble.c
src/panfrost/midgard/midgard.h
src/panfrost/midgard/midgard_compile.c

index 4e54f280c844d5cb007da2947c9d529eabba9c0c..ac5179edd35fd4a96575e7d6658befa2eae8677b 100644 (file)
@@ -1391,18 +1391,8 @@ print_texture_barrier(FILE *fp, uint32_t *word)
         if (barrier->zero5)
                 fprintf(fp, "/* zero4 = 0x%" PRIx64 " */ ", barrier->zero5);
 
         if (barrier->zero5)
                 fprintf(fp, "/* zero4 = 0x%" PRIx64 " */ ", barrier->zero5);
 
-
-        /* Control barriers are always implied, so include for obviousness */
-        fprintf(fp, " control");
-
-        if (barrier->buffer)
-                fprintf(fp, " | buffer");
-
-        if (barrier->shared)
-                fprintf(fp, " | shared");
-
-        if (barrier->stack)
-                fprintf(fp, " | stack");
+        if (barrier->out_of_order)
+                fprintf(fp, ".ooo%u", barrier->out_of_order);
 
         fprintf(fp, "\n");
 }
 
         fprintf(fp, "\n");
 }
index 0aac96cf6e2124de976a0e648e70b83bea2a8e0f..7d9e7e136143d7b7a202da94e9f9374f1ea83f9f 100644 (file)
@@ -657,9 +657,6 @@ enum mali_sampler_type {
         MALI_SAMPLER_SIGNED     = 0x3, /* isampler */
 };
 
         MALI_SAMPLER_SIGNED     = 0x3, /* isampler */
 };
 
-#define MIDGARD_BARRIER_BUFFER (1 << 0)
-#define MIDGARD_BARRIER_SHARED (1 << 1)
-
 typedef struct
 __attribute__((__packed__))
 {
 typedef struct
 __attribute__((__packed__))
 {
@@ -722,10 +719,8 @@ __attribute__((__packed__))
 
         unsigned swizzle  : 8;
 
 
         unsigned swizzle  : 8;
 
-        /* For barriers, control barriers are implied regardless, but these
-         * bits also enable memory barriers of various types. For regular
-         * textures, these indicate how many bundles after this texture op may
-         * be executed in parallel with this op. We may execute only ALU and
+         /* These indicate how many bundles after this texture op may be
+          * executed in parallel with this op. We may execute only ALU and
          * ld/st in parallel (not other textures), and obviously there cannot
          * be any dependency (the blob appears to forbid even accessing other
          * channels of a given texture register). */
          * ld/st in parallel (not other textures), and obviously there cannot
          * be any dependency (the blob appears to forbid even accessing other
          * channels of a given texture register). */
@@ -801,10 +796,8 @@ __attribute__((__packed__))
         unsigned zero2 : 14;
 
         unsigned zero3 : 24;
         unsigned zero2 : 14;
 
         unsigned zero3 : 24;
-        unsigned buffer : 1;
-        unsigned shared : 1;
-        unsigned stack  : 1;
-        unsigned zero4 : 5;
+        unsigned out_of_order : 4;
+        unsigned zero4 : 4;
 
         uint64_t zero5;
 } midgard_texture_barrier_word;
 
         uint64_t zero5;
 } midgard_texture_barrier_word;
index 592e4dc70e4e5bf3c3e289fbfaac36cc81db3bfa..d8d1852f5e212291d9876ad4d607978f363838bc 100644 (file)
@@ -1570,11 +1570,6 @@ emit_control_barrier(compiler_context *ctx)
                 .dest = ~0,
                 .src = { ~0, ~0, ~0, ~0 },
                 .op = TEXTURE_OP_BARRIER,
                 .dest = ~0,
                 .src = { ~0, ~0, ~0, ~0 },
                 .op = TEXTURE_OP_BARRIER,
-                .texture = {
-                        /* TODO: optimize */
-                        .out_of_order = MIDGARD_BARRIER_BUFFER |
-                                MIDGARD_BARRIER_SHARED ,
-                }
         };
 
         emit_mir_instruction(ctx, ins);
         };
 
         emit_mir_instruction(ctx, ins);