|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::span< const float > MayaFlux::Buffers::download_and_normalise | ( | const std::shared_ptr< Core::VKImage > & | image, |
| std::vector< uint8_t > & | raw_staging, | ||
| std::vector< float > & | work, | ||
| const std::shared_ptr< VKBuffer > & | gpu_staging | ||
| ) |
Download a VKImage to CPU and return a normalised float span.
Downloads image into raw_staging via TextureLoom::download_data, then normalises into work via Kakshya::as_normalised_float.
raw_staging is resized to match the image byte footprint when the image dimensions or format change. work is the caller-owned scratch buffer reused across calls to avoid per-frame allocation.
Returns an empty span if image is null, not initialised, or its format has no ImageFormat mapping.
| image | GPU-resident source image. |
| raw_staging | Persistent byte buffer for the GPU download. Reuse across calls. |
| work | Persistent float buffer for normalisation output. Reuse across calls. |
| gpu_staging | Optional persistent staging buffer for device-local images. Reuse across calls. |
work (or directly into the variant storage for float-format images). Definition at line 454 of file StagingUtils.cpp.
References MayaFlux::Kakshya::as_normalised_float(), image, and MayaFlux::Portal::Graphics::TextureLoom::instance().
Referenced by MayaFlux::Buffers::ImageCVProcessor< T >::processing_function().
Here is the call graph for this function:
Here is the caller graph for this function: