MayaFlux 0.1.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 770 of file RenderFlow.cpp.

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