From: Brian Paul Date: Wed, 17 Apr 2013 01:06:22 +0000 (-0600) Subject: mesa: remove gl_context::_TriangleCaps X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3350ca223e4319dce79d26652a3f9c1c63aaf9b3;p=mesa.git mesa: remove gl_context::_TriangleCaps No longer used anywhere. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index 07c73f58519..4516db69de3 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -958,7 +958,7 @@ intelChooseRenderState(struct gl_context * ctx) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct intel_context *intel = intel_context(ctx); - GLuint flags = ctx->_TriangleCaps | + GLuint flags = ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ? DD_TRI_LIGHT_TWOSIDE : 0) | ((ctx->Polygon.FrontMode != GL_FILL || @@ -1159,6 +1159,8 @@ static void intelRenderPrimitive(struct gl_context * ctx, GLenum prim) { struct intel_context *intel = intel_context(ctx); + GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || + ctx->Polygon.BackMode != GL_FILL); if (0) fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim)); @@ -1172,8 +1174,7 @@ intelRenderPrimitive(struct gl_context * ctx, GLenum prim) * primitive will always be reset by lower level functions in that case, * potentially pingponging the state: */ - if (reduced_prim[prim] == GL_TRIANGLES && - (ctx->_TriangleCaps & DD_TRI_UNFILLED)) + if (reduced_prim[prim] == GL_TRIANGLES && unfilled) return; /* Set some primitive-dependent state and Start? a new primitive. diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 68afc240dd8..027bb992232 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3550,11 +3550,6 @@ struct gl_context GLbitfield64 varying_vp_inputs; /**< mask of VERT_BIT_* flags */ /** \name Derived state */ - /*@{*/ - /** Bitwise-or of DD_* flags. Note that this bitfield may be used before - * state validation so they need to always be current. - */ - GLbitfield _TriangleCaps; GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */ GLfloat _EyeZDir[3]; GLfloat _ModelViewInvScale;