diff options
author | Marek Olšák <[email protected]> | 2017-06-10 12:25:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-06-22 01:51:02 +0200 |
commit | 58a02196b99d375481af5abfdcba967167f99d7a (patch) | |
tree | 52b0e27c15300096f90ca435f84a87bed83c5554 /src/mesa/main | |
parent | bc871a1baf8979310eb7adc1b87342e389616027 (diff) |
mesa: don't flag _NEW_LINE 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')
-rw-r--r-- | src/mesa/main/enable.c | 6 | ||||
-rw-r--r-- | src/mesa/main/lines.c | 6 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index cb873c9cf57..752a740c861 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -448,7 +448,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Line.SmoothFlag == state) return; - FLUSH_VERTICES(ctx, _NEW_LINE); + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewLineState ? 0 : _NEW_LINE); + ctx->NewDriverState |= ctx->DriverFlags.NewLineState; ctx->Line.SmoothFlag = state; break; case GL_LINE_STIPPLE: @@ -456,7 +457,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) goto invalid_enum_error; if (ctx->Line.StippleFlag == state) return; - FLUSH_VERTICES(ctx, _NEW_LINE); + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewLineState ? 0 : _NEW_LINE); + ctx->NewDriverState |= ctx->DriverFlags.NewLineState; ctx->Line.StippleFlag = state; break; case GL_INDEX_LOGIC_OP: diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index 93b80af0dc4..d83a7d88d12 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -72,7 +72,8 @@ _mesa_LineWidth( GLfloat width ) return; } - FLUSH_VERTICES(ctx, _NEW_LINE); + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewLineState ? 0 : _NEW_LINE); + ctx->NewDriverState |= ctx->DriverFlags.NewLineState; ctx->Line.Width = width; if (ctx->Driver.LineWidth) @@ -106,7 +107,8 @@ _mesa_LineStipple( GLint factor, GLushort pattern ) ctx->Line.StipplePattern == pattern) return; - FLUSH_VERTICES(ctx, _NEW_LINE); + FLUSH_VERTICES(ctx, ctx->DriverFlags.NewLineState ? 0 : _NEW_LINE); + ctx->NewDriverState |= ctx->DriverFlags.NewLineState; ctx->Line.StippleFactor = factor; ctx->Line.StipplePattern = pattern; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 57f775c865d..d55451a1eac 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4520,6 +4520,9 @@ struct gl_driver_flags /** gl_context::Transform::DepthClamp */ uint64_t NewDepthClamp; + /** gl_context::Line */ + uint64_t NewLineState; + /** gl_context::Polygon */ uint64_t NewPolygonState; |