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

◆ allocate_fields()

void MayaFlux::Buffers::VolumeGridBuffer::allocate_fields ( const std::vector< FieldDecl > &  decls)
private

Populate m_fields from declarations.

Parameters
declsField declarations in declaration order.

Definition at line 140 of file VolumeGridBuffer.cpp.

141{
142 for (const auto& decl : decls) {
143 allocate_field(decl.name, decl.stride_bytes, decl.double_buffered);
144 }
145
146 if (m_fields.empty()) {
147 error<std::runtime_error>(
150 std::source_location::current(),
151 "VolumeGridBuffer constructed with no valid fields");
152 }
153
155 "VolumeGridBuffer: {}x{}x{} lattice, {} fields, {} slots",
157 m_fields.size(), get_buffer_resources().back_buffers.size());
158}
#define MF_INFO(comp, ctx,...)
const VKBufferResources & get_buffer_resources() const
Get all buffer resources at once (read-only)
Definition VKBuffer.hpp:341
std::unordered_map< std::string, Field > m_fields
bool allocate_field(const std::string &name, size_t stride_bytes, bool double_buffered)
Allocate one field's slots and register it.
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.
glm::uvec3 resolution
Cell count per axis. Zero on any axis is invalid.
Definition Lattice.hpp:26

References allocate_field(), MayaFlux::Journal::Buffers, MayaFlux::Buffers::VKBuffer::get_buffer_resources(), MayaFlux::Journal::Init, m_fields, m_lattice, MF_INFO, and MayaFlux::Kinesis::Lattice3D::resolution.

Referenced by VolumeGridBuffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: