MayaFlux 0.2.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 895 of file RenderFlow.cpp.

897{
898 auto pipeline_it = m_pipelines.find(pipeline_id);
899 if (pipeline_it == m_pipelines.end()) {
901 "Invalid pipeline ID: {}", pipeline_id);
902 return {};
903 }
904
905 std::vector<DescriptorSetID> descriptor_set_ids;
906 for (const auto& layout : pipeline_it->second.layouts) {
907 auto ds_id = m_shader_foundry->allocate_descriptor_set(layout);
908 if (ds_id == INVALID_DESCRIPTOR_SET) {
910 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
911 return {};
912 }
913 descriptor_set_ids.push_back(ds_id);
914 }
915
917 "Allocated {} descriptor sets for pipeline {}",
918 descriptor_set_ids.size(), pipeline_id);
919
920 return descriptor_set_ids;
921}
#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: