Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
if (subpass->depth_stencil_attachment &&
subpass->depth_stencil_attachment->attachment == VK_ATTACHMENT_UNUSED)
subpass->depth_stencil_attachment = NULL;
+
+ for (uint32_t j = 0; j < subpass->attachment_count; j++) {
+ struct radv_subpass_attachment *subpass_att =
+ &subpass->attachments[j];
+ if (subpass_att->attachment == VK_ATTACHMENT_UNUSED)
+ continue;
+
+ struct radv_render_pass_attachment *pass_att =
+ &pass->attachments[subpass_att->attachment];
+
+ pass_att->last_subpass_idx = i;
+ }
}
}
VkAttachmentLoadOp stencil_load_op;
VkImageLayout initial_layout;
VkImageLayout final_layout;
+
+ /* The subpass id in which the attachment will be used last. */
+ uint32_t last_subpass_idx;
};
struct radv_render_pass {