diff options
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_swtcl.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_swtcl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c index fb92e75..274e338 100644 --- a/src/mesa/drivers/dri/r200/r200_swtcl.c +++ b/src/mesa/drivers/dri/r200/r200_swtcl.c @@ -241,6 +241,7 @@ void r200ChooseVertexState( struct gl_context *ctx ) GLuint vap; GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); + GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide; /* We must ensure that we don't do _tnl_need_projected_coords while in a * rasterization fallback. As this function will be called again when we @@ -573,15 +574,17 @@ void r200ChooseRenderState( struct gl_context *ctx ) TNLcontext *tnl = TNL_CONTEXT(ctx); r200ContextPtr rmesa = R200_CONTEXT(ctx); GLuint index = 0; - GLuint flags = ctx->_TriangleCaps; GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); + GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide; if (!rmesa->radeon.TclFallback || rmesa->radeon.Fallback) return; - if (flags & DD_TRI_LIGHT_TWOSIDE) index |= R200_TWOSIDE_BIT; - if (unfilled) index |= R200_UNFILLED_BIT; + if (twosided) + index |= R200_TWOSIDE_BIT; + if (unfilled) + index |= R200_UNFILLED_BIT; if (index != rmesa->radeon.swtcl.RenderIndex) { tnl->Driver.Render.Points = rast_tab[index].points; |