summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texcombine.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-10-13 00:44:31 +0000
committerBrian Paul <[email protected]>2006-10-13 00:44:31 +0000
commite5a6fcc345867b550a159a7d94912a81e618279c (patch)
treedac93f846c871972ebc71269baa85f97e335f573 /src/mesa/swrast/s_texcombine.c
parente392c92250bf91c7aaaeb78e7ec598f86f2a1d6d (diff)
Revamp color table code.
Always store all color tables as both float and ubyte.
Diffstat (limited to 'src/mesa/swrast/s_texcombine.c')
-rw-r--r--src/mesa/swrast/s_texcombine.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index efa2ed3488d..2a3455f35e2 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -1132,7 +1132,13 @@ _swrast_texture_span( GLcontext *ctx, SWspan *span )
/* GL_SGI_texture_color_table */
if (texUnit->ColorTableEnabled) {
- _mesa_lookup_rgba_chan(&texUnit->ColorTable, span->end, texels);
+#if CHAN_TYPE == GL_UNSIGNED_BYTE
+ _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels);
+#elif CHAN_TYPE == GL_UNSIGNED_SHORT
+ _mesa_lookup_rgba_ubyte(&texUnit->ColorTable, span->end, texels);
+#else
+ _mesa_lookup_rgba_float(&texUnit->ColorTable, span->end, texels);
+#endif
}
}
}