aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/polygon.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-10 12:18:34 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commitbc871a1baf8979310eb7adc1b87342e389616027 (patch)
treef94a58f7dfcea798dbd13b51ec831c92d378cc85 /src/mesa/main/polygon.c
parent00173d91b70ae4dcea7c6324ee4858c498cae14b (diff)
mesa: don't flag _NEW_POLYGON for st/mesa
Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/polygon.c')
-rw-r--r--src/mesa/main/polygon.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index e509fe4d989..8153c5ec0be 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -66,7 +66,8 @@ _mesa_CullFace( GLenum mode )
if (ctx->Polygon.CullFaceMode == mode)
return;
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.CullFaceMode = mode;
if (ctx->Driver.CullFace)
@@ -101,7 +102,8 @@ _mesa_FrontFace( GLenum mode )
return;
}
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.FrontFace = mode;
if (ctx->Driver.FrontFace)
@@ -153,13 +155,15 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
}
if (ctx->Polygon.FrontMode == mode)
return;
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.FrontMode = mode;
break;
case GL_FRONT_AND_BACK:
if (ctx->Polygon.FrontMode == mode && ctx->Polygon.BackMode == mode)
return;
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.FrontMode = mode;
ctx->Polygon.BackMode = mode;
break;
@@ -170,7 +174,8 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
}
if (ctx->Polygon.BackMode == mode)
return;
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.BackMode = mode;
break;
default:
@@ -252,7 +257,8 @@ _mesa_polygon_offset_clamp(struct gl_context *ctx,
ctx->Polygon.OffsetClamp == clamp)
return;
- FLUSH_VERTICES(ctx, _NEW_POLYGON);
+ FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON);
+ ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState;
ctx->Polygon.OffsetFactor = factor;
ctx->Polygon.OffsetUnits = units;
ctx->Polygon.OffsetClamp = clamp;