MayaFlux 0.3.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)

Allocate descriptor sets for pipeline.

Parameters
pipelinePipeline ID
Returns
Vector of allocated descriptor set IDs

Definition at line 979 of file RenderFlow.cpp.

981{
982 auto pipeline_it = m_pipelines.find(pipeline_id);
983 if (pipeline_it == m_pipelines.end()) {
985 "Invalid pipeline ID: {}", pipeline_id);
986 return {};
987 }
988
989 std::vector<DescriptorSetID> descriptor_set_ids;
990 for (const auto& layout : pipeline_it->second.layouts) {
991 auto ds_id = m_shader_foundry->allocate_descriptor_set(layout);
992 if (ds_id == INVALID_DESCRIPTOR_SET) {
994 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
995 return {};
996 }
997 descriptor_set_ids.push_back(ds_id);
998 }
999
1001 "Allocated {} descriptor sets for pipeline {}",
1002 descriptor_set_ids.size(), pipeline_id);
1003
1004 return descriptor_set_ids;
1005}
#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: