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

◆ bind_typed_push_constant()

void MayaFlux::Buffers::FormaBindingsProcessor::bind_typed_push_constant ( const std::string &  name,
std::function< Kakshya::GpuValue()>  reader,
uint32_t  offset 
)

Bind a typed reader to a push constant slot.

The value is written as its own format's bytes at the offset, with no conversion, so vectors and matrices keep every component. The slot is as wide as the value each tick.

Parameters
nameLogical binding name.
readerCallable returning the current value each tick.
offsetByte offset in the push constant struct.

Definition at line 74 of file FormaBindingsProcessor.cpp.

78{
79 if (!reader) {
81 "FormaBindingsProcessor::bind_typed_push_constant: null reader for '{}'", name);
82 return;
83 }
84
86 auto& b = m_bindings[name];
88 b.reader = nullptr;
89 b.typed_reader = std::move(reader);
90 b.pc = PushConstantTarget { .offset = offset, .size = 0 };
91 b.desc.reset();
92}
#define MF_ERROR(comp, ctx,...)
uint64_t offset
Definition Composite.cpp:10
size_t b
std::string name
Definition VKDevice.cpp:123
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, m_bindings, MF_ERROR, name, MayaFlux::Buffers::FormaBindingsProcessor::PushConstantTarget::offset, offset, PUSH_CONSTANT, and release().

+ Here is the call graph for this function: