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

◆ push_constants()

void MayaFlux::Portal::Graphics::ComputePress::push_constants ( CommandBufferID  cmd_id,
ComputePipelineID  pipeline_id,
const void *  data,
size_t  size 
)

Push constants to active command buffer.

Definition at line 284 of file ComputePress.cpp.

289{
290 auto pipeline_it = m_pipelines.find(pipeline_id);
291 if (pipeline_it == m_pipelines.end()) {
293 "Invalid pipeline ID: {}", pipeline_id);
294 return;
295 }
296
297 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
298 if (!cmd) {
300 "Invalid command buffer ID: {}", cmd_id);
301 return;
302 }
303
304 pipeline_it->second.pipeline->push_constants(
305 cmd,
306 vk::ShaderStageFlagBits::eCompute,
307 0,
308 static_cast<uint32_t>(size),
309 data);
310}
#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: