MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_default_color_only()

RenderPassCreateInfo MayaFlux::Core::VKRenderPass::create_default_color_only ( vk::Format  color_format)
static

Definition at line 139 of file VKRenderPass.cpp.

140{
141 RenderPassCreateInfo create_info;
142
143 AttachmentDescription color_attachment;
144 color_attachment.format = color_format;
145 color_attachment.load_op = vk::AttachmentLoadOp::eClear;
146 color_attachment.store_op = vk::AttachmentStoreOp::eStore;
147 color_attachment.initial_layout = vk::ImageLayout::eUndefined;
148 color_attachment.final_layout = vk::ImageLayout::ePresentSrcKHR;
149 create_info.attachments.push_back(color_attachment);
150
151 SubpassDescription subpass;
152 subpass.color_attachments.emplace_back(0, vk::ImageLayout::eColorAttachmentOptimal);
153 create_info.subpasses.push_back(subpass);
154
155 SubpassDependency dependency;
156 dependency.src_subpass = VK_SUBPASS_EXTERNAL;
157 dependency.dst_subpass = 0;
158 dependency.src_stage_mask = vk::PipelineStageFlagBits::eColorAttachmentOutput;
159 dependency.dst_stage_mask = vk::PipelineStageFlagBits::eColorAttachmentOutput;
160 dependency.dst_access_mask = vk::AccessFlagBits::eColorAttachmentWrite;
161 create_info.dependencies.push_back(dependency);
162
163 return create_info;
164}

References MayaFlux::Core::RenderPassCreateInfo::attachments, MayaFlux::Core::SubpassDescription::color_attachments, MayaFlux::Core::RenderPassCreateInfo::dependencies, MayaFlux::Core::SubpassDependency::dst_access_mask, MayaFlux::Core::SubpassDependency::dst_stage_mask, MayaFlux::Core::SubpassDependency::dst_subpass, MayaFlux::Core::AttachmentDescription::final_layout, MayaFlux::Core::AttachmentDescription::format, MayaFlux::Core::AttachmentDescription::initial_layout, MayaFlux::Core::AttachmentDescription::load_op, MayaFlux::Core::SubpassDependency::src_stage_mask, MayaFlux::Core::SubpassDependency::src_subpass, MayaFlux::Core::AttachmentDescription::store_op, and MayaFlux::Core::RenderPassCreateInfo::subpasses.