diff --git a/.pick_status.json b/.pick_status.json index af2d0248f6e..161f92a11af 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1134,7 +1134,7 @@ "description": "zink: correctly use GENERAL layout for dynamic texture clears", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "622612f67ea72298c3d85dfe53c5d54ee9f98527", "notes": null diff --git a/src/gallium/drivers/zink/zink_clear.c b/src/gallium/drivers/zink/zink_clear.c index ed05d1d36ac..fe14bcef182 100644 --- a/src/gallium/drivers/zink/zink_clear.c +++ b/src/gallium/drivers/zink/zink_clear.c @@ -455,7 +455,10 @@ zink_clear_texture_dynamic(struct pipe_context *pctx, VkRenderingAttachmentInfo att = {0}; att.sType = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_INFO; att.imageView = surf->image_view; - att.imageLayout = res->aspect & VK_IMAGE_ASPECT_COLOR_BIT ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; + if (screen->driver_workarounds.general_layout) + att.imageLayout = VK_IMAGE_LAYOUT_GENERAL; + else + att.imageLayout = res->aspect & VK_IMAGE_ASPECT_COLOR_BIT ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; att.loadOp = full_clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD; att.storeOp = VK_ATTACHMENT_STORE_OP_STORE;