19 SubpassDescription(VkPipelineBindPoint bindPoint, std::vector<VkAttachmentReference> colorAttachments,
20 const std::optional<uint32_t>& depthAttachment)
21 : m_ColorAttachments(std::move(colorAttachments))
23 m_SubpassDescription.pipelineBindPoint = bindPoint;
24 m_SubpassDescription.colorAttachmentCount =
static_cast<uint32_t
>(this->m_ColorAttachments.size());
25 m_SubpassDescription.pColorAttachments =
26 this->m_ColorAttachments.empty() ? nullptr : this->m_ColorAttachments.data();
30 m_DepthStencilAttachment.attachment = *depthAttachment;
31 m_DepthStencilAttachment.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
32 m_SubpassDescription.pDepthStencilAttachment = &m_DepthStencilAttachment;
42 const VkSubpassDescription& GetSubpassDescription()
const
44 return m_SubpassDescription;
48 VkSubpassDescription m_SubpassDescription = {};
49 std::vector<VkAttachmentReference> m_ColorAttachments;
50 VkAttachmentReference m_DepthStencilAttachment = {};