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

◆ bind_descriptor_sets()

void MayaFlux::Portal::Graphics::RenderFlow::bind_descriptor_sets ( CommandBufferID  cmd_id,
RenderPipelineID  pipeline,
const std::vector< DescriptorSetID > &  descriptor_sets 
)

Bind descriptor sets.

Parameters
cmd_idCommand buffer ID
pipelinePipeline ID
descriptor_setsDescriptor set IDs

Definition at line 722 of file RenderFlow.cpp.

726{
727 auto pipeline_it = m_pipelines.find(pipeline_id);
728 if (pipeline_it == m_pipelines.end()) {
730 "Invalid pipeline ID: {}", pipeline_id);
731 return;
732 }
733
734 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
735 if (!cmd) {
737 "Invalid command buffer ID: {}", cmd_id);
738 return;
739 }
740
741 std::vector<vk::DescriptorSet> vk_sets;
742 vk_sets.reserve(descriptor_sets.size());
743 for (auto ds_id : descriptor_sets) {
744 vk_sets.push_back(m_shader_foundry->get_descriptor_set(ds_id));
745 }
746
747 cmd.bindDescriptorSets(
748 vk::PipelineBindPoint::eGraphics,
749 pipeline_it->second.layout,
750 0,
751 vk_sets,
752 nullptr);
753}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
vk::DescriptorSet get_descriptor_set(DescriptorSetID descriptor_set_id)
Get Vulkan descriptor set handle from DescriptorSetID.
vk::CommandBuffer get_command_buffer(CommandBufferID cmd_id)
Get Vulkan command buffer handle from CommandBufferID.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.

References MayaFlux::Portal::Graphics::ShaderFoundry::get_command_buffer(), MayaFlux::Portal::Graphics::ShaderFoundry::get_descriptor_set(), m_pipelines, m_shader_foundry, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Journal::Rendering.

+ Here is the call graph for this function: