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

◆ push_constants() [1/2]

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 290 of file ComputePress.cpp.

295{
296 auto pipeline_it = m_pipelines.find(pipeline_id);
297 if (pipeline_it == m_pipelines.end()) {
299 "Invalid pipeline ID: {}", pipeline_id);
300 return;
301 }
302
304 if (!cmd) {
306 "Invalid command buffer ID: {}", cmd_id);
307 return;
308 }
309
310 pipeline_it->second.pipeline->push_constants(
311 cmd,
312 vk::ShaderStageFlagBits::eCompute,
313 0,
314 static_cast<uint32_t>(size),
315 data);
316}
#define MF_ERROR(comp, ctx,...)
vk::CommandBuffer cmd
bool size
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 cmd, MayaFlux::Portal::Graphics::ShaderFoundry::get_command_buffer(), MayaFlux::Journal::GPUCompute, m_pipelines, m_shader_foundry, MF_ERROR, MayaFlux::Journal::Portal, and size.

Referenced by bind_all().

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