From 8d47c919859e9cd90cfc04eb220ac8a5aa87048e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 22 Feb 2011 10:35:15 +1000 Subject: mesa: Add RGTC texture store/fetch support. This adds support for the RGTC unsigned and signed texture storage and fetch methods. the code is a port of the DXT5 alpha compression code. Signed-off-by: Dave Airlie --- src/mesa/main/texfetch.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/texfetch.c') diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c index 8aa1e4970d..550597e1cd 100644 --- a/src/mesa/main/texfetch.c +++ b/src/mesa/main/texfetch.c @@ -38,6 +38,7 @@ #include "texcompress.h" #include "texcompress_fxt1.h" #include "texcompress_s3tc.h" +#include "texcompress_rgtc.h" #include "texfetch.h" #include "teximage.h" @@ -756,7 +757,35 @@ texfetch_funcs[MESA_FORMAT_COUNT] = fetch_texel_2d_rgba_16, fetch_texel_3d_rgba_16, store_texel_rgba_16 - } + }, + { + MESA_FORMAT_RED_RGTC1, + NULL, + _mesa_fetch_texel_2d_f_red_rgtc1, + NULL, + NULL + }, + { + MESA_FORMAT_SIGNED_RED_RGTC1, + NULL, + _mesa_fetch_texel_2d_f_signed_red_rgtc1, + NULL, + NULL + }, + { + MESA_FORMAT_RG_RGTC2, + NULL, + _mesa_fetch_texel_2d_f_rg_rgtc2, + NULL, + NULL + }, + { + MESA_FORMAT_SIGNED_RG_RGTC2, + NULL, + _mesa_fetch_texel_2d_f_signed_rg_rgtc2, + NULL, + NULL + }, }; -- cgit v1.2.3