mesa: remove unused "indirect" parameter from Driver.Draw
authorMarek Olšák <marek.olsak@amd.com>
Tue, 11 Feb 2020 01:02:30 +0000 (20:02 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Feb 2020 00:53:45 +0000 (00:53 +0000)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>

18 files changed:
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_draw.h
src/mesa/drivers/dri/i965/brw_primitive_restart.c
src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
src/mesa/main/dd.h
src/mesa/main/draw.c
src/mesa/state_tracker/st_cb_rasterpos.c
src/mesa/state_tracker/st_draw.c
src/mesa/state_tracker/st_draw.h
src/mesa/state_tracker/st_draw_feedback.c
src/mesa/tnl/t_draw.c
src/mesa/tnl/t_rebase.c
src/mesa/tnl/t_split_copy.c
src/mesa/tnl/t_split_inplace.c
src/mesa/tnl/tnl.h
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_primitive_restart.c
src/mesa/vbo/vbo_save_draw.c

index 92c57742d75b854b8c7c51edac715ee941239942..a8dd1572bac804fe765197e360cfa6fdc849f241 100644 (file)
@@ -1104,8 +1104,7 @@ brw_draw_prims(struct gl_context *ctx,
                GLuint min_index,
                GLuint max_index,
                struct gl_transform_feedback_object *gl_xfb_obj,
-               unsigned stream,
-               UNUSED struct gl_buffer_object *unused_indirect)
+               unsigned stream)
 {
    unsigned i;
    struct brw_context *brw = brw_context(ctx);
@@ -1131,7 +1130,7 @@ brw_draw_prims(struct gl_context *ctx,
       _swsetup_Wakeup(ctx);
       _tnl_wakeup(ctx);
       _tnl_draw(ctx, prims, nr_prims, ib,
-                index_bounds_valid, min_index, max_index, NULL, 0, NULL);
+                index_bounds_valid, min_index, max_index, NULL, 0);
       return;
    }
 
@@ -1234,8 +1233,7 @@ brw_draw_indirect_prims(struct gl_context *ctx,
 
    brw_draw_prims(ctx, prim, draw_count,
                   ib, false, 0, ~0,
-                  NULL, 0,
-                  NULL);
+                  NULL, 0);
 
    brw->draw.draw_indirect_data = NULL;
    free(prim);
index 1e111fe74319284bed6264ac03bde7779d21b895..ddbf6238a17462f9324320e3e98720a7be7ccc5e 100644 (file)
@@ -52,8 +52,7 @@ void brw_draw_prims(struct gl_context *ctx,
                     GLuint min_index,
                     GLuint max_index,
                     struct gl_transform_feedback_object *unused_tfb_object,
-                     unsigned stream,
-                    struct gl_buffer_object *indirect );
+                     unsigned stream);
 
 void brw_init_draw_functions(struct dd_function_table *functions);
 void brw_draw_init( struct brw_context *brw );
