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

◆ push_constants()

void MayaFlux::Portal::Graphics::RenderFlow::push_constants ( CommandBufferID  cmd_id,
RenderPipelineID  pipeline,
const void *  data,
size_t  size 
)

Push constants.

Parameters
cmd_idCommand buffer ID
pipelinePipeline ID
dataConstant data
sizeData size in bytes

Definition at line 809 of file RenderFlow.cpp.

814{
815 auto pipeline_it = m_pipelines.find(pipeline_id);
816 if (pipeline_it == m_pipelines.end()) {
818 "Invalid pipeline ID: {}", pipeline_id);
819 return;
820 }
821
822 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
823 if (!cmd) {
825 "Invalid command buffer ID: {}", cmd_id);
826 return;
827 }
828
829 cmd.pushConstants(
830 pipeline_it->second.layout,
831 pipeline_it->second.push_constant_stages,
832 0,
833 static_cast<uint32_t>(size),
834 data);
835}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
vk::CommandBuffer get_command_buffer(CommandBufferID cmd_id)
Get Vulkan command buffer handle from CommandBufferID.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.

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

+ Here is the call graph for this function: