From 66719dc63a169d5bec5e56fa5ad46853121a8dc0 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 14 Dec 2007 15:51:07 +0000 Subject: gallium: hardwire reset_temps functionality --- src/mesa/pipe/draw/draw_context.c | 20 +++++--------------- src/mesa/pipe/draw/draw_linestipple.c | 1 - src/mesa/pipe/draw/draw_private.h | 7 ------- 3 files changed, 5 insertions(+), 23 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 39d324f97f..fd43d690f6 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -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; } diff --git a/src/mesa/pipe/draw/draw_linestipple.c b/src/mesa/pipe/draw/draw_linestipple.c index 5f0db99b23..d7fe1071f0 100644 --- a/src/mesa/pipe/draw/draw_linestipple.c +++ b/src/mesa/pipe/draw/draw_linestipple.c @@ -265,7 +265,6 @@ struct clip_pipe_stage *clip_pipe_stipple( struct clip_pipeline *pipe ) stipple->stage.point = clip_passthrough_point; stipple->stage.line = stipple_line; stipple->stage.tri = clip_passthrough_tri; - stipple->stage.reset_tmps = clip_pipe_reset_tmps; stipple->stage.end = stipple_end; stipple->stage.destroy = stipple_destroy; diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index 5f89ac121e..d8832449ea 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -116,13 +116,6 @@ struct draw_stage void (*end)( struct draw_stage * ); - /** - * Reset temporary vertex ids in this stage - * - * draw_free_tmps will be called instead if null. - */ - void (*reset_tmps)( struct draw_stage * ); - void (*reset_stipple_counter)( struct draw_stage * ); void (*destroy)( struct draw_stage * ); -- cgit v1.2.3