ail: use is_level_compressed

to get unit testing coverage. identified several bugs!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26963>
This commit is contained in:
Alyssa Rosenzweig 2023-12-06 17:38:08 -04:00
parent 67d92e0bb6
commit 8dcdf5040b

View file

@ -220,7 +220,7 @@ ail_initialize_compression(struct ail_layout *layout)
unsigned compbuf_B = 0;
for (unsigned l = 0; l < layout->levels; ++l) {
if (width_sa < 16 && height_sa < 16)
if (!ail_is_level_compressed(layout, l))
break;
layout->level_offsets_compressed_B[l] = compbuf_B;