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

◆ execute_shader()

void MayaFlux::Buffers::NodeBindingsProcessor::execute_shader ( const std::shared_ptr< VKBuffer > &  buffer)
overrideprotectedvirtual

Implements MayaFlux::Buffers::ShaderProcessor.

Definition at line 68 of file NodeBindingsProcessor.cpp.

69{
71
72 auto& entries = buffer->get_pipeline_context().push_constant_bindings;
73
74 for (const auto& [name, binding] : m_bindings) {
75 auto it = std::ranges::find_if(entries, [&](const auto& e) {
76 return e.offset == binding.push_constant_offset;
77 });
78
79 if (it == entries.end()) {
80 entries.push_back(Portal::Graphics::PushConstantBindingInfo {
81 .offset = binding.push_constant_offset,
82 .data = std::vector<uint8_t>(binding.size),
83 .name = name });
84 it = std::prev(entries.end());
85 }
86
87 const auto begin = m_push_constant_data.begin() + binding.push_constant_offset;
88 it->data.assign(begin, begin + binding.size);
89
91 "NodeBindingsProcessor: Merged binding '{}' at offset {} ({} bytes)",
92 name, binding.push_constant_offset, binding.size);
93 }
94}
#define MF_DEBUG(comp, ctx,...)
std::unordered_map< std::string, NodeBinding > m_bindings
std::vector< uint8_t > m_push_constant_data
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_bindings, MayaFlux::Buffers::ShaderProcessor::m_push_constant_data, MF_DEBUG, MayaFlux::Portal::Graphics::PushConstantBindingInfo::offset, and update_push_constants_from_nodes().

+ Here is the call graph for this function: