MayaFlux 0.4.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 814 of file RenderFlow.cpp.

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