index 4e4aeeb0a80fd4b9606370acdd667ff646551103..dfb9735ef29c694ce8b8448cf3f47602d2dc3323 100644 (file)
@@ -162,8 +162,7 @@ brw_handle_primitive_restart(struct gl_context *ctx,
       /* Cut index should work for primitive restart, so use it
        */
       brw->prim_restart.enable_cut_index = true;
-      brw_draw_prims(ctx, prims, nr_prims, ib, GL_FALSE, -1, -1, NULL, 0,
-                     NULL);
+      brw_draw_prims(ctx, prims, nr_prims, ib, GL_FALSE, -1, -1, NULL, 0);
       brw->prim_restart.enable_cut_index = false;
    } else {
       /* Not all the primitive draw modes are supported by the cut index,
index 280c0ecc2913782c4fa2378a1c93483a5f3ecab0..d365f7a531a56a5b21970df5549da027cf1bf4bd 100644 (file)
@@ -245,8 +245,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
                      GLboolean index_bounds_valid,
                      GLuint min_index, GLuint max_index,
                      struct gl_transform_feedback_object *tfb_vertcount,
-                      unsigned stream,
-                     struct gl_buffer_object *indirect);
+                      unsigned stream);
 
 static GLboolean
 vbo_maybe_split(struct gl_context *ctx, const struct tnl_vertex_array *arrays,
@@ -483,8 +482,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
                      GLboolean index_bounds_valid,
                      GLuint min_index, GLuint max_index,
                      struct gl_transform_feedback_object *tfb_vertcount,
-                      unsigned stream,
-                     struct gl_buffer_object *indirect)
+                      unsigned stream)
 {
        struct nouveau_render_state *render = to_render_state(ctx);
 
@@ -521,8 +519,7 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
                            GLboolean index_bounds_valid,
                            GLuint min_index, GLuint max_index,
                            struct gl_transform_feedback_object *tfb_vertcount,
-                            unsigned stream,
-                           struct gl_buffer_object *indirect)
+                            unsigned stream)
 {
        struct nouveau_context *nctx = to_nouveau_context(ctx);
 
@@ -531,12 +528,12 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
        if (nctx->fallback == HWTNL)
                TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib,
                                      index_bounds_valid, min_index, max_index,
-                                     tfb_vertcount, stream, indirect);
+                                     tfb_vertcount, stream);
 
        if (nctx->fallback == SWTNL)
                _tnl_draw_prims(ctx, arrays, prims, nr_prims, ib,
                                index_bounds_valid, min_index, max_index,
-                               tfb_vertcount, stream, indirect);
+                               tfb_vertcount, stream);
 }
 
 static void
@@ -546,8 +543,7 @@ TAG(vbo_draw)(struct gl_context *ctx,
              GLboolean index_bounds_valid,
              GLuint min_index, GLuint max_index,
              struct gl_transform_feedback_object *tfb_vertcount,
-             unsigned stream,
-             struct gl_buffer_object *indirect)
+             unsigned stream)
 {
        /* Borrow and update the inputs list from the tnl context */
        const struct tnl_vertex_array* arrays = _tnl_bind_inputs(ctx);
@@ -555,7 +551,7 @@ TAG(vbo_draw)(struct gl_context *ctx,
        TAG(vbo_check_render_prims)(ctx, arrays,
                                    prims, nr_prims, ib,
                                    index_bounds_valid, min_index, max_index,
-                                   tfb_vertcount, stream, indirect);
+                                   tfb_vertcount, stream);
 }
 
 void
index 72af158dd07cd43aff23a2000768b8cffed39c26..824f320668b9af05b70f684249cd70ad72c9dad8 100644 (file)
@@ -543,7 +543,7 @@ struct dd_function_table {
                 GLboolean index_bounds_valid,
                 GLuint min_index, GLuint max_index,
                 struct gl_transform_feedback_object *tfb_vertcount,
-                unsigned tfb_stream, struct gl_buffer_object *indirect);
+                unsigned tfb_stream);
 
 
    /**
index 5a28c77e42c09131fb4d06fadaa57ce7806258f2..4ace7c2df4fd6f506c0560e279e42eb7cd3934cc 100644 (file)
@@ -370,7 +370,7 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start,
    };
 
    ctx->Driver.Draw(ctx, &prim, 1, NULL,
-                    GL_TRUE, start, start + count - 1, NULL, 0, NULL);
+                    GL_TRUE, start, start + count - 1, NULL, 0);
 
    if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
       _mesa_flush(ctx);
@@ -810,7 +810,7 @@ _mesa_validated_drawrangeelements(struct gl_context *ctx, GLenum mode,
     */
 
    ctx->Driver.Draw(ctx, &prim, 1, &ib,
-                    index_bounds_valid, start, end, NULL, 0, NULL);
+                    index_bounds_valid, start, end, NULL, 0);
 
    if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
       _mesa_flush(ctx);
@@ -1241,7 +1241,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
       }
 
       ctx->Driver.Draw(ctx, prim, primcount, &ib,
-                       false, 0, ~0, NULL, 0, NULL);
+                       false, 0, ~0, NULL, 0);
    }
    else {
       /* render one prim at a time */
@@ -1267,7 +1267,7 @@ _mesa_validated_multidrawelements(struct gl_context *ctx, GLenum mode,
          else
             prim[0].basevertex = 0;
 
-         ctx->Driver.Draw(ctx, prim, 1, &ib, false, 0, ~0, NULL, 0, NULL);
+         ctx->Driver.Draw(ctx, prim, 1, &ib, false, 0, ~0, NULL, 0);
       }
    }
 
@@ -1384,7 +1384,7 @@ _mesa_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
     * (like in DrawArrays), but we have no way to know how many vertices
     * will be rendered. */
 
-   ctx->Driver.Draw(ctx, &prim, 1, NULL, GL_FALSE, 0, ~0, obj, stream, NULL);
+   ctx->Driver.Draw(ctx, &prim, 1, NULL, GL_FALSE, 0, ~0, obj, stream);
 
    if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) {
       _mesa_flush(ctx);
index 44d1586ddb7751b79a62d3f1cc46f5da4ad92b63..b6f22601f8291318d1befc38db4d4516264e4d57 100644 (file)
@@ -264,7 +264,7 @@ st_RasterPos(struct gl_context *ctx, const GLfloat v[4])
 
    /* Draw the point. */
    st_feedback_draw_vbo(ctx, &rs->prim, 1, NULL, GL_TRUE, 0, 1,
-                        NULL, 0, NULL);
+                        NULL, 0);
 
    /* restore draw's rasterization stage depending on rendermode */
    if (ctx->RenderMode == GL_FEEDBACK) {
index 3ff52b0a5e39d58d12c42857a15aa598cf7dc475..d0a27a01d26d65b03d1b10139243d876e4040ba1 100644 (file)
@@ -173,8 +173,7 @@ st_draw_vbo(struct gl_context *ctx,
             GLuint min_index,
             GLuint max_index,
             struct gl_transform_feedback_object *tfb_vertcount,
-            unsigned stream,
-            struct gl_buffer_object *indirect)
+            unsigned stream)
 {
    struct st_context *st = st_context(ctx);
    struct pipe_draw_info info;
@@ -235,8 +234,6 @@ st_draw_vbo(struct gl_context *ctx,
       }
    }
 
-   assert(!indirect);
-
    /* do actual drawing */
    for (i = 0; i < nr_prims; i++) {
       info.count = prims[i].count;
index 5b897bda1181fef867845da2721c80f5da0037f4..5c1dd033cd445279264c016395700b12d53c46b4 100644 (file)
@@ -56,8 +56,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
                      GLuint min_index,
                      GLuint max_index,
                      struct gl_transform_feedback_object *tfb_vertcount,
-                     unsigned stream,
-                     struct gl_buffer_object *indirect);
+                     unsigned stream);
 
 /**
  * When drawing with VBOs, the addresses specified with
index 0b70a08a870a545966a4eb1f9029211a05266af5..813a6388c7917b49f81feb65d3f1d9481fd38bf3 100644 (file)
@@ -101,8 +101,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
                      GLuint min_index,
                      GLuint max_index,
                      struct gl_transform_feedback_object *tfb_vertcount,
-                     unsigned stream,
-                     struct gl_buffer_object *indirect)
+                     unsigned stream)
 {
    struct st_context *st = st_context(ctx);
    struct pipe_context *pipe = st->pipe;
index 009a0bf362656067ada660d9fb387d33a4dbe878..a2388b9b14f491e61f9e55cd7cf5a516a615611d 100644 (file)
@@ -435,8 +435,7 @@ void _tnl_draw_prims(struct gl_context *ctx,
                         GLuint min_index,
                         GLuint max_index,
                         struct gl_transform_feedback_object *tfb_vertcount,
-                         unsigned stream,
-                        struct gl_buffer_object *indirect)
+                         unsigned stream)
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    const GLuint TEST_SPLIT = 0;
@@ -639,7 +638,7 @@ _tnl_draw(struct gl_context *ctx,
           const struct _mesa_index_buffer *ib,
           GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
           struct gl_transform_feedback_object *tfb_vertcount,
-          unsigned stream, struct gl_buffer_object *indirect)
+          unsigned stream)
 {
    /* Update TNLcontext::draw_arrays and return that pointer.
     */
@@ -647,7 +646,7 @@ _tnl_draw(struct gl_context *ctx,
 
    _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib,
                    index_bounds_valid, min_index, max_index,
-                   tfb_vertcount, stream, indirect);
+                   tfb_vertcount, stream);
 }
 
 
index b6950e04fec8af13b28178fd16d47b6786980c18..24abcef98a284ee0a0d26fe05ed2c2c6c830c467 100644 (file)
@@ -242,7 +242,7 @@ void t_rebase_prims( struct gl_context *ctx,
         GL_TRUE,
         0, 
         max_index - min_index,
-        NULL, 0, NULL );
+        NULL, 0);
 
    free(tmp_indices);
    
index b67deb6a3ae91c8d0317cd36a1e9d2a9aa3520c6..511e46c1e2fe8d01bf9232b47cd5a7ca9f1743ed 100644 (file)
@@ -211,7 +211,7 @@ flush(struct copy_context *copy)
               GL_TRUE,
               0,
               copy->dstbuf_nr - 1,
-              NULL, 0, NULL);
+              NULL, 0);
 
    /* Reset all pointers:
     */
index 8e9ecb70468834acf8f841b0ceb2f8deb54da712..395af573361681adb96ffb83e3cf4a686fb66c52 100644 (file)
@@ -93,7 +93,7 @@ flush_vertex( struct split_context *split)
                !split->ib,
                split->min_index,
                split->max_index,
-               NULL, 0, NULL);
+               NULL, 0);
 
    split->dstprim_nr = 0;
    split->min_index = ~0;
index 5d84a1c8a7d9d38a09dbfed88329301eb235110f..c3927536b8bff0b1128966852a8992c79e540fd0 100644 (file)
@@ -108,16 +108,14 @@ _tnl_draw_prims(struct gl_context *ctx,
                     GLuint min_index,
                     GLuint max_index,
                     struct gl_transform_feedback_object *tfb_vertcount,
-                     unsigned stream,
-                    struct gl_buffer_object *indirect );
+                     unsigned stream);
 
 void
 _tnl_draw(struct gl_context *ctx,
           const struct _mesa_prim *prim, GLuint nr_prims,
           const struct _mesa_index_buffer *ib,
           GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
-          struct gl_transform_feedback_object *tfb_vertcount, unsigned stream,
-          struct gl_buffer_object *indirect);
+          struct gl_transform_feedback_object *tfb_vertcount, unsigned stream);
 
 extern void
 _tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
@@ -175,8 +173,7 @@ typedef void (*tnl_draw_func)(struct gl_context *ctx,
                               GLuint min_index,
                               GLuint max_index,
                               struct gl_transform_feedback_object *tfb_vertcount,
-                              unsigned tfb_stream,
-                              struct gl_buffer_object *indirect);
+                              unsigned tfb_stream);
 
 
 /* Utility function to cope with various constraints on tnl modules or
index 7c3b7ef4330e766787867ada197cfe311c45c351..10e330eb816628fea5a8edb6f61d437a6fe7a6ea 100644 (file)
@@ -414,7 +414,7 @@ vbo_exec_vtx_flush(struct vbo_exec_context *exec)
 
          ctx->Driver.Draw(ctx, exec->vtx.prim, exec->vtx.prim_count,
                           NULL, GL_TRUE, 0, exec->vtx.vert_count - 1,
-                          NULL, 0, NULL);
+                          NULL, 0);
 
          /* Get new storage -- unless asked not to. */
          if (!persistent_mapping)
index 1faf3a68229defd09c37c5e8349021598052f932..4f380b6dcbabfce5d258fa26b9f9a23ad61cf566 100644 (file)
@@ -248,11 +248,11 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
                 (temp_prim.count == sub_prim->count)) {
                ctx->Driver.Draw(ctx, &temp_prim, 1, ib, GL_TRUE,
                                 sub_prim->min_index, sub_prim->max_index,
-                                NULL, 0, NULL);
+                                NULL, 0);
             } else {
                ctx->Driver.Draw(ctx, &temp_prim, 1, ib,
                                 GL_FALSE, -1, -1,
-                                NULL, 0, NULL);
+                                NULL, 0);
             }
          }
          if (sub_end_index >= end_index) {
index b5807bb377c4d14102c1114f45bcb928ffe2a2e5..f6298ee2c9b9f85cb89559c4f1e45c90096105f3 100644 (file)
@@ -213,7 +213,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data)
          GLuint min_index = _vbo_save_get_min_index(node);
          GLuint max_index = _vbo_save_get_max_index(node);
          ctx->Driver.Draw(ctx, node->prims, node->prim_count, NULL, GL_TRUE,
-                          min_index, max_index, NULL, 0, NULL);
+                          min_index, max_index, NULL, 0);
       }
    }