Before calling _mesa_create_context(), initialize a dd_function_table struct
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_tris.c
index 7ab25e7b9abbd72f8eac5d330e987daa70c20fd4..408682e1fac417db14c79c56da53a54345789e8a 100644 (file)
@@ -216,7 +216,7 @@ static void tdfx_print_vertex( GLcontext *ctx, const tdfxVertex *v )
 {
    tdfxContextPtr imesa = TDFX_CONTEXT( ctx );
 
-   fprintf(stderr, "vertex at %p\n", v);
+   fprintf(stderr, "vertex at %p\n", (void *)v);
 
    if (imesa->vertexFormat == TDFX_LAYOUT_TINY) {
       fprintf(stderr, "x %f y %f z %f\n", v->v.x, v->v.y, v->v.z);
@@ -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
@@ -709,10 +709,7 @@ static void tdfx_render_vb_tri_strip( GLcontext *ctx,
 /*     fprintf(stderr, "%s/%d\n", __FUNCTION__, 1<<shift); */
 /*     if(!prevLockLine) abort(); */
 
-   if (flags & PRIM_PARITY) 
-      mode = GR_TRIANGLE_STRIP_CONTINUE;
-   else
-      mode = GR_TRIANGLE_STRIP;
+   mode = GR_TRIANGLE_STRIP;
 
    fxMesa->Glide.grDrawVertexArrayContiguous( mode, count-start,
                                               fxVB, 1<<shift);