panfrost: Flush everything for glMemoryBarrier
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 7 Jun 2021 22:36:07 +0000 (18:36 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 18:06:11 +0000 (18:06 +0000)
This is inefficient but so far I see the DDK doing the same thing. Fixes
KHR-GLES31.core.shader_storage_buffer_object.advanced-usage-sync-vsfs

In the future we should look into cache flush jobs.

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

src/gallium/drivers/panfrost/pan_compute.c

index 0ce8838..2a1c02d 100644 (file)
@@ -247,7 +247,9 @@ panfrost_set_global_binding(struct pipe_context *pctx,
 static void
 panfrost_memory_barrier(struct pipe_context *pctx, unsigned flags)
 {
-        /* TODO */
+        /* TODO: Be smart and only flush the minimum needed, maybe emitting a
+         * cache flush job if that would help */
+        panfrost_flush_all_batches(pan_context(pctx));
 }
 
 void