tnl: Silence unused parameter warnings in _tnl_draw_prims
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Apr 2020 04:10:45 +0000 (21:10 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 13 Apr 2020 17:26:48 +0000 (10:26 -0700)
A tangled mess of a couple parameters that nobody wanted.

src/mesa/tnl/t_draw.c: In function ‘_tnl_draw_prims’:
src/mesa/tnl/t_draw.c:440:42: warning: unused parameter ‘tfb_vertcount’ [-Wunused-parameter]
  440 |     struct gl_transform_feedback_object *tfb_vertcount,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
src/mesa/tnl/t_draw.c:441:35: warning: unused parameter ‘stream’ [-Wunused-parameter]
  441 |                          unsigned stream)
      |                          ~~~~~~~~~^~~~~~

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>

src/mesa/drivers/dri/nouveau/nouveau_vbo_t.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

index 720b7c3e1a05063d38436888ea3d870e90dd825f..8a7d0f4a3387c39ecd0233ede94cbc52ccd1de87 100644 (file)
@@ -244,9 +244,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
                      const struct _mesa_index_buffer *ib,
                      GLboolean index_bounds_valid,
                      GLuint min_index, GLuint max_index,
-                      GLuint num_instances, GLuint base_instance,
-                     struct gl_transform_feedback_object *tfb_vertcount,
-                      unsigned stream);
+                      GLuint num_instances, GLuint base_instance);
 
 static GLboolean
 vbo_maybe_split(struct gl_context *ctx, const struct tnl_vertex_array *arrays,
@@ -489,9 +487,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
                      const struct _mesa_index_buffer *ib,
                      GLboolean index_bounds_valid,
                      GLuint min_index, GLuint max_index,
-                      GLuint num_instances, GLuint base_instance,
-                     struct gl_transform_feedback_object *tfb_vertcount,
-                      unsigned stream)
+                      GLuint num_instances, GLuint base_instance)
 {
        struct nouveau_render_state *render = to_render_state(ctx);
 
@@ -527,9 +523,7 @@ TAG(vbo_check_render_prims)(struct gl_context *ctx,
                            const struct _mesa_index_buffer *ib,
                            GLboolean index_bounds_valid,
                            GLuint min_index, GLuint max_index,
-                            GLuint num_instances, GLuint base_instance,
-                           struct gl_transform_feedback_object *tfb_vertcount,
-                            unsigned stream)
+                            GLuint num_instances, GLuint base_instance)
 {
        struct nouveau_context *nctx = to_nouveau_context(ctx);
 
@@ -538,14 +532,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,
-                                     num_instances, base_instance,
-                                      tfb_vertcount, stream);
+                                     num_instances, base_instance);
 
        if (nctx->fallback == SWTNL)
                _tnl_draw_prims(ctx, arrays, prims, nr_prims, ib,
                                index_bounds_valid, min_index, max_index,
-                                num_instances, base_instance,
-                               tfb_vertcount, stream);
+                                num_instances, base_instance);
 }
 
 static void
@@ -555,8 +547,8 @@ TAG(vbo_draw)(struct gl_context *ctx,
              GLboolean index_bounds_valid,
              GLuint min_index, GLuint max_index,
               GLuint num_instances, GLuint base_instance,
-             struct gl_transform_feedback_object *tfb_vertcount,
-             unsigned stream)
+             UNUSED struct gl_transform_feedback_object *tfb_vertcount,
+             UNUSED unsigned stream)
 {
        /* Borrow and update the inputs list from the tnl context */
        const struct tnl_vertex_array* arrays = _tnl_bind_inputs(ctx);
@@ -564,8 +556,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,
-                                    num_instances, base_instance,
-                                   tfb_vertcount, stream);
+                                    num_instances, base_instance);
 }
 
 void
index b60cec43e0006eb54557945e655210e8bb4af95c..f790c0f3476d1a8e77ab64d67ce9d2914f03eb40 100644 (file)
@@ -436,9 +436,7 @@ void _tnl_draw_prims(struct gl_context *ctx,
                         GLuint min_index,
                         GLuint max_index,
                          GLuint num_instances,
-                         GLuint base_instance,
-                        struct gl_transform_feedback_object *tfb_vertcount,
-                         unsigned stream)
+                         GLuint base_instance)
 {
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    const GLuint TEST_SPLIT = 0;
@@ -642,8 +640,8 @@ _tnl_draw(struct gl_context *ctx,
           const struct _mesa_index_buffer *ib,
           GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
           GLuint num_instances, GLuint base_instance,
-          struct gl_transform_feedback_object *tfb_vertcount,
-          unsigned stream)
+          UNUSED struct gl_transform_feedback_object *tfb_vertcount,
+          UNUSED unsigned stream)
 {
    /* Update TNLcontext::draw_arrays and return that pointer.
     */
@@ -651,7 +649,7 @@ _tnl_draw(struct gl_context *ctx,
 
    _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib,
                    index_bounds_valid, min_index, max_index,
-                   num_instances, base_instance, tfb_vertcount, stream);
+                   num_instances, base_instance);
 }
 
 
index dc64e81fbd24031259a8d82cf2ccabdcfe724f4b..23395e4b576f902f890e98a3aad55569928cd161 100644 (file)
@@ -247,8 +247,7 @@ void t_rebase_prims( struct gl_context *ctx,
         GL_TRUE,
         0, 
         max_index - min_index,
-         num_instances, base_instance,
-        NULL, 0);
+         num_instances, base_instance);
 
    free(tmp_indices);
    
index 10f90b57d4d0bf2810dd5a99f44019cb4d82744b..9032238c58b36d7d24bec6a88618bc1d95e5bbf1 100644 (file)
@@ -212,8 +212,7 @@ flush(struct copy_context *copy)
               0,
               copy->dstbuf_nr - 1,
               1,
-              0,
-              NULL, 0);
+              0);
 
    /* Reset all pointers:
     */
index 817b641e515663eddc4e8a6a4cd68c0b06eeb3ea..3ff9e01360bef19c79301ce0d57a1c46fd8b8ada 100644 (file)
@@ -96,8 +96,7 @@ flush_vertex( struct split_context *split)
                split->min_index,
                split->max_index,
                split->num_instances,
-               split->base_instance,
-               NULL, 0);
+               split->base_instance);
 
    split->dstprim_nr = 0;
    split->min_index = ~0;
index 4bf8ee20f68cd2c004f2b3efde9af3c92fe57f5a..58503016a9b3a0d5438b959b5db3f5750fd53471 100644 (file)
@@ -108,9 +108,7 @@ _tnl_draw_prims(struct gl_context *ctx,
                     GLuint min_index,
                     GLuint max_index,
                      GLuint num_instances,
-                     GLuint base_instance,
-                    struct gl_transform_feedback_object *tfb_vertcount,
-                     unsigned stream);
+                     GLuint base_instance);
 
 void
 _tnl_draw(struct gl_context *ctx,
@@ -176,9 +174,7 @@ typedef void (*tnl_draw_func)(struct gl_context *ctx,
                               GLuint min_index,
                               GLuint max_index,
                               GLuint num_instances,
-                              GLuint base_instance,
-                              struct gl_transform_feedback_object *tfb_vertcount,
-                              unsigned tfb_stream);
+                              GLuint base_instance);
 
 
 /* Utility function to cope with various constraints on tnl modules or