diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2022-02-15 12:47:49 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-04-13 07:58:11 +0000 |
commit | 68ef895674b176b4faf875a4d7f4d787b330d4d9 (patch) | |
tree | 631bc5156e34e0e816b5416b50b83c8fb3d5c8bc /src/mesa/state_tracker/st_context.h | |
parent | d4521a2515c16e7e1c876c4556821cddaae7bdd7 (diff) |
st/mesa: Transcode ASTC to BC7 (BPTC) where possible
This patch 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.
Tapani 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.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15875>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 5f422769615..4c8c838ad10 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -140,7 +140,8 @@ struct st_context boolean has_etc1; boolean has_etc2; boolean transcode_etc; - boolean transcode_astc; + boolean transcode_astc_to_bptc; + boolean transcode_astc_to_dxt5; boolean has_astc_2d_ldr; boolean has_astc_5x5_ldr; boolean prefer_blit_based_texture_transfer; |