for (uint32_t j = 0; j < desc->inputAttachmentCount; j++) {
subpass->input_attachments[j] = (struct anv_subpass_attachment) {
- .usage = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
- .attachment = desc->pInputAttachments[j].attachment,
- .layout = desc->pInputAttachments[j].layout,
+ .usage = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
+ .attachment = desc->pInputAttachments[j].attachment,
+ .layout = desc->pInputAttachments[j].layout,
+ .stencil_layout = desc->pInputAttachments[j].layout,
};
}
}
subpass_attachments += desc->inputAttachmentCount;
for (uint32_t j = 0; j < desc->inputAttachmentCount; j++) {
+ const VkAttachmentReferenceStencilLayoutKHR *stencil_layout =
+ vk_find_struct_const(desc->pInputAttachments[j].pNext,
+ ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR);
+
subpass->input_attachments[j] = (struct anv_subpass_attachment) {
- .usage = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
- .attachment = desc->pInputAttachments[j].attachment,
- .layout = desc->pInputAttachments[j].layout,
+ .usage = VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT,
+ .attachment = desc->pInputAttachments[j].attachment,
+ .layout = desc->pInputAttachments[j].layout,
+ .stencil_layout = (stencil_layout ?
+ stencil_layout->stencilLayout :
+ desc->pInputAttachments[j].layout),
};
}
}