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

◆ bind_pipeline()

void MayaFlux::Portal::Graphics::ComputePress::bind_pipeline ( CommandBufferID  cmd_id,
ComputePipelineID  pipeline_id 
)

Bind pipeline to active command buffer.

Definition at line 238 of file ComputePress.cpp.

239{
240 auto pipeline_it = m_pipelines.find(pipeline_id);
241 if (pipeline_it == m_pipelines.end()) {
243 "Invalid pipeline ID: {}", pipeline_id);
244 return;
245 }
246
247 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
248 if (!cmd) {
250 "Invalid command buffer ID: {}", cmd_id);
251 return;
252 }
253
254 pipeline_it->second.pipeline->bind(cmd);
255}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< ComputePipelineID, PipelineState > m_pipelines
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::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: