pan/mdg: Pack barriers correctly
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 13 May 2020 15:05:49 +0000 (11:05 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 21 May 2020 17:49:14 +0000 (17:49 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>

src/panfrost/midgard/midgard_emit.c

index e9a67811aa8829c5d5a659eb52ec4ed15101c93a..e4911c1faf49dac0418373ce7c74d15370d9f10a 100644 (file)
@@ -596,6 +596,13 @@ emit_binary_bundle(compiler_context *ctx,
                 ins->texture.type = bundle->tag;
                 ins->texture.next_type = next_tag;
 
+                /* Nothing else to pack for barriers */
+                if (ins->texture.op == TEXTURE_OP_BARRIER) {
+                        ins->texture.cont = ins->texture.last = 1;
+                        util_dynarray_append(emission, midgard_texture_word, ins->texture);
+                        return;
+                }
+
                 signed override = mir_upper_override(ins, 32);
 
                 ins->texture.mask = override > 0 ?