Before calling _mesa_create_context(), initialize a dd_function_table struct
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_tris.c
index 131c2f1a0e7091a28230e723107503637906208b..408682e1fac417db14c79c56da53a54345789e8a 100644 (file)
@@ -327,12 +327,12 @@ static struct {
 #define VERTEX tdfxVertex
 #define TAB rast_tab
 
-#define TDFX_COLOR( dst, src )                 \
-do {                                           \
-   dst[0] = src[2];                            \
-   dst[1] = src[1];                            \
-   dst[2] = src[0];                            \
-   dst[3] = src[3];                            \
+#define TDFX_COLOR( dst, src )                         \
+do {                                                   \
+   UNCLAMPED_FLOAT_TO_UBYTE((dst)[0], (src)[2]);       \
+   UNCLAMPED_FLOAT_TO_UBYTE((dst)[1], (src)[1]);       \
+   UNCLAMPED_FLOAT_TO_UBYTE((dst)[2], (src)[0]);       \
+   UNCLAMPED_FLOAT_TO_UBYTE((dst)[3], (src)[3]);       \
 } while (0)
 
 #define DEPTH_SCALE 1.0