|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::optional< ImageData > MayaFlux::IO::download_image | ( | const std::shared_ptr< Core::VKImage > & | image | ) |
Download pixel data from a GPU-resident VKImage into host ImageData.
Performs a blocking GPU->host transfer via TextureLoom::download_data, allocating a host buffer of the appropriate variant for the image format. The source image is restored to eShaderReadOnlyOptimal / eFragmentShader after the copy; pass a different restore layout/stage via the overload if the image was, for example, in a compute write state.
Multi-layer and multi-mip images are downloaded at layer 0, mip 0 only. Array and mipmap export is a separate concern.
| image | Fully-initialized VKImage to read from. |
Definition at line 18 of file ImageExport.cpp.
References MayaFlux::Portal::Graphics::TextureLoom::download_image(), MayaFlux::Journal::FileIO, image, MayaFlux::Portal::Graphics::TextureLoom::instance(), MayaFlux::Journal::IO, and MF_ERROR.
Referenced by download_texture_buffer(), save_image(), and MayaFlux::IO::IOManager::save_image().
Here is the call graph for this function:
Here is the caller graph for this function: