Also remove the unused initialization and GLchan fetch functions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
#if FEATURE_texture_s3tc
_mesa_init_texture_s3tc( ctx );
#endif
-#if FEATURE_texture_fxt1
- _mesa_init_texture_fxt1( ctx );
-#endif
/* Miscellaneous */
ctx->NewState = _NEW_ALL;
extern void
_mesa_init_texture_s3tc( GLcontext *ctx );
-extern void
-_mesa_init_texture_fxt1( GLcontext *ctx );
-
#else /* _HAVE_FULL_GL */
#include "texstore.h"
+#if FEATURE_texture_fxt1
+
+
static void
fxt1_encode (GLuint width, GLuint height, GLint comps,
const void *source, GLint srcRowStride,
GLint i, GLint j, GLchan *rgba);
-/**
- * Called during context initialization.
- */
-void
-_mesa_init_texture_fxt1( GLcontext *ctx )
-{
- (void) ctx;
-}
-
-
/**
* Store user's image in rgb_fxt1 format.
*/
}
-void
-_mesa_fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
-{
- (void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
-}
-
-
void
_mesa_fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
}
-void
-_mesa_fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
-{
- (void) k;
- fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
- texel[ACOMP] = 255;
-}
-
-
void
_mesa_fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
decode_1[mode](code, t, rgba);
}
+
+
+#endif /* FEATURE_texture_fxt1 */
#ifndef TEXCOMPRESS_FXT1_H
#define TEXCOMPRESS_FXT1_H
+#include "main/mtypes.h"
#include "texstore.h"
+#if FEATURE_texture_fxt1
+
extern GLboolean
_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS);
extern GLboolean
_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
-extern void
-_mesa_fetch_texel_2d_rgba_fxt1(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel);
-
extern void
_mesa_fetch_texel_2d_f_rgba_fxt1(const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
-extern void
-_mesa_fetch_texel_2d_rgb_fxt1(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel);
-
extern void
_mesa_fetch_texel_2d_f_rgb_fxt1(const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
+#else /* FEATURE_texture_fxt1 */
+
+/* these are used only in texstore_funcs[] */
+#define _mesa_texstore_rgb_fxt1 NULL
+#define _mesa_texstore_rgba_fxt1 NULL
+
+/* these are used only in texfetch_funcs[] */
+#define _mesa_fetch_texel_2d_f_rgba_fxt1 NULL
+#define _mesa_fetch_texel_2d_f_rgb_fxt1 NULL
+
+#endif /* FEATURE_texture_fxt1 */
#endif /* TEXCOMPRESS_FXT1_H */