mesa/main: Make FEATURE_texture_s3tc follow feature conventions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
#include "simple_list.h"
|
||||
#include "state.h"
|
||||
#include "stencil.h"
|
||||
#include "texcompress.h"
|
||||
#include "texcompress_s3tc.h"
|
||||
#include "teximage.h"
|
||||
#include "texobj.h"
|
||||
#include "texstate.h"
|
||||
@@ -703,9 +703,7 @@ init_attrib_groups(GLcontext *ctx)
|
||||
if (!_mesa_init_texture( ctx ))
|
||||
return GL_FALSE;
|
||||
|
||||
#if FEATURE_texture_s3tc
|
||||
_mesa_init_texture_s3tc( ctx );
|
||||
#endif
|
||||
|
||||
/* Miscellaneous */
|
||||
ctx->NewState = _NEW_ALL;
|
||||
|
||||
@@ -44,11 +44,6 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img,
|
||||
gl_format mesaFormat,
|
||||
GLsizei width, const GLubyte *image);
|
||||
|
||||
|
||||
extern void
|
||||
_mesa_init_texture_s3tc( GLcontext *ctx );
|
||||
|
||||
|
||||
#else /* _HAVE_FULL_GL */
|
||||
|
||||
/* no-op macros */
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
#include "texcompress_s3tc.h"
|
||||
#include "texstore.h"
|
||||
|
||||
|
||||
#if FEATURE_texture_s3tc
|
||||
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define DXTN_LIBNAME "dxtn.dll"
|
||||
#define RTLD_LAZY 0
|
||||
@@ -564,5 +568,7 @@ _mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
|
||||
texel[BCOMP] = nonlinear_to_linear(rgba[BCOMP]);
|
||||
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
|
||||
}
|
||||
#endif
|
||||
#endif /* FEATURE_EXT_texture_sRGB */
|
||||
|
||||
|
||||
#endif /* FEATURE_texture_s3tc */
|
||||
|
||||
@@ -25,8 +25,12 @@
|
||||
#ifndef TEXCOMPRESS_S3TC_H
|
||||
#define TEXCOMPRESS_S3TC_H
|
||||
|
||||
#include "main/mtypes.h"
|
||||
#include "texstore.h"
|
||||
|
||||
|
||||
#if FEATURE_texture_s3tc
|
||||
|
||||
extern GLboolean
|
||||
_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
|
||||
|
||||
@@ -71,5 +75,32 @@ extern void
|
||||
_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
|
||||
GLint i, GLint j, GLint k, GLfloat *texel);
|
||||
|
||||
extern void
|
||||
_mesa_init_texture_s3tc(GLcontext *ctx);
|
||||
|
||||
#else /* FEATURE_texture_s3tc */
|
||||
|
||||
/* these are used only in texstore_funcs[] */
|
||||
#define _mesa_texstore_rgb_dxt1 NULL
|
||||
#define _mesa_texstore_rgba_dxt1 NULL
|
||||
#define _mesa_texstore_rgba_dxt3 NULL
|
||||
#define _mesa_texstore_rgba_dxt5 NULL
|
||||
|
||||
/* these are used only in texfetch_funcs[] */
|
||||
#define _mesa_fetch_texel_2d_f_rgb_dxt1 NULL
|
||||
#define _mesa_fetch_texel_2d_f_rgba_dxt1 NULL
|
||||
#define _mesa_fetch_texel_2d_f_rgba_dxt3 NULL
|
||||
#define _mesa_fetch_texel_2d_f_rgba_dxt5 NULL
|
||||
#define _mesa_fetch_texel_2d_f_srgb_dxt1 NULL
|
||||
#define _mesa_fetch_texel_2d_f_srgba_dxt1 NULL
|
||||
#define _mesa_fetch_texel_2d_f_srgba_dxt3 NULL
|
||||
#define _mesa_fetch_texel_2d_f_srgba_dxt5 NULL
|
||||
|
||||
static INLINE void
|
||||
_mesa_init_texture_s3tc(GLcontext *ctx)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* FEATURE_texture_s3tc */
|
||||
|
||||
#endif /* TEXCOMPRESS_S3TC_H */
|
||||
|
||||
Reference in New Issue
Block a user