MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / draw_impl

Method draw_impl

framework/rendering/render_pipeline.h:176–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175template <vkb::BindingType bindingType>
176void RenderPipeline<bindingType>::draw_impl(vkb::core::CommandBufferCpp &command_buffer,
177 vkb::rendering::RenderTargetCpp &render_target,
178 vk::SubpassContents contents)
179{
180 for (size_t i = 0; i < subpasses.size(); ++i)
181 {
182 active_subpass_index = i;
183
184 auto &subpass = subpasses[i];
185
186 subpass->update_render_target_attachments(render_target);
187
188 if (i == 0)
189 {
190 command_buffer.begin_render_pass(render_target, load_store, clear_value, subpasses, contents);
191 }
192 else
193 {
194 command_buffer.next_subpass();
195 }
196
197 if (contents != vk::SubpassContents::eSecondaryCommandBuffers)
198 {
199 if (subpass->get_debug_name().empty())
200 {
201 subpass->set_debug_name(fmt::format("RP subpass #{}", i));
202 }
203 ScopedDebugLabel subpass_debug_label{reinterpret_cast<vkb::core::CommandBufferC const &>(command_buffer), subpass->get_debug_name().c_str()};
204 }
205
206 subpass->draw(command_buffer);
207 }
208}
209
210template <vkb::BindingType bindingType>
211const std::vector<typename RenderPipeline<bindingType>::ClearValueType> &RenderPipeline<bindingType>::get_clear_value() const

Callers

nothing calls this directly

Calls 7

sizeMethod · 0.80
begin_render_passMethod · 0.80
next_subpassMethod · 0.80
emptyMethod · 0.80
set_debug_nameMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected