gallivm: fix broken 8-wide s3tc decoding
authorRoland Scheidegger <sroland@vmware.com>
Tue, 7 May 2019 00:11:08 +0000 (02:11 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Tue, 7 May 2019 16:59:38 +0000 (18:59 +0200)
commit748f603390bdfec129bc73d3d2608db20f1571ae
tree3bb5c0379d79233ef763ebec58cff7a8adb17066
parent92dba1c66e62281abd23232765015220055f2657
gallivm: fix broken 8-wide s3tc decoding

Brian noticed there was an uninitialized var for the 8-wide case and 128
bit blocks, which made it always crash. Likewise, the 64bit block case
had another crash bug due to type mismatch.
Color decode (used for all s3tc formats) also had a bogus shuffle for
this case, leading to decode artifacts.
Fix these all up, which makes the code actually work 8-wide. Note that
it's still not used - I've verified it works, and the generated assembly
does look quite a bit simpler actually (20-30% less instructions for the
s3tc decode part with avx2), however in practice it still seems to be
sligthly slower for some unknown reason (tested with openarena) on my
haswell box, so for now continue to split things into 4-wide vectors
before decoding.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c