From c0bcd2ca99609fe8b6e992e2277ef8612d46fdfe Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 17 Jan 2001 02:49:38 +0000 Subject: Fixes for performance bug on compiled array element paths. --- src/mesa/tnl/t_pipeline.c | 6 +++--- src/mesa/tnl/t_vb_cliptmp.h | 6 +++--- src/mesa/tnl/t_vb_lighttmp.h | 8 +++++++- 3 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/mesa/tnl') diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 11a17849b6..b2d4f15547 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -1,4 +1,4 @@ -/* $Id: t_pipeline.c,v 1.9 2001/01/14 06:14:21 keithw Exp $ */ +/* $Id: t_pipeline.c,v 1.10 2001/01/17 02:49:39 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -138,12 +138,12 @@ void _tnl_run_pipeline( GLcontext *ctx ) } if (stage[i].active) { - if (stage[i].changed_inputs) + if (stage[i].changed_inputs) changed_inputs |= stage[i].outputs; if (running) { -/* fprintf(stderr, "run %s\n", stage[i].name); */ running = stage[i].run( ctx, &stage[i] ); + stage[i].changed_inputs = 0; } } } diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h index 56f2031c90..35fe391b84 100644 --- a/src/mesa/tnl/t_vb_cliptmp.h +++ b/src/mesa/tnl/t_vb_cliptmp.h @@ -1,4 +1,4 @@ -/* $Id: t_vb_cliptmp.h,v 1.6 2001/01/13 05:48:26 keithw Exp $ */ +/* $Id: t_vb_cliptmp.h,v 1.7 2001/01/17 02:49:39 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -185,11 +185,11 @@ static void TAG(clip_line)( GLcontext *ctx, } } - TAG(build_proj_verts)( ctx ); - if ((ctx->_TriangleCaps & DD_FLATSHADE) && j != jj) VB->copypvfunc( ctx, jj, j ); + TAG(build_proj_verts)( ctx ); + /* Render the new line. */ ctx->Driver.LineFunc( ctx, ii, jj ); diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h index 656fffff1a..575c568c06 100644 --- a/src/mesa/tnl/t_vb_lighttmp.h +++ b/src/mesa/tnl/t_vb_lighttmp.h @@ -1,4 +1,4 @@ -/* $Id: t_vb_lighttmp.h,v 1.2 2001/01/03 15:59:30 brianp Exp $ */ +/* $Id: t_vb_lighttmp.h,v 1.3 2001/01/17 02:49:39 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -661,6 +661,9 @@ static void TAG(light_fast_rgba)( GLcontext *ctx, if (IDX & LIGHT_TWOSIDE) VB->ColorPtr[1] = &store->LitColor[1]; + if (stage->changed_inputs == 0) + return; + if ( CHECK_COLOR_MATERIAL(j) ) gl_update_color_material( ctx, *CMcolor ); @@ -783,6 +786,9 @@ static void TAG(light_ci)( GLcontext *ctx, if (IDX & LIGHT_TWOSIDE) VB->IndexPtr[1] = &store->LitIndex[1]; + if (stage->changed_inputs == 0) + return; + indexResult[0] = VB->IndexPtr[0]->data; indexResult[1] = VB->IndexPtr[1]->data; -- cgit v1.2.3