diff options
author | Marek Olšák <[email protected]> | 2017-06-10 12:18:34 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | bc871a1baf8979310eb7adc1b87342e389616027 (patch) | |
tree | f94a58f7dfcea798dbd13b51ec831c92d378cc85 /src/mesa/main/enable.c | |
parent | 00173d91b70ae4dcea7c6324ee4858c498cae14b (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/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 2f348d8940f..cb873c9cf57 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -382,7 +382,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) case GL_CULL_FACE: if (ctx->Polygon.CullFlag == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.CullFlag = state; break; case GL_DEPTH_TEST: @@ -650,7 +652,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Polygon.SmoothFlag == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.SmoothFlag = state; break; case GL_POLYGON_STIPPLE: @@ -658,7 +662,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Polygon.StippleFlag == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.StippleFlag = state; break; case GL_POLYGON_OFFSET_POINT: @@ -666,7 +672,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Polygon.OffsetPoint == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.OffsetPoint = state; break; case GL_POLYGON_OFFSET_LINE: @@ -674,13 +682,17 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Polygon.OffsetLine == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.OffsetLine = state; break; case GL_POLYGON_OFFSET_FILL: if (ctx->Polygon.OffsetFill == state) return; - FLUSH_VERTICES(ctx, _NEW_POLYGON); + FLUSH_VERTICES(ctx, + ctx->DriverFlags.NewPolygonState ? 0 : _NEW_POLYGON); + ctx->NewDriverState |= ctx->DriverFlags.NewPolygonState; ctx->Polygon.OffsetFill = state; break; case GL_RESCALE_NORMAL_EXT: |