summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.c4
-rw-r--r--src/mesa/drivers/glide/fxddtex.c2
-rw-r--r--src/mesa/main/colortab.c36
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/main/pixel.c4
-rw-r--r--src/mesa/main/texformat_tmp.h2
6 files changed, 26 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
index 6d39067de40..d8a80534bb9 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
@@ -599,7 +599,7 @@ convertPalette(FxU32 data[256], const struct gl_color_table *table)
ASSERT(table->Type == GL_UNSIGNED_BYTE);
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
for (i = 0; i < width; i++) {
r = tableUB[i];
@@ -1260,7 +1260,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
/*
printf("TexImage id=%d int 0x%x format 0x%x type 0x%x %dx%d\n",
- texObj->Name, texImage->IntFormat, format, type,
+ texObj->Name, texImage->InternalFormat, format, type,
texImage->Width, texImage->Height);
*/
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index 581df8b2b3b..cb2c8554b1c 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -511,7 +511,7 @@ convertPalette(const fxMesaContext fxMesa, FxU32 data[256], const struct gl_colo
ASSERT(table->Type == GL_UNSIGNED_BYTE);
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
for (i = 0; i < width; i++) {
r = tableUB[i];
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 4f0801578ce..e2f95cf7f9b 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -119,7 +119,7 @@ set_component_sizes( struct gl_color_table *table )
return;
}
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_ALPHA:
table->RedSize = 0;
table->GreenSize = 0;
@@ -225,7 +225,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
_mesa_unpack_color_span_float(ctx,
count, /* number of pixels */
- table->Format, /* dest format */
+ table->_BaseFormat, /* dest format */
tempTab, /* dest address */
format, type, /* src format/type */
data, /* src data */
@@ -236,7 +236,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
tableF = (GLfloat *) table->Table;
/* Apply scale & bias & clamp now */
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
for (i = 0; i < count; i++) {
GLuint j = start + i;
@@ -286,10 +286,10 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
}
else {
/* non-float (GLchan) */
- const GLint comps = _mesa_components_in_format(table->Format);
+ const GLint comps = _mesa_components_in_format(table->_BaseFormat);
GLchan *dest = (GLchan *) table->Table + start * comps;
_mesa_unpack_color_span_chan(ctx, count, /* number of entries */
- table->Format, /* dest format */
+ table->_BaseFormat, /* dest format */
dest, /* dest address */
format, type, data, /* src data */
&ctx->Unpack,
@@ -458,7 +458,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
}
baseFormat = base_colortab_format(internalFormat);
- if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ if (baseFormat < 0) {
_mesa_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)");
return;
}
@@ -467,8 +467,8 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
/* error */
if (proxy) {
table->Size = 0;
- table->IntFormat = (GLenum) 0;
- table->Format = (GLenum) 0;
+ table->InternalFormat = (GLenum) 0;
+ table->_BaseFormat = (GLenum) 0;
}
else {
_mesa_error(ctx, GL_INVALID_VALUE, "glColorTable(width=%d)", width);
@@ -479,8 +479,8 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
if (proxy) {
table->Size = 0;
- table->IntFormat = (GLenum) 0;
- table->Format = (GLenum) 0;
+ table->InternalFormat = (GLenum) 0;
+ table->_BaseFormat = (GLenum) 0;
}
else {
_mesa_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
@@ -489,11 +489,11 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
}
table->Size = width;
- table->IntFormat = internalFormat;
- table->Format = (GLenum) baseFormat;
+ table->InternalFormat = internalFormat;
+ table->_BaseFormat = (GLenum) baseFormat;
table->Type = (tableType == GL_FLOAT) ? GL_FLOAT : CHAN_TYPE;
- comps = _mesa_components_in_format(table->Format);
+ comps = _mesa_components_in_format(table->_BaseFormat);
assert(comps > 0); /* error should have been caught sooner */
if (!proxy) {
@@ -645,7 +645,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
}
/* error should have been caught sooner */
- assert(_mesa_components_in_format(table->Format) > 0);
+ assert(_mesa_components_in_format(table->_BaseFormat) > 0);
if (start + count > (GLint) table->Size) {
_mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
@@ -758,7 +758,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
ASSERT(table);
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_ALPHA:
if (table->Type == GL_FLOAT) {
const GLfloat *tableF = (const GLfloat *) table->Table;
@@ -1187,7 +1187,7 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
switch (pname) {
case GL_COLOR_TABLE_FORMAT:
- *params = (GLfloat) table->IntFormat;
+ *params = (GLfloat) table->InternalFormat;
break;
case GL_COLOR_TABLE_WIDTH:
*params = (GLfloat) table->Size;
@@ -1361,7 +1361,7 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
switch (pname) {
case GL_COLOR_TABLE_FORMAT:
- *params = table->IntFormat;
+ *params = table->InternalFormat;
break;
case GL_COLOR_TABLE_WIDTH:
*params = table->Size;
@@ -1401,7 +1401,7 @@ _mesa_init_colortable( struct gl_color_table *p )
p->Type = CHAN_TYPE;
p->Table = NULL;
p->Size = 0;
- p->IntFormat = GL_RGBA;
+ p->InternalFormat = GL_RGBA;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b551abae344..43cfe185328 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -312,8 +312,8 @@ enum {
*/
struct gl_color_table
{
- GLenum Format; /**< GL_ALPHA, GL_RGB, GL_RGB, etc */
- GLenum IntFormat;
+ GLenum InternalFormat; /**< The user-specified format */
+ GLenum _BaseFormat; /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
GLuint Size; /**< number of entries (rows) in table */
GLvoid *Table; /**< points to data of <Type> */
GLenum Type; /**< GL_UNSIGNED_BYTE or GL_FLOAT */
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 1f7bfc8bb8a..b6b2fc516a0 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1174,7 +1174,7 @@ _mesa_lookup_rgba_float(const struct gl_color_table *table,
if (!table->Table || table->Size == 0)
return;
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
/* replace RGBA with I */
if (table->Type == GL_FLOAT) {
@@ -1385,7 +1385,7 @@ _mesa_lookup_rgba_chan(const struct gl_color_table *table,
if (!table->Table || table->Size == 0)
return;
- switch (table->Format) {
+ switch (table->_BaseFormat) {
case GL_INTENSITY:
/* replace RGBA with I */
if (table->Type == GL_FLOAT) {
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index a6a9628ea9d..f8445275d87 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -1078,7 +1078,7 @@ static void FETCH(ci8)( const struct gl_texture_image *texImage,
/* Mask the index against size of palette to avoid going out of bounds */
index = (*src) & (palette->Size - 1);
- switch (palette->Format) {
+ switch (palette->_BaseFormat) {
case GL_ALPHA:
texel[RCOMP] =
texel[GCOMP] =