First pass at updating these drivers with pipeline_stage struct changes.
authorKeith Whitwell <keith@tungstengraphics.com>
Fri, 22 Apr 2005 22:42:09 +0000 (22:42 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Fri, 22 Apr 2005 22:42:09 +0000 (22:42 +0000)
src/mesa/drivers/dri/gamma/gamma_render.c
src/mesa/drivers/dri/i810/i810render.c
src/mesa/drivers/dri/i830/i830_render.c
src/mesa/drivers/dri/i915/intel_render.c
src/mesa/drivers/dri/mga/mgarender.c
src/mesa/drivers/dri/r200/r200_tcl.c
src/mesa/drivers/dri/radeon/radeon_swtcl.c
src/mesa/drivers/dri/radeon/radeon_tcl.c
src/mesa/drivers/dri/s3v/s3v_render.c
src/mesa/drivers/dri/savage/savagerender.c
src/mesa/drivers/dri/unichrome/via_render.c

index 4e0d63791d2cf0d9c487e38fd847564d8c56abfc..4b462f225253adcf623871179559d609322b3d81 100644 (file)
@@ -209,31 +209,12 @@ static GLboolean gamma_run_render( GLcontext *ctx,
 }
 
 
-static void gamma_check_render( GLcontext *ctx,
-                                struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _gamma_render_stage =
 {
    "gamma render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
-   dtr,                                /* destructor */
-   gamma_check_render,         /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    gamma_run_render            /* run */
 };
index bb8db8dbcddcfb559c380145bee956fc8a153fdd..a31d54236cb9878e0479aa30fe468dda2212f001 100644 (file)
@@ -161,31 +161,13 @@ static GLboolean i810_run_render( GLcontext *ctx,
 }
 
 
-static void i810_check_render( GLcontext *ctx, 
-                              struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
 
 const struct tnl_pipeline_stage _i810_render_stage =
 {
    "i810 render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
-   dtr,                                /* destructor */
-   i810_check_render,          /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    i810_run_render             /* run */
 };
index 498384bdb297ae3c26691a1d2fdff8b03951f254..b0592e9cddc9976a75937006ac1264ba22b2fb94 100644 (file)
@@ -215,30 +215,12 @@ static GLboolean i830_run_render( GLcontext *ctx,
 }
 
 
-static void i830_check_render( GLcontext *ctx, 
-                              struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _i830_render_stage =
 {
    "i830 render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),  /* re-check (new inputs) */
-   0,                  /* re-run (always runs) */
-   GL_TRUE,            /* active */
-   0, 0,               /* inputs (set in check_render), outputs */
-   0, 0,               /* changed_inputs, private */
-   dtr,                /* destructor */
-   i830_check_render,  /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    i830_run_render     /* run */
 };
index 9fcacea55efc0ac0ec414fb7e0f8e0e2f8dc8cc7..d9438ba0fd898a5e3de890db8ec73e7b8a9eb9af 100644 (file)
@@ -229,31 +229,12 @@ static GLboolean intel_run_render( GLcontext *ctx,
    return GL_FALSE;     /* finished the pipe */
 }
 
-
-static void intel_check_render( GLcontext *ctx, 
-                              struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _intel_render_stage =
 {
    "intel render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),  /* re-check (new inputs) */
-   0,                  /* re-run (always runs) */
-   GL_TRUE,            /* active */
-   0, 0,               /* inputs (set in check_render), outputs */
-   0, 0,               /* changed_inputs, private */
-   dtr,                /* destructor */
-   intel_check_render, /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    intel_run_render    /* run */
 };
index a7de390be6de2cd6c2e9a10a940bc927a573da5d..3080cea79feb43657ad797fabc10ccd58c799484 100644 (file)
@@ -161,30 +161,12 @@ static GLboolean mga_run_render( GLcontext *ctx,
 }
 
 
-static void mga_check_render( GLcontext *ctx, struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _mga_render_stage = 
 { 
    "mga render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
-   dtr,                                /* destructor */
-   mga_check_render,           /* check - initially set to alloc data */
+   NULL, 
+   NULL,
+   NULL,
+   NULL,
    mga_run_render              /* run */
 };
index ec1c43ce50736b8dbdae975b2e8a2fa759ac50bc..335af125944ef6d99d2b0397bf24d5b6e364c38f 100644 (file)
@@ -384,7 +384,7 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx,
       return GL_FALSE;
 
    r200ReleaseArrays( ctx, ~0 /* stage->changed_inputs */ );
-   r200EmitArrays( ctx, stage->inputs );
+   r200EmitArrays( ctx, tnl->render_inputs );
 
    rmesa->tcl.Elts = VB->Elts;
 
@@ -408,85 +408,15 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx,
 
 
 
-static void r200_check_tcl_render( GLcontext *ctx,
-                                  struct tnl_pipeline_stage *stage )
-{
-   r200ContextPtr rmesa = R200_CONTEXT(ctx);
-   GLuint inputs = VERT_BIT_POS;
-   GLuint unit;
-
-   /* Validate state:
-    */
-   if (rmesa->NewGLState)
-      r200ValidateState( ctx );
-
-   if (ctx->RenderMode == GL_RENDER) {
-      /* Make all this event-driven:
-       */
-      if (ctx->Light.Enabled) {
-        inputs |= VERT_BIT_NORMAL;
-
-        if (1 || ctx->Light.ColorMaterialEnabled) {
-           inputs |= VERT_BIT_COLOR0;
-        }
-      }
-      else {
-        inputs |= VERT_BIT_COLOR0;
-        
-        if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
-           inputs |= VERT_BIT_COLOR1;
-        }
-      }
-
-      if ( ctx->Fog.FogCoordinateSource == GL_FOG_COORD ) {
-        inputs |= VERT_BIT_FOG;
-      }
-
-      for (unit = 0 ; unit < ctx->Const.MaxTextureUnits; unit++) {
-        if (ctx->Texture.Unit[unit]._ReallyEnabled) {
-           if (rmesa->TexGenNeedNormals[unit]) {
-              inputs |= VERT_BIT_NORMAL;
-           }
-           inputs |= VERT_BIT_TEX(unit);
-        }
-      }
-
-      stage->inputs = inputs;
-      stage->active = 1;
-   }
-   else
-      stage->active = 0;
-}
-
-static void r200_init_tcl_render( GLcontext *ctx,
-                                   struct tnl_pipeline_stage *stage )
-{
-   stage->check = r200_check_tcl_render;
-   stage->check( ctx, stage );
-}
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 /* Initial state for tcl stage.  
  */
 const struct tnl_pipeline_stage _r200_tcl_stage =
 {
    "r200 render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_LIGHT|
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, NULL,                    /* changed_inputs, private */
-   dtr,                                /* destructor */
-   r200_init_tcl_render,       /* check - initially set to alloc data */
+   NULL,                       /*  private */
+   NULL,
+   NULL,
+   NULL,
    r200_run_tcl_render /* run */
 };
 
index 0548243ce67c17952810216f0c58fdde9d4723fe..c71414ec5873ce3ef449bfdc594571c1745b8787 100644 (file)
@@ -603,7 +603,7 @@ static GLboolean radeon_run_render( GLcontext *ctx,
    tnl_render_func *tab = TAG(render_tab_verts);
    GLuint i;
 
-   if (rmesa->swtcl.indexed_verts.buf && (!VB->Elts || stage->changed_inputs)
+   if (rmesa->swtcl.indexed_verts.buf) 
       RELEASE_ELT_VERTS();
        
    if (rmesa->swtcl.RenderIndex != 0 ||   
@@ -646,32 +646,14 @@ static GLboolean radeon_run_render( GLcontext *ctx,
 
 
 
-static void radeon_check_render( GLcontext *ctx,
-                                struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
 
 const struct tnl_pipeline_stage _radeon_render_stage =
 {
    "radeon render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, NULL,                    /* changed_inputs, private */
-   dtr,                                /* destructor */
-   radeon_check_render,                /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    radeon_run_render           /* run */
 };
 
@@ -704,10 +686,7 @@ static GLboolean run_texrect_stage( GLcontext *ctx,
       return GL_TRUE;
 
    for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
-      if (!(ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_RECT_BIT))
-        continue;
-   
-      if (stage->changed_inputs & VERT_BIT_TEX(i)) {
+      if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_RECT_BIT) {
         struct gl_texture_object *texObj = ctx->Texture.Unit[i].CurrentRect;
         struct gl_texture_image *texImage = texObj->Image[0][texObj->BaseLevel];
         const GLfloat iw = 1.0/texImage->Width;
@@ -722,9 +701,9 @@ static GLboolean run_texrect_stage( GLcontext *ctx,
            out[j][1] = in[1] * ih;
            in = (GLfloat *)((GLubyte *)in + instride);
         }
-      }
 
-      VB->TexCoordPtr[i] = &store->texcoord[i];
+        VB->TexCoordPtr[i] = &store->texcoord[i];
+      }
    }
 
    return GL_TRUE;
@@ -748,30 +727,9 @@ static GLboolean alloc_texrect_data( GLcontext *ctx,
    for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
       _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 );
 
-   /* Now run the stage.
-    */
-   stage->run = run_texrect_stage;
-   return stage->run( ctx, stage );
-}
-
-
-static void check_texrect( GLcontext *ctx,
-                          struct tnl_pipeline_stage *stage )
-{
-   GLuint flags = 0;
-
-   if (ctx->Texture.Unit[0]._ReallyEnabled & TEXTURE_RECT_BIT)
-      flags |= VERT_BIT_TEX0;
-
-   if (ctx->Texture.Unit[1]._ReallyEnabled & TEXTURE_RECT_BIT)
-      flags |= VERT_BIT_TEX1;
-
-   stage->inputs = flags;
-   stage->outputs = flags;
-   stage->active = (flags != 0);
+   return GL_TRUE;
 }
 
-
 static void free_texrect_data( struct tnl_pipeline_stage *stage )
 {
    struct texrect_stage_data *store = TEXRECT_STAGE_DATA(stage);
@@ -786,20 +744,14 @@ static void free_texrect_data( struct tnl_pipeline_stage *stage )
    }
 }
 
-
 const struct tnl_pipeline_stage _radeon_texrect_stage =
 {
    "radeon texrect stage",                     /* name */
-   _NEW_TEXTURE,       /* check_state */
-   _NEW_TEXTURE,       /* run_state */
-   GL_TRUE,                            /* active? */
-   0,                                  /* inputs */
-   0,                                  /* outputs */
-   0,                                  /* changed_inputs */
-   NULL,                               /* private data */
-   free_texrect_data,                  /* destructor */
-   check_texrect,                      /* check */
-   alloc_texrect_data,                 /* run -- initially set to init */
+   NULL,
+   alloc_texrect_data,
+   free_texrect_data,
+   NULL,
+   run_texrect_stage
 };
 
 
index 08e12125a475095430704a8dd524a8d8a2591831..d1b66c19a1ae88268670ea5d934ebcf89697b0ee 100644 (file)
@@ -303,8 +303,8 @@ static GLboolean radeon_run_tcl_render( GLcontext *ctx,
    if (VB->Count == 0)
       return GL_FALSE;
 
-   radeonReleaseArrays( ctx, stage->changed_inputs );
-   radeonEmitArrays( ctx, stage->inputs );
+   radeonReleaseArrays( ctx, ~0 );
+   radeonEmitArrays( ctx, tnl->render_inputs );
 
    rmesa->tcl.Elts = VB->Elts;
 
@@ -328,86 +328,15 @@ static GLboolean radeon_run_tcl_render( GLcontext *ctx,
 
 
 
-static void radeon_check_tcl_render( GLcontext *ctx,
-                                    struct tnl_pipeline_stage *stage )
-{
-   radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-   GLuint inputs = VERT_BIT_POS;
-
-   if (ctx->RenderMode == GL_RENDER) {
-      /* Make all this event-driven:
-       */
-      if (ctx->Light.Enabled) {
-        inputs |= VERT_BIT_NORMAL;
-
-        if (1 || ctx->Light.ColorMaterialEnabled) {
-           inputs |= VERT_BIT_COLOR0;
-        }
-      }
-      else {
-        inputs |= VERT_BIT_COLOR0;
-        
-        if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
-           inputs |= VERT_BIT_COLOR1;
-        }
-      }
-
-      if (ctx->Texture.Unit[0]._ReallyEnabled) {
-        if (ctx->Texture.Unit[0].TexGenEnabled) {
-           if (rmesa->TexGenNeedNormals[0]) {
-              inputs |= VERT_BIT_NORMAL;
-           }
-        } else {
-           inputs |= VERT_BIT_TEX0;
-        }
-      }
-
-      if (ctx->Texture.Unit[1]._ReallyEnabled) {
-        if (ctx->Texture.Unit[1].TexGenEnabled) {
-           if (rmesa->TexGenNeedNormals[1]) {
-              inputs |= VERT_BIT_NORMAL;
-           }
-        } else {
-           inputs |= VERT_BIT_TEX1;
-        }
-      }
-
-      stage->inputs = inputs;
-      stage->active = 1;
-   }
-   else
-      stage->active = 0;
-}
-
-static void radeon_init_tcl_render( GLcontext *ctx,
-                                   struct tnl_pipeline_stage *stage )
-{
-   stage->check = radeon_check_tcl_render;
-   stage->check( ctx, stage );
-}
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
-
 /* Initial state for tcl stage.  
  */
 const struct tnl_pipeline_stage _radeon_tcl_stage =
 {
    "radeon render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_LIGHT|
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, NULL,                    /* changed_inputs, private */
-   dtr,                                /* destructor */
-   radeon_init_tcl_render,     /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    radeon_run_tcl_render       /* run */
 };
 
index e97a94d25cd4e67d054d0cd81dce1822e2e10ca3..6aaa94976e3493b7a7d63282ad9461a9097a782d 100644 (file)
@@ -191,62 +191,13 @@ static GLboolean s3v_run_render( GLcontext *ctx,
 }
 
 
-static void s3v_check_render( GLcontext *ctx,
-                                struct tnl_pipeline_stage *stage )
-{
-       s3vContextPtr vmesa = S3V_CONTEXT(ctx);
-       GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
-
-       DEBUG(("s3v_check_render\n"));
-
-       if (ctx->RenderMode == GL_RENDER) {
-       
-               if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
-                       DEBUG(("DD_SEPARATE_SPECULAR\n"));
-                       inputs |= VERT_BIT_COLOR1;
-               }
-               
-               if (ctx->Texture.Unit[0]._ReallyEnabled) {
-                       DEBUG(("ctx->Texture.Unit[0]._ReallyEnabled\n"));
-                       inputs |= VERT_BIT_TEX(0);
-               }
-
-               if (ctx->Texture.Unit[1]._ReallyEnabled) {
-                       DEBUG(("ctx->Texture.Unit[1]._ReallyEnabled\n"));
-                       inputs |= VERT_BIT_TEX(1);
-               }
-
-               if (ctx->Fog.Enabled) {
-                       DEBUG(("ctx->Fog.Enabled\n"));
-                       inputs |= VERT_BIT_FOG;
-               }
-       }
-
-       stage->inputs = inputs;
-       vmesa->SetupNewInputs = inputs;
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-       (void)stage;
-        /* hack to silence a compiler warning */
-        (void) &s3v_validate_render;
-}
-
 
 const struct tnl_pipeline_stage _s3v_render_stage =
 {
        "s3v render",
-       (_DD_NEW_SEPARATE_SPECULAR |
-        _NEW_TEXTURE|
-        _NEW_FOG|
-        _NEW_RENDERMODE),      /* re-check (new inputs) */
-        0,                     /* re-run (always runs) */
-        GL_TRUE,               /* active */
-        0, 0,                  /* inputs (set in check_render), outputs */
-        0, 0,                  /* changed_inputs, private */
-        dtr,                   /* destructor */
-        s3v_check_render,      /* check - initially set to alloc data */
+       NULL,
+       NULL,
+       NULL,
+       NULL,
         s3v_run_render         /* run */
 };
index 46871f964cc620e672b1897f6fccbc33a382b150..d7320ff88484c42ff26637dcf4161859ad608bd8 100644 (file)
@@ -151,7 +151,7 @@ static GLboolean savage_run_render( GLcontext *ctx,
    GLboolean valid;
    GLuint i;
 
-   if (savageHaveIndexedVerts(imesa) && (!VB->Elts || stage->changed_inputs))
+   if (savageHaveIndexedVerts(imesa))
       savageReleaseIndexedVerts(imesa);
 
    if (imesa->savageScreen->chipset < S3_SAVAGE4 &&
@@ -211,31 +211,13 @@ static GLboolean savage_run_render( GLcontext *ctx,
    return GL_FALSE;            /* finished the pipe */
 }
 
-static void savage_check_render( GLcontext *ctx,
-                                struct tnl_pipeline_stage *stage )
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-   stage->active = SAVAGE_CONTEXT(ctx)->enable_fastpath;
-}
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-   (void)stage;
-}
-
 struct tnl_pipeline_stage _savage_render_stage = 
 { 
    "savage render",
-   (_DD_NEW_SEPARATE_SPECULAR |
-    _NEW_TEXTURE|
-    _NEW_FOG|
-    _NEW_RENDERMODE),          /* re-check (new inputs) */
-   0,                          /* re-run (always runs) */
-   GL_TRUE,                    /* active */
-   0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
-   dtr,                                /* destructor */
-   savage_check_render,                /* check - initially set to alloc data */
+   NULL,
+   NULL,
+   NULL,
+   NULL,
    savage_run_render           /* run */
 };
 
@@ -244,6 +226,7 @@ struct tnl_pipeline_stage _savage_render_stage =
 /*         Pipeline stage for texture coordinate normalization        */
 /**********************************************************************/
 struct texnorm_stage_data {
+   GLboolean active;
    GLvector4f texcoord[MAX_TEXTURE_UNITS];
 };
 
@@ -259,12 +242,11 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
    struct vertex_buffer *VB = &tnl->vb;
    GLuint i;
 
-   if (imesa->Fallback)
+   if (imesa->Fallback || !store->active)
       return GL_TRUE;
 
    for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
-      if (!(stage->inputs & stage->changed_inputs & VERT_BIT_TEX(i)) ||
-         VB->TexCoordPtr[i]->size == 4)
+      if (VB->TexCoordPtr[i]->size == 4)
         /* Never try to normalize homogenous tex coords! */
         continue;
 
@@ -335,16 +317,14 @@ static GLboolean alloc_texnorm_data( GLcontext *ctx,
 
    for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
       _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 );
-
-   /* Now run the stage.
-    */
-   stage->run = run_texnorm_stage;
-   return stage->run( ctx, stage );
+   
+   return GL_TRUE;
 }
 
-static void check_texnorm( GLcontext *ctx,
-                          struct tnl_pipeline_stage *stage )
+static void validate_texnorm( GLcontext *ctx,
+                             struct tnl_pipeline_stage *stage )
 {
+   struct texnorm_stage_data *store = TEXNORM_STAGE_DATA(stage);
    GLuint flags = 0;
 
    if (((ctx->Texture.Unit[0]._ReallyEnabled & (TEXTURE_1D_BIT|TEXTURE_2D_BIT)) &&
@@ -359,9 +339,7 @@ static void check_texnorm( GLcontext *ctx,
        (ctx->Texture.Unit[1]._Current->WrapT == GL_REPEAT)))
       flags |= VERT_BIT_TEX1;
 
-   stage->inputs = flags;
-   stage->outputs = flags;
-   stage->active = (flags != 0);
+   store->active = (flags != 0);
 }
 
 static void free_texnorm_data( struct tnl_pipeline_stage *stage )
@@ -381,14 +359,9 @@ static void free_texnorm_data( struct tnl_pipeline_stage *stage )
 struct tnl_pipeline_stage _savage_texnorm_stage =
 {
    "savage texture coordinate normalization stage", /* name */
-   _NEW_TEXTURE,       /* check_state */
-   _NEW_TEXTURE,       /* run_state */
-   GL_TRUE,                            /* active? */
-   0,                                  /* inputs */
-   0,                                  /* outputs */
-   0,                                  /* changed_inputs */
    NULL,                               /* private data */
-   free_texnorm_data,                  /* destructor */
-   check_texnorm,                      /* check */
    alloc_texnorm_data,                 /* run -- initially set to init */
+   free_texnorm_data,                  /* destructor */
+   validate_texnorm,
+   run_texnorm_stage
 };
index 201235410db0a2643908c346c157d276e2c1def2..387473ef5229f1f9bfede21b410f6234cde52407 100644 (file)
@@ -118,33 +118,13 @@ static GLboolean via_run_fastrender(GLcontext *ctx,
     return GL_FALSE;            /* finished the pipe */
 }
 
-
-static void via_check_fastrender(GLcontext *ctx, 
-                                struct tnl_pipeline_stage *stage)
-{
-   stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
-}
-
-
-static void fastdtr(struct tnl_pipeline_stage *stage)
-{
-    (void)stage;
-}
-
-
 const struct tnl_pipeline_stage _via_fastrender_stage =
 {
     "via fast render",
-    (_DD_NEW_SEPARATE_SPECULAR |
-     _NEW_TEXTURE|
-     _NEW_FOG|
-     _NEW_RENDERMODE),           /* re-check (new inputs) */
-    0,                           /* re-run (always runs) */
-    GL_TRUE,                     /* active */
-    0, 0,                        /* inputs (set in check_render), outputs */
-    0, 0,                        /* changed_inputs, private */
-    fastdtr,                     /* destructor */
-    via_check_fastrender,        /* check - initially set to alloc data */
+    NULL,
+    NULL,
+    NULL,
+    NULL,
     via_run_fastrender           /* run */
 };