Mesa (main): mesa: remove unused drawid_offset parameter from DrawGalliumMultiMode

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 17 03:37:12 UTC 2021


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Jun 14 20:51:20 2021 -0400

mesa: remove unused drawid_offset parameter from DrawGalliumMultiMode

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11939>

---

 src/mesa/main/dd.h               | 14 +++++---------
 src/mesa/main/draw.c             | 11 +++++------
 src/mesa/main/draw.h             |  9 ++++-----
 src/mesa/state_tracker/st_draw.c | 11 +++++------
 src/mesa/vbo/vbo_exec_draw.c     |  8 ++++----
 src/mesa/vbo/vbo_save_draw.c     |  2 +-
 6 files changed, 24 insertions(+), 31 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index da6d4a5e231..384cf07fe93 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -588,21 +588,17 @@ struct dd_function_table {
    /**
     * Same as DrawGallium, but mode can also change between draws.
     *
-    * If mode != NULL, mode changes for each draw.
-    * At least one of them must be non-NULL.
-    *
     * "info" is not const and the following fields can be changed by
     * the callee in addition to the fields listed by DrawGallium:
-    * - info->mode (if mode != NULL)
+    * - info->mode
     *
     * This function exists to decrease complexity of DrawGallium.
     */
    void (*DrawGalliumMultiMode)(struct gl_context *ctx,
-                              struct pipe_draw_info *info,
-                              unsigned drawid_offset,
-                              const struct pipe_draw_start_count_bias *draws,
-                              const unsigned char *mode,
-                              unsigned num_draws);
+                                struct pipe_draw_info *info,
+                                const struct pipe_draw_start_count_bias *draws,
+                                const unsigned char *mode,
+                                unsigned num_draws);
 
    /**
     * Draw a primitive, getting the vertex count, instance count, start
diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c
index 241e63bc0b7..bb506e70771 100644
--- a/src/mesa/main/draw.c
+++ b/src/mesa/main/draw.c
@@ -1066,11 +1066,10 @@ _mesa_draw_gallium_fallback(struct gl_context *ctx,
  */
 void
 _mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
-                                    struct pipe_draw_info *info,
-                                    unsigned drawid_offset,
-                                    const struct pipe_draw_start_count_bias *draws,
-                                    const unsigned char *mode,
-                                    unsigned num_draws)
+                                      struct pipe_draw_info *info,
+                                      const struct pipe_draw_start_count_bias *draws,
+                                      const unsigned char *mode,
+                                      unsigned num_draws)
 {
    unsigned i, first;
  
@@ -1078,7 +1077,7 @@ _mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
    for (i = 0, first = 0; i <= num_draws; i++) {
       if (i == num_draws || mode[i] != mode[first]) {
          info->mode = mode[first];
-         ctx->Driver.DrawGallium(ctx, info, drawid_offset, &draws[first], i - first);
+         ctx->Driver.DrawGallium(ctx, info, 0, &draws[first], i - first);
          first = i;
       }
    }
diff --git a/src/mesa/main/draw.h b/src/mesa/main/draw.h
index 061919815a9..e720cfca0c9 100644
--- a/src/mesa/main/draw.h
+++ b/src/mesa/main/draw.h
@@ -96,11 +96,10 @@ _mesa_draw_gallium_fallback(struct gl_context *ctx,
 
 void
 _mesa_draw_gallium_multimode_fallback(struct gl_context *ctx,
-                                    struct pipe_draw_info *info,
-                                    unsigned drawid_offset,
-                                    const struct pipe_draw_start_count_bias *draws,
-                                    const unsigned char *mode,
-                                    unsigned num_draws);
+                                     struct pipe_draw_info *info,
+                                     const struct pipe_draw_start_count_bias *draws,
+                                     const unsigned char *mode,
+                                     unsigned num_draws);
 
 void GLAPIENTRY
 _mesa_EvalMesh1(GLenum mode, GLint i1, GLint i2);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index f41782196ce..108e46ecd86 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -189,11 +189,10 @@ st_draw_gallium(struct gl_context *ctx,
 
 static void
 st_draw_gallium_multimode(struct gl_context *ctx,
-                        struct pipe_draw_info *info,
-                        unsigned drawid_offset,
-                        const struct pipe_draw_start_count_bias *draws,
-                        const unsigned char *mode,
-                        unsigned num_draws)
+                          struct pipe_draw_info *info,
+                          const struct pipe_draw_start_count_bias *draws,
+                          const unsigned char *mode,
+                          unsigned num_draws)
 {
    struct st_context *st = st_context(ctx);
 
@@ -209,7 +208,7 @@ st_draw_gallium_multimode(struct gl_context *ctx,
    for (i = 0, first = 0; i <= num_draws; i++) {
       if (i == num_draws || mode[i] != mode[first]) {
          info->mode = mode[first];
-         cso_multi_draw(cso, info, drawid_offset, &draws[first], i - first);
+         cso_multi_draw(cso, info, 0, &draws[first], i - first);
          first = i;
 
          /* We can pass the reference only once. st_buffer_object keeps
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index f631b00bb07..af5ae03ef9a 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -333,10 +333,10 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec)
          exec->vtx.info.vertices_per_patch =
             ctx->TessCtrlProgram.patch_vertices;
 
-         ctx->Driver.DrawGalliumMultiMode(ctx, &exec->vtx.info, 0,
-                                        exec->vtx.draw,
-                                        exec->vtx.mode,
-                                        exec->vtx.prim_count);
+         ctx->Driver.DrawGalliumMultiMode(ctx, &exec->vtx.info,
+                                          exec->vtx.draw,
+                                          exec->vtx.mode,
+                                          exec->vtx.prim_count);
 
          /* Get new storage -- unless asked not to. */
          if (!persistent_mapping)
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index 279b064c2cd..1b76c073917 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -243,7 +243,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data, bool copy_to_c
    info->vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
    void *gl_bo = info->index.gl_bo;
    if (node->merged.mode) {
-      ctx->Driver.DrawGalliumMultiMode(ctx, info, 0,
+      ctx->Driver.DrawGalliumMultiMode(ctx, info,
                                        node->merged.start_counts,
                                        node->merged.mode,
                                        node->merged.num_draws);



More information about the mesa-commit mailing list