aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2007-02-03 03:31:31 +0100
committerRoland Scheidegger <[email protected]>2007-02-03 03:31:31 +0100
commit2a441c488f4bcf11fe032ea7ba448bbfb7449c66 (patch)
treee932fba1d787b90f129fe0e3f0b0e1c8b81337b4 /src/mesa/drivers/dri/r200
parentf697308ae583dbcdf0268e98232c32be7f25fac6 (diff)
disable r200 materials-between-begin-end check if vertex progs are enabled
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index bab767838d8..bdb487f2b93 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -2542,15 +2542,17 @@ static void r200InvalidateState( GLcontext *ctx, GLuint new_state )
}
/* A hack. The r200 can actually cope just fine with materials
- * between begin/ends, so fix this. But how ?
+ * between begin/ends, so fix this.
+ * Should map to inputs just like the generic vertex arrays for vertex progs.
+ * In theory there could still be too many and we'd still need a fallback.
*/
static GLboolean check_material( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLint i;
- for (i = _TNL_ATTRIB_MAT_FRONT_AMBIENT;
- i < _TNL_ATTRIB_MAT_BACK_INDEXES;
+ for (i = _TNL_ATTRIB_MAT_FRONT_AMBIENT;
+ i < _TNL_ATTRIB_MAT_BACK_INDEXES;
i++)
if (tnl->vb.AttribPtr[i] &&
tnl->vb.AttribPtr[i]->stride)
@@ -2558,7 +2560,7 @@ static GLboolean check_material( GLcontext *ctx )
return GL_FALSE;
}
-
+
static void r200WrapRunPipeline( GLcontext *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -2572,7 +2574,7 @@ static void r200WrapRunPipeline( GLcontext *ctx )
if (rmesa->NewGLState)
r200ValidateState( ctx );
- has_material = (ctx->Light.Enabled && check_material( ctx ));
+ has_material = !ctx->VertexProgram._Enabled && ctx->Light.Enabled && check_material( ctx );
if (has_material) {
TCL_FALLBACK( ctx, R200_TCL_FALLBACK_MATERIAL, GL_TRUE );