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

◆ allocate_pipeline_descriptors()

std::vector< DescriptorSetID > MayaFlux::Portal::Graphics::RenderFlow::allocate_pipeline_descriptors ( RenderPipelineID  pipeline,
uint32_t  first_layout_index = 0 
)

Allocate descriptor sets for pipeline.

Parameters
pipelinePipeline ID
first_layout_indexFirst layout index in pipeline layout to start from (default: 0)
Returns
Vector of allocated descriptor set IDs

Definition at line 1019 of file RenderFlow.cpp.

1022{
1023 auto pipeline_it = m_pipelines.find(pipeline_id);
1024 if (pipeline_it == m_pipelines.end()) {
1026 "Invalid pipeline ID: {}", pipeline_id);
1027 return {};
1028 }
1029
1030 const auto& layouts = pipeline_it->second.layouts;
1031 std::vector<DescriptorSetID> descriptor_set_ids;
1032
1033 for (uint32_t i = first_layout_index; i < layouts.size(); ++i) {
1034 auto ds_id = m_shader_foundry->allocate_descriptor_set(layouts[i]);
1035 if (ds_id == INVALID_DESCRIPTOR_SET) {
1037 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
1038 return {};
1039 }
1040 descriptor_set_ids.push_back(ds_id);
1041 }
1042
1044 "Allocated {} descriptor sets for pipeline {} (starting at layout index {})",
1045 descriptor_set_ids.size(), pipeline_id, first_layout_index);
1046
1047 return descriptor_set_ids;
1048}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
DescriptorSetID allocate_descriptor_set(vk::DescriptorSetLayout layout)
Allocate descriptor set for a pipeline.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.
constexpr DescriptorSetID INVALID_DESCRIPTOR_SET

References MayaFlux::Portal::Graphics::ShaderFoundry::allocate_descriptor_set(), MayaFlux::Portal::Graphics::INVALID_DESCRIPTOR_SET, m_pipelines, m_shader_foundry, MF_DEBUG, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Journal::Rendering.

+ Here is the call graph for this function: