summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colortab.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-04-27 21:20:30 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-04-27 21:20:30 +0000
commit97e1e60b1c83f2c797409776022e4803dc8b0135 (patch)
tree6c80154eb0d7e2edfb5d69b765f74c78de5ed115 /src/mesa/main/colortab.c
parent69441868f6440705842f47f0a0e9521e58940a25 (diff)
downloadexternal_mesa3d-97e1e60b1c83f2c797409776022e4803dc8b0135.zip
external_mesa3d-97e1e60b1c83f2c797409776022e4803dc8b0135.tar.gz
external_mesa3d-97e1e60b1c83f2c797409776022e4803dc8b0135.tar.bz2
move set_component_sizes() to fix bug 3135
Diffstat (limited to 'src/mesa/main/colortab.c')
-rw-r--r--src/mesa/main/colortab.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 4eafe3e..600ebd2 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -483,7 +483,6 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
table->Size = width;
table->IntFormat = internalFormat;
table->Format = (GLenum) baseFormat;
- set_component_sizes(table);
comps = _mesa_components_in_format(table->Format);
assert(comps > 0); /* error should have been caught sooner */
@@ -520,6 +519,9 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
}
} /* proxy */
+ /* do this after the table's Type and Format are set */
+ set_component_sizes(table);
+
if (texObj || target == GL_SHARED_TEXTURE_PALETTE_EXT) {
/* texture object palette, texObj==NULL means the shared palette */
if (ctx->Driver.UpdateTexturePalette) {