MayaFlux 0.1.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 803 of file RenderFlow.cpp.

808{
809 auto pipeline_it = m_pipelines.find(pipeline_id);
810 if (pipeline_it == m_pipelines.end()) {
812 "Invalid pipeline ID: {}", pipeline_id);
813 return;
814 }
815
816 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
817 if (!cmd) {
819 "Invalid command buffer ID: {}", cmd_id);
820 return;
821 }
822
823 cmd.pushConstants(
824 pipeline_it->second.layout,
825 vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment,
826 0,
827 static_cast<uint32_t>(size),
828 data);
829}
#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: