MayaFlux 1.0.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 404 of file ComputePress.cpp.

405{
406 auto pipeline_it = m_pipelines.find(pipeline_id);
407 if (pipeline_it == m_pipelines.end()) {
409 "Invalid pipeline ID: {}", pipeline_id);
410 return {};
411 }
412
413 std::vector<DescriptorSetID> descriptor_set_ids;
414 for (const auto& layout : pipeline_it->second.layouts) {
415 auto ds_id = m_shader_foundry->allocate_descriptor_set(layout);
416 if (ds_id == INVALID_DESCRIPTOR_SET) {
418 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
419 return {};
420 }
421 descriptor_set_ids.push_back(ds_id);
422 }
423
425 "Allocated {} descriptor sets for pipeline {}",
426 descriptor_set_ids.size(), pipeline_id);
427
428 return descriptor_set_ids;
429}
#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: