MayaFlux 1.0.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 145 of file VolumeGridBuffer.cpp.

146{
147 for (const auto& decl : decls) {
148 allocate_field(decl.name, decl.stride_bytes, decl.double_buffered, decl.semantics);
149 }
150
151 if (m_fields.empty()) {
152 error<std::runtime_error>(
155 std::source_location::current(),
156 "VolumeGridBuffer constructed with no valid fields");
157 }
158
160 "VolumeGridBuffer: {}x{}x{} lattice, {} fields, {} slots",
162 m_fields.size(), get_buffer_resources().back_buffers.size());
163}
#define MF_INFO(comp, ctx,...)
const VKBufferResources & get_buffer_resources() const
Get all buffer resources at once (read-only)
Definition VKBuffer.hpp:343
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: