mesa: add EXT_texture_compression_latc
authorMarek Olšák <maraeo@gmail.com>
Mon, 7 Mar 2011 01:03:52 +0000 (02:03 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 8 Mar 2011 22:52:37 +0000 (23:52 +0100)
commit7d16e2c0cd70dc5a23b746dbc8e44c58366b5353
treedd8767ec968eebe4f8a75c0d53c4537e69a2d088
parent12fa91b6753dccbd3aa12c570d1f1e55c7dc0582
mesa: add EXT_texture_compression_latc

The encoding/decoding algorithms are shared with RGTC.
Thanks to some magic with the base format, the RGTC texstore functions work
for LATC too.

swrast passes the related piglit tests besides two things:
- The alpha channel is wrong (it's always 1), however the incorrect alpha
  channel makes some other tests fail too, so I guess it's unrelated to LATC.
- Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]),
  however RGTC has the same problem.

Further testing (with other of my patches) shows that hardware drivers
and softpipe work.

BTW, ETQW uses this extension.
13 files changed:
src/mesa/main/extensions.c
src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/image.c
src/mesa/main/mipmap.c
src/mesa/main/mtypes.h
src/mesa/main/texcompress.c
src/mesa/main/texcompress_rgtc.c
src/mesa/main/texcompress_rgtc.h
src/mesa/main/texfetch.c
src/mesa/main/texformat.c
src/mesa/main/teximage.c
src/mesa/main/texstore.c