summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_render.c18
-rw-r--r--src/mesa/drivers/dri/i810/i810render.c21
-rw-r--r--src/mesa/drivers/dri/i830/i830_render.c17
-rw-r--r--src/mesa/drivers/dri/mga/mgarender.c18
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c18
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c18
6 files changed, 8 insertions, 102 deletions
diff --git a/src/mesa/drivers/dri/gamma/gamma_render.c b/src/mesa/drivers/dri/gamma/gamma_render.c
index 380c7b7044c..a0b8a5dc185 100644
--- a/src/mesa/drivers/dri/gamma/gamma_render.c
+++ b/src/mesa/drivers/dri/gamma/gamma_render.c
@@ -212,23 +212,7 @@ static GLboolean gamma_run_render( GLcontext *ctx,
static void gamma_check_render( GLcontext *ctx,
struct tnl_pipeline_stage *stage )
{
- GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
-
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= VERT_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= VERT_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= VERT_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= VERT_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}
diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c
index 19c5dc07c4a..c674378953f 100644
--- a/src/mesa/drivers/dri/i810/i810render.c
+++ b/src/mesa/drivers/dri/i810/i810render.c
@@ -161,25 +161,10 @@ static GLboolean i810_run_render( GLcontext *ctx,
}
-static void i810_check_render( GLcontext *ctx, struct tnl_pipeline_stage *stage )
+static void i810_check_render( GLcontext *ctx,
+ struct tnl_pipeline_stage *stage )
{
- GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
-
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= VERT_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= VERT_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= VERT_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= VERT_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}
diff --git a/src/mesa/drivers/dri/i830/i830_render.c b/src/mesa/drivers/dri/i830/i830_render.c
index caed73ed678..ed4c94437b5 100644
--- a/src/mesa/drivers/dri/i830/i830_render.c
+++ b/src/mesa/drivers/dri/i830/i830_render.c
@@ -221,22 +221,7 @@ static GLboolean i830_run_render( GLcontext *ctx,
static void i830_check_render( GLcontext *ctx,
struct tnl_pipeline_stage *stage )
{
- GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= VERT_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= VERT_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= VERT_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= VERT_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}
static void dtr( struct tnl_pipeline_stage *stage )
diff --git a/src/mesa/drivers/dri/mga/mgarender.c b/src/mesa/drivers/dri/mga/mgarender.c
index 58520098521..3dd15e21a67 100644
--- a/src/mesa/drivers/dri/mga/mgarender.c
+++ b/src/mesa/drivers/dri/mga/mgarender.c
@@ -163,23 +163,7 @@ static GLboolean mga_run_render( GLcontext *ctx,
static void mga_check_render( GLcontext *ctx, struct tnl_pipeline_stage *stage )
{
- GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
-
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= VERT_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= VERT_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= VERT_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= VERT_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index edf00afcae1..231a3ed83f2 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -662,23 +662,7 @@ static GLboolean r200_run_render( GLcontext *ctx,
static void r200_check_render( GLcontext *ctx,
struct tnl_pipeline_stage *stage )
{
- GLuint inputs = _TNL_BIT_POS | _TNL_BIT_COLOR0;
-
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= _TNL_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= _TNL_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= _TNL_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= _TNL_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 61d80c9ac28..d7f9df762e5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -644,23 +644,7 @@ static GLboolean radeon_run_render( GLcontext *ctx,
static void radeon_check_render( GLcontext *ctx,
struct tnl_pipeline_stage *stage )
{
- GLuint inputs = VERT_BIT_POS | VERT_BIT_COLOR0;
-
- if (ctx->RenderMode == GL_RENDER) {
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
- inputs |= VERT_BIT_COLOR1;
-
- if (ctx->Texture.Unit[0]._ReallyEnabled)
- inputs |= VERT_BIT_TEX0;
-
- if (ctx->Texture.Unit[1]._ReallyEnabled)
- inputs |= VERT_BIT_TEX1;
-
- if (ctx->Fog.Enabled)
- inputs |= VERT_BIT_FOG;
- }
-
- stage->inputs = inputs;
+ stage->inputs = TNL_CONTEXT(ctx)->render_inputs;
}