summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_stipple.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-28 13:33:09 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-28 13:33:09 +0100
commit7fd6cd9af31a6b02564359f820d478ceb970fc7d (patch)
tree27fb226b252e7c64653c670e1d0831ce19bcb725 /src/gallium/auxiliary/draw/draw_pipe_stipple.c
parent44a7bd0019b9af9ff01336df0aa6eb206f5dc2e9 (diff)
parentb7b9ce0f8677993c3cd5376add72a684a5653341 (diff)
Merge branch 'gallium-vertex-linear' into gallium-tex-surfaces
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_stipple.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_stipple.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_stipple.c b/src/gallium/auxiliary/draw/draw_pipe_stipple.c
index 3cbced362e..9522b79582 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_stipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_stipple.c
@@ -71,7 +71,7 @@ screen_interp( struct draw_context *draw,
const struct vertex_header *v1 )
{
uint attr;
- for (attr = 0; attr < draw->num_vs_outputs; attr++) {
+ for (attr = 0; attr < draw->vs.num_vs_outputs; attr++) {
const float *val0 = v0->data[attr];
const float *val1 = v1->data[attr];
float *newv = dst->data[attr];
@@ -175,6 +175,22 @@ reset_stipple_counter(struct draw_stage *stage)
stage->next->reset_stipple_counter( stage->next );
}
+static void
+stipple_reset_point(struct draw_stage *stage, struct prim_header *header)
+{
+ struct stipple_stage *stipple = stipple_stage(stage);
+ stipple->counter = 0;
+ stage->next->point(stage->next, header);
+}
+
+static void
+stipple_reset_tri(struct draw_stage *stage, struct prim_header *header)
+{
+ struct stipple_stage *stipple = stipple_stage(stage);
+ stipple->counter = 0;
+ stage->next->tri(stage->next, header);
+}
+
static void
stipple_first_line(struct draw_stage *stage,
@@ -220,9 +236,9 @@ struct draw_stage *draw_stipple_stage( struct draw_context *draw )
stipple->stage.draw = draw;
stipple->stage.next = NULL;
- stipple->stage.point = draw_pipe_passthrough_point;
+ stipple->stage.point = stipple_reset_point;
stipple->stage.line = stipple_first_line;
- stipple->stage.tri = draw_pipe_passthrough_tri;
+ stipple->stage.tri = stipple_reset_tri;
stipple->stage.reset_stipple_counter = reset_stipple_counter;
stipple->stage.flush = stipple_flush;
stipple->stage.destroy = stipple_destroy;