summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-24 12:38:15 +0100
committerKeith Whitwell <[email protected]>2008-04-24 12:39:09 +0100
commitf93332da5655a31b6c44a1079629a15360ff999b (patch)
tree0e0a706c9dfbfae5dca184a286b01c6d340a5109 /src/gallium/auxiliary/draw/draw_pipe.c
parentdddedd915afb58ab6b87492e850baeadc007fe47 (diff)
draw: handle edgeflags and reset-line-stipple again
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index d0890203a5e..1c9d8650e2d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -116,8 +116,7 @@ static void do_point( struct draw_context *draw,
{
struct prim_header prim;
- prim.reset_line_stipple = 0;
- prim.edgeflags = 1;
+ prim.flags = 0;
prim.pad = 0;
prim.v[0] = (struct vertex_header *)v0;
@@ -126,13 +125,13 @@ static void do_point( struct draw_context *draw,
static void do_line( struct draw_context *draw,
+ ushort flags,
const char *v0,
const char *v1 )
{
struct prim_header prim;
- prim.reset_line_stipple = 1; /* fixme */
- prim.edgeflags = 1;
+ prim.flags = flags;
prim.pad = 0;
prim.v[0] = (struct vertex_header *)v0;
prim.v[1] = (struct vertex_header *)v1;
@@ -142,6 +141,7 @@ static void do_line( struct draw_context *draw,
static void do_triangle( struct draw_context *draw,
+ ushort flags,
char *v0,
char *v1,
char *v2 )
@@ -151,10 +151,7 @@ static void do_triangle( struct draw_context *draw,
prim.v[0] = (struct vertex_header *)v0;
prim.v[1] = (struct vertex_header *)v1;
prim.v[2] = (struct vertex_header *)v2;
- prim.reset_line_stipple = 1;
- prim.edgeflags = ((prim.v[0]->edgeflag) |
- (prim.v[1]->edgeflag << 1) |
- (prim.v[2]->edgeflag << 2));
+ prim.flags = flags;
prim.pad = 0;
draw->pipeline.first->tri( draw->pipeline.first, &prim );
@@ -197,13 +194,15 @@ void draw_pipeline_run( struct draw_context *draw,
case PIPE_PRIM_LINES:
for (i = 0; i+1 < count; i += 2)
do_line( draw,
- verts + stride * elts[i+0],
+ elts[i+0],
+ verts + stride * (elts[i+0] & ~DRAW_PIPE_FLAG_MASK),
verts + stride * elts[i+1]);
break;
case PIPE_PRIM_TRIANGLES:
for (i = 0; i+2 < count; i += 3)
do_triangle( draw,
- verts + stride * elts[i+0],
+ elts[i+0],
+ verts + stride * (elts[i+0] & ~DRAW_PIPE_FLAG_MASK),
verts + stride * elts[i+1],
verts + stride * elts[i+2]);
break;