Instance a VkAttachmentDescription.
Write in data.
Instance a VkClearValue.
Instance a VkAttachmentReference.
2983 {
2985
2989 VkAttachmentDescription attachmentDescription{};
2990 attachmentDescription.format =
m_Renderer->
m_Device->GetSwapChainSupport().format.format;
2991 attachmentDescription.samples = VK_SAMPLE_COUNT_1_BIT;
2992 attachmentDescription.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
2993 attachmentDescription.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
2994 attachmentDescription.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
2995 attachmentDescription.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
2996 attachmentDescription.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
2997 attachmentDescription.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
2998
3003 func(attachmentDescription);
3004
3008 VkClearValue clearValue{};
3009 clearValue.color = { 0.0f, 0.0f, 0.0f, 1.0f };
3010
3014 RendererResourceCreateInfo Info;
3015 Info.name = attachmentName;
3016 Info.type = type;
3017 Info.description = attachmentDescription;
3020
3022
3023 const uint32_t index =
m_Renderer->
m_Pass->AddAttachment(attachmentName, attachmentDescription, clearValue, 1, view);
3024
3028 VkAttachmentReference attachmentRef{};
3029 attachmentRef.attachment = index;
3030 attachmentRef.layout = attachmentDescription.finalLayout;
3031
3033
3034 return *this;
3035 }
#define SPICES_PROFILE_ZONE
std::shared_ptr< RendererSubPass > m_HandledRendererSubPass
Handled Sub pass.
Renderer * m_Renderer
Specific Renderer pointer. Passed while this class instanced.
std::shared_ptr< RendererPass > m_Pass
RendererPass.
std::shared_ptr< RendererResourcePool > m_RendererResourcePool
RendererResourcePool, Passed by instanced.
std::shared_ptr< VulkanDevice > m_Device
VulkanDevice , Passed by instanced.