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

◆ allocate_pipeline_descriptors()

std::vector< DescriptorSetID > MayaFlux::Portal::Graphics::ComputePress::allocate_pipeline_descriptors ( ComputePipelineID  pipeline_id)

All-in-one: allocate descriptors for pipeline.

Definition at line 329 of file ComputePress.cpp.

330{
331 auto pipeline_it = m_pipelines.find(pipeline_id);
332 if (pipeline_it == m_pipelines.end()) {
334 "Invalid pipeline ID: {}", pipeline_id);
335 return {};
336 }
337
338 std::vector<DescriptorSetID> descriptor_set_ids;
339 for (const auto& layout : pipeline_it->second.layouts) {
340 auto ds_id = m_shader_foundry->allocate_descriptor_set(layout);
341 if (ds_id == INVALID_DESCRIPTOR_SET) {
343 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
344 return {};
345 }
346 descriptor_set_ids.push_back(ds_id);
347 }
348
350 "Allocated {} descriptor sets for pipeline {}",
351 descriptor_set_ids.size(), pipeline_id);
352
353 return descriptor_set_ids;
354}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::unordered_map< ComputePipelineID, PipelineState > m_pipelines
DescriptorSetID allocate_descriptor_set(vk::DescriptorSetLayout layout)
Allocate descriptor set for a pipeline.
@ GPUCompute
GPU compute operations (shaders, GPGPU tasks)
@ Portal
High-level user-facing API layer.
constexpr DescriptorSetID INVALID_DESCRIPTOR_SET

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

+ Here is the call graph for this function: