Mesa (main): mesa/st: drop the new array driver state bit

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


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

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

mesa/st: drop the new array 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/draw.c                     | 3 ++-
 src/mesa/main/mtypes.h                   | 5 +----
 src/mesa/main/state.c                    | 2 +-
 src/mesa/state_tracker/st_atom_array.cpp | 2 +-
 src/mesa/state_tracker/st_context.c      | 1 -
 5 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c
index e291f69791f..a28861b0165 100644
--- a/src/mesa/main/draw.c
+++ b/src/mesa/main/draw.c
@@ -43,6 +43,7 @@
 #include "pipe/p_state.h"
 #include "api_exec_decl.h"
 
+#include "state_tracker/st_context.h"
 #include "state_tracker/st_draw.h"
 
 typedef struct {
@@ -135,7 +136,7 @@ _mesa_set_draw_vao(struct gl_context *ctx, struct gl_vertex_array_object *vao,
    }
 
    if (new_vertex_buffers || new_vertex_elements) {
-      ctx->NewDriverState |= ctx->DriverFlags.NewArray;
+      ctx->NewDriverState |= ST_NEW_VERTEX_ARRAYS;
       ctx->Array.NewVertexElements |= new_vertex_elements;
    }
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c3fc03c030c..fd94febb08d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1708,7 +1708,7 @@ struct gl_array_attrib
     * If gallium vertex buffers are dirty, this flag indicates whether gallium
     * vertex elements are dirty too. If this is false, GL states corresponding
     * to vertex elements have not been changed. Thus, this affects what will
-    * happen when gl_driver_flags::NewArray is set.
+    * happen when ST_NEW_VERTEX_ARRAYS is set.
     *
     * The driver should clear this when it's done.
     */
@@ -4768,9 +4768,6 @@ struct gl_dlist_state
  */
 struct gl_driver_flags
 {
-   /** gl_context::Array::_DrawArrays (vertex array state) */
-   uint64_t NewArray;
-
    /** gl_context::TransformFeedback::CurrentObject */
    uint64_t NewTransformFeedback;
 
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index d02e713ae19..2356f1ff694 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -518,7 +518,7 @@ set_vertex_processing_mode(struct gl_context *ctx, gl_vertex_processing_mode m)
       return;
 
    /* On change we may get new maps into the current values */
-   ctx->NewDriverState |= ctx->DriverFlags.NewArray;
+   ctx->NewDriverState |= ST_NEW_VERTEX_ARRAYS;
    ctx->Array.NewVertexElements = true;
 
    /* Finally memorize the value */
diff --git a/src/mesa/state_tracker/st_atom_array.cpp b/src/mesa/state_tracker/st_atom_array.cpp
index 018f303e4d7..bc5a165aabd 100644
--- a/src/mesa/state_tracker/st_atom_array.cpp
+++ b/src/mesa/state_tracker/st_atom_array.cpp
@@ -311,7 +311,7 @@ st_update_array_templ(struct st_context *st)
    struct cso_velems_state velements;
    bool uses_user_vertex_buffers;
 
-   /* ST_NEW_VERTEX_ARRAYS alias ctx->DriverFlags.NewArray */
+   /* ST_NEW_VERTEX_ARRAYS */
    /* Setup arrays */
    setup_arrays<POPCNT, UPDATE>
       (st, ctx->Array._DrawVAO, vp->Base.Base.DualSlotInputs,
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 979b338901f..2ad84c279f7 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -447,7 +447,6 @@ st_init_driver_flags(struct st_context *st)
 {
    struct gl_driver_flags *f = &st->ctx->DriverFlags;
 
-   f->NewArray = ST_NEW_VERTEX_ARRAYS;
    f->NewRasterizerDiscard = ST_NEW_RASTERIZER;
    f->NewTileRasterOrder = ST_NEW_RASTERIZER;
    f->NewUniformBuffer = ST_NEW_UNIFORM_BUFFER;



More information about the mesa-commit mailing list