[Impeller] Investigate if lossy texture compression makes sense for Flutter.

This issue has been tracked since 2023-03-17.

Introduced in iOS 15+ on select devices, MTLTextureCompressionTypeLossy yields texture memory savings of ~100 MB in the Flutter Gallery.

Investigate if Impeller can opt-into using these textures for some (intermediates) or all textures.

chinmaygarde wrote this answer on 2023-03-17

cc @jonahwilliams who found the savings in gallery and @bdero for ideas on the intermediates that we should definitely use this on. We could perhaps add this option to impeller::TextureDescriptor.

bdero wrote this answer on 2023-03-18

I don't know the characteristics of the lossy compression here, but we can probably get away with aggressive compression on lossy filters and their input snapshots (like the gaussian blur, which is just a pure low pass filter) with results that are indistinguishable from the lossless result.

jonahwilliams wrote this answer on 2023-03-18
jonahwilliams wrote this answer on 2023-03-18

In terms of operations, lossy textures can be render targets, can be the source or destination of blit operations, and can be sampled and read. However, they cannot be used with shader write operations, which precludes some compute use cases.

Finally, lossy textures must use the private storage mode; they cannot be in shared or managed storage. This implies that reading back texture data on the CPU will entail an additional blit operation (along with the usual latency-stall tradeoff).

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2023-03-30
Star Count 151602
Watcher Count 3555
Fork Count 25000
Issue Count 11498

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date