Constructor Function. Bind pipeline and all buffer type descriptor set.
480 {
482
485
490 {
492
493
494 {
496
497 state->PushBehave("EndRenderer", nullptr);
498 state->PushBehave("BeginStatistics", nullptr);
499 state->PushBehave("EndStatistics", nullptr);
500 }
501
502
503 {
505 {
507
508 state->PushBehave("EndRenderer", nullptr);
509 state->PushBehave(
"BeginStatistics", [=](
RenderBehaveBuilder* builder, VkCommandBuffer commandBuffer) {
510 builder->GetStatisticsRendererPass()->BeginStatistics(commandBuffer,
static_cast<Querier::StatisticsBits>(1 << i));
511 });
512 state->PushBehave(
"EndStatistics", [=](
RenderBehaveBuilder* builder, VkCommandBuffer commandBuffer) {
513 builder->GetStatisticsRendererPass()->EndStatistics(commandBuffer,
static_cast<Querier::StatisticsBits>(1 << i));
514 });
515 }
516 }
517
518
519 {
521
522 state->PushBehave(
"EndRenderer", [](
RenderBehaveBuilder* builder, VkCommandBuffer commandBuffer) {
524 subPass->StoreStatistics();
525 }, builder->GetStatisticsRendererPass());
526 });
527 state->PushBehave("BeginStatistics", nullptr);
528 state->PushBehave("EndStatistics", nullptr);
529 }
530
531
532 {
534
535 state->PushBehave("EndRenderer", nullptr);
536 state->PushBehave("BeginStatistics", nullptr);
537 state->PushBehave("EndStatistics", nullptr);
538 }
539
541 }
542 }
#define SPICES_PROFILE_ZONE
StatisticsBits
Statistics types.
uint32_t m_CurrentFrame
Current frame index. Passed while this class instanced.
uint32_t m_CurrentImage
Current frame index. Passed while this class instanced.
Renderer * m_Renderer
Specific Renderer pointer. Passed while this class instanced.
RenderBehaveBuilder(Renderer *renderer, uint32_t currentFrame, uint32_t currentImage)
Constructor Function. Bind pipeline and all buffer type descriptor set.
VkCommandBuffer m_CommandBuffer
Current CommandBuffer.
bool m_IsActive
Whether this renderer is active(submit commands in RendererBehaveBuilder).
static std::shared_ptr< scl::behave_state_list< void, Renderer::RenderBehaveBuilder *, VkCommandBuffer > > m_StatisticsStateList
Statistics StateList.
VulkanState & m_VulkanState
This variable is passed while renderer instanced.
static auto AsyncTask(ThreadPoolEnum pool, F &&func, Args &&... args) -> std::future< decltype(func(std::forward< Args >(args)...))>
std::array< VkCommandBuffer, MaxFrameInFlight > m_GraphicCommandBuffer