MayaFlux 0.1.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 260 of file ComputePress.cpp.

265{
266 auto pipeline_it = m_pipelines.find(pipeline_id);
267 if (pipeline_it == m_pipelines.end()) {
269 "Invalid pipeline ID: {}", pipeline_id);
270 return;
271 }
272
273 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
274 if (!cmd) {
276 "Invalid command buffer ID: {}", cmd_id);
277 return;
278 }
279
280 pipeline_it->second.pipeline->push_constants(
281 cmd,
282 vk::ShaderStageFlagBits::eCompute,
283 0,
284 static_cast<uint32_t>(size),
285 data);
286}
#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: