MayaFlux 1.0.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,
uint32_t  first_set = 0 
)

Bind descriptor sets.

Parameters
cmd_idCommand buffer ID
pipelinePipeline ID
descriptor_setsDescriptor set IDs
first_setFirst set index in pipeline layout (default: 0)

Definition at line 819 of file RenderFlow.cpp.

824{
825 auto pipeline_it = m_pipelines.find(pipeline_id);
826 if (pipeline_it == m_pipelines.end()) {
828 "Invalid pipeline ID: {}", pipeline_id);
829 return;
830 }
831
833 if (!cmd) {
835 "Invalid command buffer ID: {}", cmd_id);
836 return;
837 }
838
839 std::vector<vk::DescriptorSet> vk_sets;
840 vk_sets.reserve(descriptor_sets.size());
841 for (auto ds_id : descriptor_sets) {
842 vk_sets.push_back(m_shader_foundry->get_descriptor_set(ds_id));
843 }
844
845 cmd.bindDescriptorSets(
846 vk::PipelineBindPoint::eGraphics,
847 pipeline_it->second.layout,
848 first_set,
849 vk_sets,
850 nullptr);
851}
#define MF_ERROR(comp, ctx,...)
vk::CommandBuffer cmd
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 cmd, 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: