[Mesa-dev] [PATCH 11/11] mesa: remove gl_context::_TriangleCaps

Brian Paul brianp at vmware.com
Mon Apr 15 18:59:38 PDT 2013


No longer needed anywhere.
---
 src/mesa/drivers/dri/i915/intel_tris.c |    7 ++++---
 src/mesa/main/mtypes.h                 |    5 -----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 9a0fef1..72b5483 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -959,7 +959,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) << 1) |
       ((ctx->Polygon.FrontMode != GL_FILL ||
         ctx->Polygon.BackMode != GL_FILL) << 2) |
@@ -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 68afc24..027bb99 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;
-- 
1.7.3.4



More information about the mesa-dev mailing list