|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Buffers::ShaderProcessor::feed | ( | const std::string & | name, |
| FeedSource | source, | ||
| uint32_t | offset, | ||
| size_t | size = sizeof(float), |
||
| bool | early = true |
||
| ) |
Supply a push constant from a callable at an explicit offset.
| name | Logical name, used for removal and error reporting. Need not match anything on the shader. |
| source | Callable returning a double or a GpuValue. |
| offset | Byte offset in the push constant block. |
| size | Byte width written for a double. Four narrows to float, eight keeps double. Other values are rejected. A GpuValue writes its own width and ignores this. |
| early | True writes at the top of processing_function. False writes after the final on_before_execute of a compute dispatch, which is the only way a value survives a processor that rewrites its whole push constant block there. Other dispatch kinds ignore false. |
The form hand-written shaders need, since their push constant block is described nowhere the processor can read.
Definition at line 265 of file ShaderProcessor.cpp.
References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_feeds, MF_ERROR, name, offset, and size.