aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-09-21 19:29:15 -0700
committerKeith Whitwell <[email protected]>2008-09-21 22:13:52 -0700
commit34a61c66fd1b625a5606b795d192a49632ff1787 (patch)
tree6c185413739b4af3b9790df17dc53a76a32f2312 /src/mesa/main/texstate.c
parent24172fe595eede2649dd88363d2cda68f928a03e (diff)
mesa: refactor: move #define FEATURE flags into new mfeatures.h file
Also, check the FEATURE flags in many places. (cherry picked from commit 40d1a40f294f1ed2dacfad6f5498322fc08cc2d1) Conflicts: src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 4adfa6b385a..2d5e34f5b59 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -30,7 +30,9 @@
#include "glheader.h"
#include "colormac.h"
+#if FEATURE_colortable
#include "colortab.h"
+#endif
#include "context.h"
#include "enums.h"
#include "macros.h"
@@ -3167,7 +3169,9 @@ _mesa_init_texture(GLcontext *ctx)
ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._EnabledUnits = 0;
ctx->Texture.SharedPalette = GL_FALSE;
+#if FEATURE_colortable
_mesa_init_colortable(&ctx->Texture.Palette);
+#endif
for (i = 0; i < MAX_TEXTURE_UNITS; i++)
init_texture_unit( ctx, i );
@@ -3209,9 +3213,13 @@ _mesa_free_texture_data(GLcontext *ctx)
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
- for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++)
- _mesa_free_colortable_data( &ctx->Texture.Unit[u].ColorTable );
-
+#if FEATURE_colortable
+ {
+ GLuint i;
+ for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
+ _mesa_free_colortable_data( &ctx->Texture.Unit[i].ColorTable );
+ }
+#endif
}