|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Buffers::NetworkGeometryBuffer::declare_state | ( | const std::string & | name, |
| size_t | element_count, | ||
| size_t | stride_bytes, | ||
| bool | double_buffered = true |
||
| ) |
Declare a named auxiliary state field alongside the vertex data.
| name | Lookup key, unique within this buffer. |
| element_count | Number of elements the field holds. Fixed at declaration: it does not track later growth of the vertex buffer itself, since NetworkGeometryProcessor's resize path (1.5x headroom on overflow) has no knowledge of declared state fields. Declare at the network's expected particle count. |
| stride_bytes | Bytes per element. |
| double_buffered | False resolves read and write to one slot, which suits a value recomputed from other state each cycle. |
Mirrors VolumeGridBuffer::allocate_field: storage lives as raw handle pairs in the base VKBuffer's back_buffers, addressed by name rather than wrapped in a VKBuffer of its own. A processor resolves the handle it needs through read_state_handle/write_state_handle and writes its own descriptor directly against ShaderFoundry, the way VolumeFieldProcessor does for volume fields, rather than going through bind_buffer or the buffer's shared pipeline_context.
Definition at line 255 of file NetworkGeometryBuffer.cpp.
References MayaFlux::Buffers::VKBufferResources::GenerationSlot::buffer, MayaFlux::Journal::Buffers, MayaFlux::Buffers::NetworkGeometryBuffer::StateField::element_count, MayaFlux::Buffers::VKBuffer::get_buffer_resources(), MayaFlux::Registry::BackendRegistry::get_service(), MayaFlux::Journal::Init, MayaFlux::Registry::BackendRegistry::instance(), m_state_fields, MayaFlux::Buffers::VKBufferResources::GenerationSlot::mapped_ptr, MayaFlux::Buffers::VKBufferResources::GenerationSlot::memory, MF_DEBUG, MF_ERROR, and name.
Referenced by ensure_cluster_ids().
Here is the call graph for this function:
Here is the caller graph for this function: