summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-09-09 16:25:17 -0700
committerEric Anholt <[email protected]>2010-09-23 13:25:45 -0700
commit6c227e57e69158e4da40c69322db0eac4c31086c (patch)
treefef7284f55ac2fe8f865674be3eade9c05edb00e /src/mesa
parent7126e38d9037da66fd531c4cb02b3843b68b84ff (diff)
mesa: Remove SGI_color_table.
Another optional ARB_imaging subset extension.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/attrib.c13
-rw-r--r--src/mesa/main/colortab.c204
-rw-r--r--src/mesa/main/colortab.h7
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/enable.c34
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/get.c12
-rw-r--r--src/mesa/main/image.c12
-rw-r--r--src/mesa/main/mtypes.h19
-rw-r--r--src/mesa/main/pixel.c14
10 files changed, 4 insertions, 316 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 9a8917fc896..73c2375f9d3 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -69,7 +69,6 @@ struct gl_enable_attrib
GLboolean Blend;
GLbitfield ClipPlanes;
GLboolean ColorMaterial;
- GLboolean ColorTable[COLORTABLE_MAX];
GLboolean Convolution1D;
GLboolean Convolution2D;
GLboolean Separable2D;
@@ -260,9 +259,6 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Blend = ctx->Color.BlendEnabled;
attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled;
attr->ColorMaterial = ctx->Light.ColorMaterialEnabled;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- attr->ColorTable[i] = ctx->Pixel.ColorTableEnabled[i];
- }
attr->Convolution1D = ctx->Pixel.Convolution1DEnabled;
attr->Convolution2D = ctx->Pixel.Convolution2DEnabled;
attr->Separable2D = ctx->Pixel.Separable2DEnabled;
@@ -515,15 +511,6 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial,
GL_COLOR_MATERIAL);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION],
- enable->ColorTable[COLORTABLE_PRECONVOLUTION],
- GL_COLOR_TABLE);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION],
- enable->ColorTable[COLORTABLE_POSTCONVOLUTION],
- GL_POST_CONVOLUTION_COLOR_TABLE);
- TEST_AND_UPDATE(ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX],
- enable->ColorTable[COLORTABLE_POSTCOLORMATRIX],
- GL_POST_COLOR_MATRIX_COLOR_TABLE);
TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp,
GL_DEPTH_CLAMP);
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 52d5badf39c..5c2697d40af 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -297,15 +297,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- proxy = GL_TRUE;
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(target)");
@@ -323,24 +314,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
table = &(texUnit->ProxyColorTable);
proxy = GL_TRUE;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- proxy = GL_TRUE;
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- proxy = GL_TRUE;
- break;
default:
/* try texture targets */
{
@@ -459,11 +432,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorSubTable(target)");
@@ -473,16 +441,6 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
scale = ctx->Pixel.TextureColorTableScale;
bias = ctx->Pixel.TextureColorTableBias;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
texObj = _mesa_select_tex_object(ctx, texUnit, target);
@@ -590,9 +548,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTable(target)");
@@ -600,12 +555,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
table = &(texUnit->ColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
{
@@ -714,22 +663,10 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (target) {
- case GL_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
scale = ctx->Pixel.TextureColorTableScale;
bias = ctx->Pixel.TextureColorTableBias;
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
return;
@@ -755,10 +692,7 @@ static void GLAPIENTRY
_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GLfloat fparams[4];
- if (pname == GL_COLOR_TABLE_SGI ||
- pname == GL_TEXTURE_COLOR_TABLE_SGI ||
- pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
- pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) {
+ if (pname == GL_TEXTURE_COLOR_TABLE_SGI) {
/* four values */
fparams[0] = (GLfloat) params[0];
fparams[1] = (GLfloat) params[1];
@@ -786,20 +720,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION]);
- return;
- }
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
@@ -822,34 +742,6 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
}
table = &(texUnit->ProxyColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION]);
- return;
- }
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX]);
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- COPY_4V(params, ctx->Pixel.ColorTableBias[COLORTABLE_POSTCOLORMATRIX]);
- return;
- }
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* try texture targets */
{
@@ -913,28 +805,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_SHARED_TEXTURE_PALETTE_EXT:
table = &ctx->Texture.Palette;
break;
- case GL_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_PRECONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_PRECONVOLUTION];
- params[0] = (GLint) scale[0];
- params[1] = (GLint) scale[1];
- params[2] = (GLint) scale[2];
- params[3] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableBias[COLORTABLE_PRECONVOLUTION];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_PRECONVOLUTION];
- break;
case GL_TEXTURE_COLOR_TABLE_SGI:
if (!ctx->Extensions.SGI_texture_color_table) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetColorTableParameter(target)");
@@ -963,50 +833,6 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
}
table = &(texUnit->ProxyColorTable);
break;
- case GL_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCONVOLUTION];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCONVOLUTION];
- params[0] = (GLint) scale[0];
- params[1] = (GLint) scale[1];
- params[2] = (GLint) scale[2];
- params[3] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableBias[COLORTABLE_POSTCONVOLUTION];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCONVOLUTION];
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX];
- if (pname == GL_COLOR_TABLE_SCALE_SGI) {
- GLfloat *scale = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- params[0] = (GLint) scale[0];
- params[0] = (GLint) scale[1];
- params[0] = (GLint) scale[2];
- params[0] = (GLint) scale[3];
- return;
- }
- else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
- GLfloat *bias = ctx->Pixel.ColorTableScale[COLORTABLE_POSTCOLORMATRIX];
- params[0] = (GLint) bias[0];
- params[1] = (GLint) bias[1];
- params[2] = (GLint) bias[2];
- params[3] = (GLint) bias[3];
- return;
- }
- break;
- case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE:
- table = &ctx->ProxyColorTable[COLORTABLE_POSTCOLORMATRIX];
- break;
default:
/* Try texture targets */
{
@@ -1103,31 +929,3 @@ _mesa_free_colortable_data( struct gl_color_table *p )
p->TableUB = NULL;
}
}
-
-
-/*
- * Initialize all colortables for a context.
- */
-void
-_mesa_init_colortables( GLcontext * ctx )
-{
- GLuint i;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- _mesa_init_colortable(&ctx->ColorTable[i]);
- _mesa_init_colortable(&ctx->ProxyColorTable[i]);
- }
-}
-
-
-/*
- * Free all colortable data for a context
- */
-void
-_mesa_free_colortables_data( GLcontext *ctx )
-{
- GLuint i;
- for (i = 0; i < COLORTABLE_MAX; i++) {
- _mesa_free_colortable_data(&ctx->ColorTable[i]);
- _mesa_free_colortable_data(&ctx->ProxyColorTable[i]);
- }
-}
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index 303c9fb3024..ea3ec870fd4 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -78,11 +78,4 @@ _mesa_init_colortable( struct gl_color_table *table );
extern void
_mesa_free_colortable_data( struct gl_color_table *table );
-extern void
-_mesa_init_colortables( GLcontext *ctx );
-
-extern void
-_mesa_free_colortables_data( GLcontext *ctx );
-
-
#endif /* COLORTAB_H */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 6f2ffe107d2..774553ccce4 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -728,7 +728,6 @@ init_attrib_groups(GLcontext *ctx)
_mesa_init_attrib( ctx );
_mesa_init_buffer_objects( ctx );
_mesa_init_color( ctx );
- _mesa_init_colortables( ctx );
_mesa_init_current( ctx );
_mesa_init_depth( ctx );
_mesa_init_debug( ctx );
@@ -1105,7 +1104,6 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
_mesa_free_viewport_data( ctx );
- _mesa_free_colortables_data( ctx );
_mesa_free_program_data(ctx);
_mesa_free_shader_state(ctx);
_mesa_free_queryobj_data(ctx);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index b0eb294df47..2c8c000f9f4 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -703,28 +703,7 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
client_state( ctx, cap, state );
return;
- /* GL_SGI_color_table */
- case GL_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION] = state;
- break;
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION] = state;
- break;
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table, cap);
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX] == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX] = state;
- break;
+ /* GL_SGI_texture_color_table */
case GL_TEXTURE_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_texture_color_table, cap);
if (ctx->Texture.Unit[ctx->Texture.CurrentUnit].ColorTableEnabled == state)
@@ -1343,17 +1322,6 @@ _mesa_IsEnabled( GLenum cap )
return (ctx->Array.ArrayObj->PointSize.Enabled != 0);
#endif
- /* GL_SGI_color_table */
- case GL_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION];
- case GL_POST_CONVOLUTION_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION];
- case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
- CHECK_EXTENSION(SGI_color_table);
- return ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX];
-
/* GL_SGI_texture_color_table */
case GL_TEXTURE_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_texture_color_table);
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 33599136b41..3e4801030d1 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -207,7 +207,6 @@ static const struct {
{ OFF, "GL_NV_vertex_program1_1", F(NV_vertex_program1_1) },
{ ON, "GL_OES_read_format", F(OES_read_format) },
{ OFF, "GL_SGI_color_matrix", F(SGI_color_matrix) },
- { OFF, "GL_SGI_color_table", F(SGI_color_table) },
{ OFF, "GL_SGI_texture_color_table", F(SGI_texture_color_table) },
{ OFF, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) },
{ OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) },
@@ -368,7 +367,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.NV_fragment_program_option = GL_TRUE;
#endif
ctx->Extensions.SGI_color_matrix = GL_TRUE;
- ctx->Extensions.SGI_color_table = GL_TRUE;
ctx->Extensions.SGI_texture_color_table = GL_TRUE;
ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE;
@@ -399,7 +397,6 @@ _mesa_enable_imaging_extensions(GLcontext *ctx)
ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_convolution = GL_TRUE;
ctx->Extensions.SGI_color_matrix = GL_TRUE;
- ctx->Extensions.SGI_color_table = GL_TRUE;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f04f42022d6..bb2ce759d36 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -277,7 +277,6 @@ EXTRA_EXT(NV_texture_rectangle);
EXTRA_EXT(EXT_stencil_two_side);
EXTRA_EXT(NV_light_max_exponent);
EXTRA_EXT(EXT_convolution);
-EXTRA_EXT(SGI_color_table);
EXTRA_EXT(SGI_texture_color_table);
EXTRA_EXT(EXT_depth_bounds_test);
EXTRA_EXT(ARB_depth_clamp);
@@ -937,17 +936,6 @@ static const struct value_desc values[] = {
CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]),
extra_EXT_convolution },
- /* GL_SGI_color_table */
- { GL_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]),
- extra_SGI_color_table },
- { GL_POST_CONVOLUTION_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION]),
- extra_SGI_color_table },
- { GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI,
- CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]),
- extra_SGI_color_table },
-
/* GL_SGI_texture_color_table */
{ GL_TEXTURE_COLOR_TABLE_SGI, LOC_TEXUNIT, TYPE_BOOLEAN,
offsetof(struct gl_texture_unit, ColorTableEnabled),
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 453611d00b6..7918ef7926b 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1896,10 +1896,6 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
if (transferOps & IMAGE_MAP_COLOR_BIT) {
_mesa_map_rgba( ctx, n, rgba );
}
- /* GL_COLOR_TABLE lookup */
- if (transferOps & IMAGE_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_PRECONVOLUTION], n, rgba);
- }
/* convolution */
if (transferOps & IMAGE_CONVOLUTION_BIT) {
/* this has to be done in the calling code */
@@ -1917,18 +1913,10 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
ctx->Pixel.PostConvolutionBias[BCOMP],
ctx->Pixel.PostConvolutionBias[ACOMP]);
}
- /* GL_POST_CONVOLUTION_COLOR_TABLE lookup */
- if (transferOps & IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCONVOLUTION], n, rgba);
- }
/* color matrix transform */
if (transferOps & IMAGE_COLOR_MATRIX_BIT) {
_mesa_transform_rgba(ctx, n, rgba);
}
- /* GL_POST_COLOR_MATRIX_COLOR_TABLE lookup */
- if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) {
- _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX], n, rgba);
- }
/* clamping to [0,1] */
if (transferOps & IMAGE_CLAMP_BIT) {
GLuint i;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d918482353f..97187326085 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -964,11 +964,6 @@ struct gl_pixel_attrib
GLboolean MapColorFlag;
GLboolean MapStencilFlag;
- /* There are multiple color table stages: */
- GLboolean ColorTableEnabled[COLORTABLE_MAX];
- GLfloat ColorTableScale[COLORTABLE_MAX][4]; /**< RGBA */
- GLfloat ColorTableBias[COLORTABLE_MAX][4]; /**< RGBA */
-
/* Convolution (GL_EXT_convolution) */
GLboolean Convolution1DEnabled;
GLboolean Convolution2DEnabled;
@@ -2754,7 +2749,6 @@ struct gl_extensions
GLboolean NV_vertex_program1_1;
GLboolean OES_read_format;
GLboolean SGI_color_matrix;
- GLboolean SGI_color_table;
GLboolean SGI_texture_color_table;
GLboolean SGIS_generate_mipmap;
GLboolean SGIS_texture_edge_clamp;
@@ -2791,26 +2785,20 @@ struct gl_matrix_stack
#define IMAGE_SCALE_BIAS_BIT 0x1
#define IMAGE_SHIFT_OFFSET_BIT 0x2
#define IMAGE_MAP_COLOR_BIT 0x4
-#define IMAGE_COLOR_TABLE_BIT 0x8
#define IMAGE_CONVOLUTION_BIT 0x10
#define IMAGE_POST_CONVOLUTION_SCALE_BIAS 0x20
-#define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40
#define IMAGE_COLOR_MATRIX_BIT 0x80
-#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100
#define IMAGE_CLAMP_BIT 0x800
/** Pixel Transfer ops up to convolution */
#define IMAGE_PRE_CONVOLUTION_BITS (IMAGE_SCALE_BIAS_BIT | \
IMAGE_SHIFT_OFFSET_BIT | \
- IMAGE_MAP_COLOR_BIT | \
- IMAGE_COLOR_TABLE_BIT)
+ IMAGE_MAP_COLOR_BIT)
/** Pixel transfer ops after convolution */
#define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \
- IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \
- IMAGE_COLOR_MATRIX_BIT | \
- IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT)
+ IMAGE_COLOR_MATRIX_BIT)
/*@}*/
@@ -3176,9 +3164,6 @@ struct __GLcontextRec
struct gl_feedback Feedback; /**< Feedback */
struct gl_selection Select; /**< Selection */
- struct gl_color_table ColorTable[COLORTABLE_MAX];
- struct gl_color_table ProxyColorTable[COLORTABLE_MAX];
-
struct gl_program_state Program; /**< general program state */
struct gl_vertex_program_state VertexProgram;
struct gl_fragment_program_state FragmentProgram;
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 980c40550c3..834a41108c2 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -702,9 +702,6 @@ update_image_transfer_state(GLcontext *ctx)
if (ctx->Pixel.MapColorFlag)
mask |= IMAGE_MAP_COLOR_BIT;
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION])
- mask |= IMAGE_COLOR_TABLE_BIT;
-
if (ctx->Pixel.Convolution1DEnabled ||
ctx->Pixel.Convolution2DEnabled ||
ctx->Pixel.Separable2DEnabled) {
@@ -721,9 +718,6 @@ update_image_transfer_state(GLcontext *ctx)
}
}
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCONVOLUTION])
- mask |= IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT;
-
if (ctx->ColorMatrixStack.Top->type != MATRIX_IDENTITY ||
ctx->Pixel.PostColorMatrixScale[0] != 1.0F ||
ctx->Pixel.PostColorMatrixBias[0] != 0.0F ||
@@ -735,9 +729,6 @@ update_image_transfer_state(GLcontext *ctx)
ctx->Pixel.PostColorMatrixBias[3] != 0.0F)
mask |= IMAGE_COLOR_MATRIX_BIT;
- if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX])
- mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT;
-
ctx->_ImageTransferState = mask;
}
@@ -825,11 +816,6 @@ _mesa_init_pixel( GLcontext *ctx )
init_pixelmap(&ctx->PixelMaps.AtoA);
ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0);
ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0);
- for (i = 0; i < COLORTABLE_MAX; i++) {
- ASSIGN_4V(ctx->Pixel.ColorTableScale[i], 1.0, 1.0, 1.0, 1.0);
- ASSIGN_4V(ctx->Pixel.ColorTableBias[i], 0.0, 0.0, 0.0, 0.0);
- ctx->Pixel.ColorTableEnabled[i] = GL_FALSE;
- }
ctx->Pixel.Convolution1DEnabled = GL_FALSE;
ctx->Pixel.Convolution2DEnabled = GL_FALSE;
ctx->Pixel.Separable2DEnabled = GL_FALSE;