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

◆ readable_format()

std::optional< ImageFormat > MayaFlux::Portal::Graphics::TextureLoom::readable_format ( const std::shared_ptr< Core::VKImage > &  image)
static

ImageFormat of an image that can be read back as one flat block.

Requires an initialised 2D image of one layer and depth 1 with a transfer-source usage, a format with an ImageFormat mapping that is not combined depth-stencil, and a nonzero base level that fits the image's allocation. The base level's byte count is calculate_image_size(width, height, 1, format).

Checks structure only: it says nothing about the image's current layout or whether anything has been written to it.

Returns
The format, or nullopt when any requirement is not met.

Definition at line 1065 of file TextureLoom.cpp.

1067{
1068 return transfer_format(image, vk::ImageUsageFlagBits::eTransferSrc);
1069}
IO::ImageData image
Definition Decoder.cpp:47
static std::optional< ImageFormat > transfer_format(const std::shared_ptr< Core::VKImage > &image, vk::ImageUsageFlagBits required_usage)

References image, and transfer_format().

Referenced by download_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: