diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 7f3efca517c..37ccf447ed6 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3718,8 +3718,9 @@ zink_flush(struct pipe_context *pctx, #ifdef HAVE_RENDERDOC_APP_H p_atomic_inc(&screen->renderdoc_frame); #endif - if (ctx->needs_present && ctx->needs_present->obj->image) - zink_screen(ctx->base.screen)->image_barrier(ctx, ctx->needs_present, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT); + if (ctx->needs_present && ctx->needs_present->obj->image && + zink_is_swapchain(ctx->needs_present)) + screen->image_barrier(ctx, ctx->needs_present, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT); ctx->needs_present = NULL; }