summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_context.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-01-20 10:38:35 +1100
commitdf09ed9d1ecf11be14ee7f189273c14375fbaa57 (patch)
tree7322a2670877dff003f57a5485c9e92226b57167 /src/mesa/pipe/draw/draw_context.c
parent0feec292ddc279998a1e25c10ea70d211f7b4b62 (diff)
parenta1f4a5e802ad62c88fca6834b9de1c83672230a6 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r--src/mesa/pipe/draw/draw_context.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c
index d134b05717..fd43d690f6 100644
--- a/src/mesa/pipe/draw/draw_context.c
+++ b/src/mesa/pipe/draw/draw_context.c
@@ -76,10 +76,10 @@ struct draw_context *draw_create( void )
draw->vcache.vertex[i] = (struct vertex_header *)(tmp + i * MAX_VERTEX_SIZE);
}
- draw->attrib_front0 = -1;
- draw->attrib_back0 = -1;
- draw->attrib_front1 = -1;
- draw->attrib_back1 = -1;
+ draw->attrib_front0 = 0;
+ draw->attrib_back0 = 0;
+ draw->attrib_front1 = 0;
+ draw->attrib_back1 = 0;
draw->prim = ~0; /* != any of PIPE_PRIM_x */
@@ -238,17 +238,6 @@ void draw_alloc_tmps( struct draw_stage *stage, unsigned nr )
}
}
-/**
- * Reset the vertex ids for the stage's temp verts.
- */
-void draw_reset_tmps( struct draw_stage *stage )
-{
- unsigned i;
-
- if (stage->tmp)
- for (i = 0; i < stage->nr_tmps; i++)
- stage->tmp[i]->vertex_id = UNDEFINED_VERTEX_ID;
-}
void draw_free_tmps( struct draw_stage *stage )
{
@@ -271,10 +260,11 @@ void draw_reset_vertex_ids(struct draw_context *draw)
struct draw_stage *stage = draw->pipeline.first;
while (stage) {
- if (stage->reset_tmps)
- stage->reset_tmps(stage);
- else
- draw_reset_tmps(stage);
+ unsigned i;
+
+ for (i = 0; i < stage->nr_tmps; i++)
+ stage->tmp[i]->vertex_id = UNDEFINED_VERTEX_ID;
+
stage = stage->next;
}