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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
This commit is contained in:
Mike Blumenkrantz 2020-11-04 09:08:14 -05:00 committed by Marge Bot
parent 6d138b5f92
commit 116811e963
1 changed files with 5 additions and 0 deletions

View File

@ -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) {