[Impeller] Support rendering compressed texture formats / add capability to detect support. #148443
Labels
c: new feature
Nothing broken; request for a new capability
e: impeller
Impeller rendering backend issues and features requests
P3
Issues that are less important to the Flutter project
team-engine
Owned by Engine team
triaged-engine
Triaged by Engine team
I think that we could fairly easily add support for compressed image formats to Impeller, at least on the Vulkan and Metal backends.
Vulkan: https://docs.vulkan.org/spec/latest/appendices/compressedtex.html
iOS: https://developer.apple.com/documentation/metal/mtlpixelformat/mtlpixelformatastc_6x6_hdr?language=objc
I'm not sure what the actual level of device support is on Vulkan and would need to do some research. For iOS, there is a handy feature set table here: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf . We could look at the intersection of minimum supported formats as a starting point.
These formats specify how pixel data is compressed, but don't include header information on the format/size like commonly used network image formats like PNG/JPEG. This metadata would need to be provided by the application. I'm not sure if there are other standards here like ASTC in PNG or if the expectation is that the application level logic will handle transport compression/bundling.
For example, a low-level dart:ui API for decompressing.
Then some higher level Image provider API:
For testing/evaluating, there is an open source ASTC compressor developed by ARM available at https://github.com/ARM-software/astc-encoder.
Some caveats:
The text was updated successfully, but these errors were encountered: