summaryrefslogtreecommitdiff
path: root/src/mesa/main/texfetch.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-02-22 10:35:15 +1000
committerDave Airlie <airlied@redhat.com>2011-02-28 13:35:34 +1000
commit8d47c919859e9cd90cfc04eb220ac8a5aa87048e (patch)
tree4f7a1e4148d8268f32f2d0ca63becf50da56181a /src/mesa/main/texfetch.c
parente792e79f5ae6be008d9521eccf1c647492cd682a (diff)
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 <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/texfetch.c')
-rw-r--r--src/mesa/main/texfetch.c31
1 files changed, 30 insertions, 1 deletions
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
+ },
};