zink: only trigger deferred present barrier if swapchain has acquired

otherwise this was just pointlessly flushed by the frontend and
can be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>
This commit is contained in:
Mike Blumenkrantz 2022-04-08 09:28:52 -04:00 committed by Marge Bot
parent 165b016bbe
commit f0a3a4d2f1

View file

@ -3247,7 +3247,8 @@ zink_flush(struct pipe_context *pctx,
zink_begin_render_pass(ctx);
if (ctx->needs_present && (flags & PIPE_FLUSH_END_OF_FRAME)) {
zink_resource_image_barrier(ctx, ctx->needs_present, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT);
if (ctx->needs_present->obj->image)
zink_resource_image_barrier(ctx, ctx->needs_present, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT);
}
if (!batch->has_work) {