From dd8d52cabc759ff5b3ef0de00d247776f261225b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 14 Mar 2023 16:54:07 -0400 Subject: [PATCH] kopper: apply ancillary invalidation through glthread on swapbuffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this fixes invalidations with tc's renderpass parsing so they get picked up before the renderpass ends Reviewed-by: Marek Olšák Part-of: --- src/gallium/frontends/dri/kopper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index f71db72..637b25d 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -853,6 +853,10 @@ kopperSwapBuffers(__DRIdrawable *dPriv, uint32_t flush_flags) if (!ptex) return 0; + /* ensure invalidation is applied before renderpass ends */ + if (flush_flags & __DRI2_FLUSH_INVALIDATE_ANCILLARY) + _mesa_glthread_invalidate_zsbuf(ctx->st->ctx); + /* Wait for glthread to finish because we can't use pipe_context from * multiple threads. */ -- 2.7.4