Mesa (main): mesa/st: drop poly stipple driver state bit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 23 19:35:09 UTC 2021


Module: Mesa
Branch: main
Commit: 562f01fbc7a45cc01f2bf778c0fcb925afc86d29
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=562f01fbc7a45cc01f2bf778c0fcb925afc86d29

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Dec 20 12:43:37 2021 +1000

mesa/st: drop poly stipple driver state bit

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14261>

---

 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 |



More information about the mesa-commit mailing list