From 7d16e2c0cd70dc5a23b746dbc8e44c58366b5353 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 7 Mar 2011 02:03:52 +0100 Subject: 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. --- src/mesa/main/texcompress_rgtc.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mesa/main/texcompress_rgtc.h') diff --git a/src/mesa/main/texcompress_rgtc.h b/src/mesa/main/texcompress_rgtc.h index 424edc4581..18766770d7 100644 --- a/src/mesa/main/texcompress_rgtc.h +++ b/src/mesa/main/texcompress_rgtc.h @@ -57,4 +57,21 @@ _mesa_fetch_texel_2d_f_rg_rgtc2(const struct gl_texture_image *texImage, extern void _mesa_fetch_texel_2d_f_signed_rg_rgtc2(const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_l_latc1(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_signed_l_latc1(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_la_latc2(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + +extern void +_mesa_fetch_texel_2d_f_signed_la_latc2(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel); + #endif -- cgit v1.2.3