st/mesa: Transcode ASTC to BC7 (BPTC) where possible
This MR adds support for transcoding ASTC to BC7 (BPTC) and prefers it over BC3 (DXT5) when hardware supports that format.
BC7 is a much newer format (~2009 vs. ~1999) and offers higher quality than the older BC3 format. Furthermore, our encoder seems to be faster.
@tpalli put together a small benchmark for transcoding a 1024x1024 ASTC texture, and switching from BC3 to BC7 improves performance of that microbenchmark by 25% on my Tigerlake NUC (with hardware ASTC disabled so we can test this path). Presumably, this isn't fundamental to the formats, but rather reflects the speed of our in-tree compressors.
So, we should use BC7 where possible.