MayaFlux 0.4.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 268 of file StagingUtils.hpp.

272{
273 if (!accessor.is_structured()) {
274 error<std::invalid_argument>(
275 Journal::Component::Buffers,
276 Journal::Context::BufferProcessing,
277 std::source_location::current(),
278 "Cannot upload structured view from non-structured data");
279 }
280
281 auto structured_view = accessor.view<T>();
282 upload_to_gpu(structured_view.data(), structured_view.size_bytes(), target, staging);
283}
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: