From 4f8cf816acdf77b8b003cbe8cc620e5e38751847 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 14 Apr 2021 12:47:53 -0400 Subject: [PATCH] zink: merge copy-to-scanout path into non-deferred flush path this eliminates any desync between scanout presentation and clears Fixes: 104603fa763 ("zink: create separate linear tiling image for scanout") Acked-by: Erik Faye-Lund Part-of: (cherry picked from commit 2138aef7c925483e5cad25ba897b56d4ef5d4d24) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 84222a82364..71388909083 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -22,7 +22,7 @@ "description": "zink: merge copy-to-scanout path into non-deferred flush path", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "104603fa763c52e98a79785dd514beab949546db" }, diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 68aa1576326..eeec8028c50 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1818,12 +1818,10 @@ zink_flush(struct pipe_context *pctx, struct zink_fence *fence = NULL; struct zink_screen *screen = zink_screen(ctx->base.screen); - if (!deferred && ctx->clears_enabled) { - /* start rp to do all the clears */ - zink_begin_render_pass(ctx, batch); - } - - if (flags & PIPE_FLUSH_END_OF_FRAME) { + if (!deferred) { + if (ctx->clears_enabled) + /* start rp to do all the clears */ + zink_begin_render_pass(ctx, batch); zink_end_render_pass(ctx, batch); if (ctx->flush_res) { copy_scanout(ctx, ctx->flush_res);