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

◆ execute_shader()

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

Implements MayaFlux::Buffers::ShaderProcessor.

Definition at line 100 of file FormaBindingsProcessor.cpp.

101{
102 for (const auto& [name, b] : m_bindings) {
103 if (!b.reader) {
105 "FormaBindingsProcessor: binding '{}' has no reader", name);
106 continue;
107 }
108
109 const float value = b.reader();
110 switch (b.kind) {
112 if (b.pc)
113 flush_push_constant(value, *b.pc, buffer);
114 break;
116 if (b.desc)
117 flush_descriptor(value, *b.desc, buffer);
118 break;
119 }
120 }
121}
#define MF_RT_WARN(comp, ctx,...)
size_t b
void flush_descriptor(float value, const DescriptorTarget &desc, const std::shared_ptr< VKBuffer > &attached)
void flush_push_constant(float value, const PushConstantTarget &pc, const std::shared_ptr< VKBuffer > &buffer)
std::unordered_map< std::string, Binding > m_bindings
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References b, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, DESCRIPTOR, flush_descriptor(), flush_push_constant(), m_bindings, MF_RT_WARN, and PUSH_CONSTANT.

+ Here is the call graph for this function: