From 562f01fbc7a45cc01f2bf778c0fcb925afc86d29 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 20 Dec 2021 12:43:37 +1000 Subject: [PATCH] mesa/st: drop poly stipple driver state bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Kenneth Graunke Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/attrib.c | 5 +---- src/mesa/main/mtypes.h | 3 --- src/mesa/main/polygon.c | 6 ++---- src/mesa/state_tracker/st_context.c | 2 -- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 7b844828893..ce7bcecdd88 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -979,10 +979,7 @@ _mesa_PopAttrib(void) if (mask & GL_POLYGON_STIPPLE_BIT) { memcpy(ctx->PolygonStipple, attr->PolygonStipple, 32*sizeof(GLuint)); - if (ctx->DriverFlags.NewPolygonStipple) - ctx->NewDriverState |= ctx->DriverFlags.NewPolygonStipple; - else - ctx->NewState |= _NEW_POLYGONSTIPPLE; + ctx->NewDriverState |= ST_NEW_POLY_STIPPLE; } if (mask & GL_SCISSOR_BIT) { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index c3e57f98a3a..9c051d32996 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4842,9 +4842,6 @@ struct gl_driver_flags /** gl_context::Color::ClampFragmentColor */ uint64_t NewFragClamp; - /** gl_context::PolygonStipple */ - uint64_t NewPolygonStipple; - /** Shader constants (uniforms, program parameters, state constants) */ uint64_t NewShaderConstants[MESA_SHADER_STAGES]; diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c index 4a0869aac8e..1473880b1bc 100644 --- a/src/mesa/main/polygon.c +++ b/src/mesa/main/polygon.c @@ -254,10 +254,8 @@ _mesa_PolygonStipple(const GLubyte *pattern) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glPolygonStipple\n"); - FLUSH_VERTICES(ctx, ctx->DriverFlags.NewPolygonStipple ? 0 : - _NEW_POLYGONSTIPPLE, - GL_POLYGON_STIPPLE_BIT); - ctx->NewDriverState |= ctx->DriverFlags.NewPolygonStipple; + FLUSH_VERTICES(ctx, 0, GL_POLYGON_STIPPLE_BIT); + ctx->NewDriverState |= ST_NEW_POLY_STIPPLE; pattern = _mesa_map_validate_pbo_source(ctx, 2, &ctx->Unpack, 32, 32, 1, diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 77e5bd23993..0150e799ff7 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -504,8 +504,6 @@ st_init_driver_flags(struct st_context *st) else f->NewClipPlaneEnable = ST_NEW_RASTERIZER; - f->NewPolygonStipple = ST_NEW_POLY_STIPPLE; - if (st->emulate_gl_clamp) f->NewSamplersWithClamp = ST_NEW_SAMPLERS | ST_NEW_VS_STATE | ST_NEW_TCS_STATE |