summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-04-17 11:58:33 -0600
committerBrian Paul <[email protected]>2013-04-17 11:59:42 -0600
commitcbbcb0247e6aa8d7adc274a94206ee02f9c70bea (patch)
tree368c41d00e04bdd4e021acee570257f06e873ddd /src/mesa/drivers/dri/r200
parentc9bb052e31b7952272e60d28969e90eafb6b3e1f (diff)
mesa: remove DD_TRI_LIGHT_TWOSIDE flag
v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c9
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 fb92e751a1b..274e3386b4a 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;