MayaFlux 0.3.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 776 of file RenderFlow.cpp.

780{
781 auto pipeline_it = m_pipelines.find(pipeline_id);
782 if (pipeline_it == m_pipelines.end()) {
784 "Invalid pipeline ID: {}", pipeline_id);
785 return;
786 }
787
788 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
789 if (!cmd) {
791 "Invalid command buffer ID: {}", cmd_id);
792 return;
793 }
794
795 std::vector<vk::DescriptorSet> vk_sets;
796 vk_sets.reserve(descriptor_sets.size());
797 for (auto ds_id : descriptor_sets) {
798 vk_sets.push_back(m_shader_foundry->get_descriptor_set(ds_id));
799 }
800
801 cmd.bindDescriptorSets(
802 vk::PipelineBindPoint::eGraphics,
803 pipeline_it->second.layout,
804 0,
805 vk_sets,
806 nullptr);
807}
#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: