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

◆ download_from_gpu() [2/3]

template<typename T >
void MayaFlux::Buffers::download_from_gpu ( const std::shared_ptr< VKBuffer > &  source,
std::vector< T > &  data,
const std::shared_ptr< VKBuffer > &  staging = nullptr 
)

Download from GPU buffer to vector.

Template Parameters
TData type
Parameters
sourceSource GPU buffer
dataDestination data vector (resized if needed)
stagingOptional staging buffer

Definition at line 152 of file StagingUtils.hpp.

156{
157 size_t element_count = source->get_size_bytes() / sizeof(T);
158 data.resize(element_count);
159 download_from_gpu(source, std::span<T>(data), staging);
160}
void download_from_gpu(const std::shared_ptr< VKBuffer > &source, void *data, size_t size, const std::shared_ptr< VKBuffer > &staging)
Download from GPU buffer to raw data (auto-detects host-visible vs device-local)

References download_from_gpu().

+ Here is the call graph for this function: