From 293ea1959c17771f01b14532398ef59f36df0049 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 7 Jun 2021 18:36:07 -0400 Subject: [PATCH] panfrost: Flush everything for glMemoryBarrier 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 Part-of: --- src/gallium/drivers/panfrost/pan_compute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_compute.c b/src/gallium/drivers/panfrost/pan_compute.c index 0ce8838145d..2a1c02dcab6 100644 --- a/src/gallium/drivers/panfrost/pan_compute.c +++ b/src/gallium/drivers/panfrost/pan_compute.c @@ -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