summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_texcombine.c
diff options
context:
space:
mode:
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 efa2ed3488..2a3455f35e 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
}
}
}