Need to copy header->edgeflags to tmp when creating new prim_header.
authorBrian <brian.paul@tungstengraphics.com>
Fri, 24 Aug 2007 00:54:51 +0000 (18:54 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Fri, 24 Aug 2007 00:54:51 +0000 (18:54 -0600)
Edge flags were random/undefined otherwise.

src/mesa/pipe/draw/draw_flatshade.c
src/mesa/pipe/draw/draw_offset.c
src/mesa/pipe/draw/draw_twoside.c

index d8db1f7..5a23e10 100644 (file)
@@ -89,6 +89,7 @@ static void flatshade_tri( struct draw_stage *stage,
    struct prim_header tmp;
 
    tmp.det = header->det;
+   tmp.edgeflags = header->edgeflags;
    tmp.v[0] = dup_vert(stage, header->v[0], 0);
    tmp.v[1] = dup_vert(stage, header->v[1], 1);
    tmp.v[2] = header->v[2];
index 83c9b16..4f653e8 100644 (file)
@@ -115,6 +115,7 @@ static void offset_tri( struct draw_stage *stage,
    struct prim_header tmp;
 
    tmp.det = header->det;
+   tmp.edgeflags = header->edgeflags;
    tmp.v[0] = dup_vert(stage, header->v[0], 0);
    tmp.v[1] = dup_vert(stage, header->v[1], 1);
    tmp.v[2] = dup_vert(stage, header->v[2], 2);
index 4fd8778..5a7697d 100644 (file)
@@ -103,6 +103,7 @@ static void twoside_tri( struct draw_stage *stage,
       struct prim_header tmp;
 
       tmp.det = header->det;
+      tmp.edgeflags = header->edgeflags;
       /* copy back colors to front color slots */
       tmp.v[0] = copy_bfc(twoside, header->v[0], 0);
       tmp.v[1] = copy_bfc(twoside, header->v[1], 1);