From ed07721d090eb0c4dceb65fba36b0ae054519d3c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 6 Apr 2022 16:50:37 -0400 Subject: [PATCH] zink: only apply swapchain behavior in flush_resource for swapchain images these could otherwise be pixmaps or dmabufs Reviewed-by: Adam Jackson Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index bfce532ce59..358bd9f2453 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3544,7 +3544,7 @@ zink_flush_resource(struct pipe_context *pctx, { struct zink_context *ctx = zink_context(pctx); struct zink_resource *res = zink_resource(pres); - if (pres->bind & PIPE_BIND_DISPLAY_TARGET) { + if (res->obj->dt) { if (res->obj->acquire) { zink_resource_image_barrier(ctx, res, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, 0, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT); zink_batch_reference_resource_rw(&ctx->batch, res, true);