MayaFlux 0.2.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 353 of file ComputePress.cpp.

354{
355 auto pipeline_it = m_pipelines.find(pipeline_id);
356 if (pipeline_it == m_pipelines.end()) {
358 "Invalid pipeline ID: {}", pipeline_id);
359 return {};
360 }
361
362 std::vector<DescriptorSetID> descriptor_set_ids;
363 for (const auto& layout : pipeline_it->second.layouts) {
364 auto ds_id = m_shader_foundry->allocate_descriptor_set(layout);
365 if (ds_id == INVALID_DESCRIPTOR_SET) {
367 "Failed to allocate descriptor set for pipeline {}", pipeline_id);
368 return {};
369 }
370 descriptor_set_ids.push_back(ds_id);
371 }
372
374 "Allocated {} descriptor sets for pipeline {}",
375 descriptor_set_ids.size(), pipeline_id);
376
377 return descriptor_set_ids;
378}
#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: