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

◆ bind_descriptor_sets()

void MayaFlux::Portal::Graphics::ComputePress::bind_descriptor_sets ( CommandBufferID  cmd_id,
ComputePipelineID  pipeline_id,
const std::vector< DescriptorSetID > &  descriptor_set_ids 
)

Bind descriptor sets to active command buffer.

Definition at line 233 of file ComputePress.cpp.

237{
238 auto pipeline_it = m_pipelines.find(pipeline_id);
239 if (pipeline_it == m_pipelines.end()) {
241 "Invalid pipeline ID: {}", pipeline_id);
242 return;
243 }
244
245 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
246 if (!cmd) {
248 "Invalid command buffer ID: {}", cmd_id);
249 return;
250 }
251
252 std::vector<vk::DescriptorSet> vk_sets;
253 for (auto ds_id : descriptor_set_ids) {
254 vk_sets.push_back(m_shader_foundry->get_descriptor_set(ds_id));
255 }
256
257 pipeline_it->second.pipeline->bind_descriptor_sets(cmd, vk_sets);
258}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< ComputePipelineID, 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.
@ GPUCompute
GPU compute operations (shaders, GPGPU tasks)
@ Portal
High-level user-facing API layer.

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

Referenced by bind_all().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: