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

◆ upload_structured_view()

template<typename T >
requires GlmType<T>
void MayaFlux::Buffers::upload_structured_view ( const Kakshya::DataAccess accessor,
const std::shared_ptr< VKBuffer > &  target,
const std::shared_ptr< VKBuffer > &  staging = nullptr 
)

Upload structured data with GLM double-precision types.

Template Parameters
TGLM type (glm::dvec2, glm::dvec3, glm::dvec4 for double precision)
Parameters
accessorDataAccess with structured dimensions
targetTarget GPU buffer
stagingOptional staging buffer

Use this for high-precision structured data like audio samples interpreted as multi-dimensional vectors. Supports both single and double precision GLM types.

Definition at line 220 of file StagingUtils.hpp.

224{
225 if (!accessor.is_structured()) {
226 error<std::invalid_argument>(
227 Journal::Component::Buffers,
228 Journal::Context::BufferProcessing,
229 std::source_location::current(),
230 "Cannot upload structured view from non-structured data");
231 }
232
233 auto structured_view = accessor.view<T>();
234 upload_to_gpu(structured_view.data(), structured_view.size_bytes(), target, staging);
235}
auto view() const
Get explicit typed view of data.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Kakshya::DataAccess::is_structured(), upload_to_gpu(), and MayaFlux::Kakshya::DataAccess::view().

+ Here is the call graph for this function: