MayaFlux 0.2.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 755 of file RenderFlow.cpp.

760{
761 auto pipeline_it = m_pipelines.find(pipeline_id);
762 if (pipeline_it == m_pipelines.end()) {
764 "Invalid pipeline ID: {}", pipeline_id);
765 return;
766 }
767
768 auto cmd = m_shader_foundry->get_command_buffer(cmd_id);
769 if (!cmd) {
771 "Invalid command buffer ID: {}", cmd_id);
772 return;
773 }
774
775 cmd.pushConstants(
776 pipeline_it->second.layout,
777 vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eFragment,
778 0,
779 static_cast<uint32_t>(size),
780 data);
781}
#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: