Mesa (master): zink: trigger pending clears during flush

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 23 17:20:50 UTC 2021


Module: Mesa
Branch: master
Commit: 116811e9639903227242db753e2931428cc0a962
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=116811e9639903227242db753e2931428cc0a962

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Nov  4 09:08:14 2020 -0500

zink: trigger pending clears during flush

this applies all pending fb clears at the time of flush to handle the scenario
of start -> clear() -> flush() properly

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>

---

 src/gallium/drivers/zink/zink_context.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index f12f4df7830..c19c45d9484 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1783,6 +1783,11 @@ zink_flush(struct pipe_context *pctx,
    struct zink_batch *batch = zink_batch_g(ctx);
    struct zink_fence *fence = &batch->state->fence;
 
+   if (!deferred && ctx->clears_enabled) {
+      /* start rp to do all the clears */
+      zink_begin_render_pass(ctx, batch);
+   }
+
    if (deferred)
       batch->state->fence.deferred_ctx = pctx;
    else if (batch->has_work) {



More information about the mesa-commit mailing list