From cbbcb0247e6aa8d7adc274a94206ee02f9c70bea Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 17 Apr 2013 11:58:33 -0600 Subject: mesa: remove DD_TRI_LIGHT_TWOSIDE flag v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i915/intel_tris.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index 9a9c56f3eea..07c73f58519 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -943,6 +943,7 @@ intelFastRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint /**********************************************************************/ +#define DD_TRI_LIGHT_TWOSIDE (1 << 1) #define DD_TRI_UNFILLED (1 << 2) #define DD_TRI_STIPPLE (1 << 4) #define DD_TRI_OFFSET (1 << 5) @@ -958,6 +959,8 @@ intelChooseRenderState(struct gl_context * ctx) TNLcontext *tnl = TNL_CONTEXT(ctx); struct intel_context *intel = intel_context(ctx); GLuint flags = ctx->_TriangleCaps | + ((ctx->Light.Enabled && + ctx->Light.Model.TwoSide) ? DD_TRI_LIGHT_TWOSIDE : 0) | ((ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL) ? DD_TRI_UNFILLED : 0) | (ctx->Polygon.StippleFlag ? DD_TRI_STIPPLE : 0) | -- cgit v1.2.3