panfrost: Use VTX tag for vertex texturing
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 21 May 2020 17:23:46 +0000 (13:23 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Jun 2020 18:10:59 +0000 (18:10 +0000)
Fixes BARRIER faults.

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

src/panfrost/midgard/midgard_schedule.c

index 59fa830f68bc074d729271f85b5ce1c4fefd168b..d823155ccf13813cf00c3ed67bba1699bd5248ee 100644 (file)
@@ -821,7 +821,8 @@ mir_schedule_condition(compiler_context *ctx,
 static midgard_bundle
 mir_schedule_texture(
                 midgard_instruction **instructions,
-                BITSET_WORD *worklist, unsigned len)
+                BITSET_WORD *worklist, unsigned len,
+                bool is_vertex)
 {
         struct midgard_predicate predicate = {
                 .tag = TAG_TEXTURE_4,
@@ -836,7 +837,8 @@ mir_schedule_texture(
 
         struct midgard_bundle out = {
                 .tag = ins->texture.op == TEXTURE_OP_BARRIER ?
-                        TAG_TEXTURE_4_BARRIER : TAG_TEXTURE_4,
+                        TAG_TEXTURE_4_BARRIER :  is_vertex ?
+                        TAG_TEXTURE_4_VTX : TAG_TEXTURE_4,
                 .instruction_count = 1,
                 .instructions = { ins }
         };
@@ -1151,7 +1153,7 @@ schedule_block(compiler_context *ctx, midgard_block *block)
                 midgard_bundle bundle;
 
                 if (tag == TAG_TEXTURE_4)
-                        bundle = mir_schedule_texture(instructions, worklist, len);
+                        bundle = mir_schedule_texture(instructions, worklist, len, ctx->stage != MESA_SHADER_FRAGMENT);
                 else if (tag == TAG_LOAD_STORE_4)
                         bundle = mir_schedule_ldst(instructions, worklist, len);
                 else if (tag == TAG_ALU_4)