tnl: Silence unused parameter warnings in _tnl_draw_prims

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>
This commit is contained in:
Ian Romanick 2020-04-07 21:10:45 -07:00
parent 1996f1d3dd
commit 114e078001
6 changed files with 17 additions and 35 deletions

View file

@ -244,9 +244,7 @@ TAG(vbo_render_prims)(struct gl_context *ctx,
const struct _mesa_index_buffer *ib, const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid, GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index, GLuint min_index, GLuint max_index,
GLuint num_instances, GLuint base_instance, GLuint num_instances, GLuint base_instance);
struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream);
static GLboolean static GLboolean
vbo_maybe_split(struct gl_context *ctx, const struct tnl_vertex_array *arrays, 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, const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid, GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index, GLuint min_index, GLuint max_index,
GLuint num_instances, GLuint base_instance, GLuint num_instances, GLuint base_instance)
struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream)
{ {
struct nouveau_render_state *render = to_render_state(ctx); 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, const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid, GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index, GLuint min_index, GLuint max_index,
GLuint num_instances, GLuint base_instance, GLuint num_instances, GLuint base_instance)
struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream)
{ {
struct nouveau_context *nctx = to_nouveau_context(ctx); 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) if (nctx->fallback == HWTNL)
TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib, TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib,
index_bounds_valid, min_index, max_index, index_bounds_valid, min_index, max_index,
num_instances, base_instance, num_instances, base_instance);
tfb_vertcount, stream);
if (nctx->fallback == SWTNL) if (nctx->fallback == SWTNL)
_tnl_draw_prims(ctx, arrays, prims, nr_prims, ib, _tnl_draw_prims(ctx, arrays, prims, nr_prims, ib,
index_bounds_valid, min_index, max_index, index_bounds_valid, min_index, max_index,
num_instances, base_instance, num_instances, base_instance);
tfb_vertcount, stream);
} }
static void static void
@ -555,8 +547,8 @@ TAG(vbo_draw)(struct gl_context *ctx,
GLboolean index_bounds_valid, GLboolean index_bounds_valid,
GLuint min_index, GLuint max_index, GLuint min_index, GLuint max_index,
GLuint num_instances, GLuint base_instance, GLuint num_instances, GLuint base_instance,
struct gl_transform_feedback_object *tfb_vertcount, UNUSED struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream) UNUSED unsigned stream)
{ {
/* Borrow and update the inputs list from the tnl context */ /* Borrow and update the inputs list from the tnl context */
const struct tnl_vertex_array* arrays = _tnl_bind_inputs(ctx); 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, TAG(vbo_check_render_prims)(ctx, arrays,
prims, nr_prims, ib, prims, nr_prims, ib,
index_bounds_valid, min_index, max_index, index_bounds_valid, min_index, max_index,
num_instances, base_instance, num_instances, base_instance);
tfb_vertcount, stream);
} }
void void

View file

@ -436,9 +436,7 @@ void _tnl_draw_prims(struct gl_context *ctx,
GLuint min_index, GLuint min_index,
GLuint max_index, GLuint max_index,
GLuint num_instances, GLuint num_instances,
GLuint base_instance, GLuint base_instance)
struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream)
{ {
TNLcontext *tnl = TNL_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx);
const GLuint TEST_SPLIT = 0; const GLuint TEST_SPLIT = 0;
@ -642,8 +640,8 @@ _tnl_draw(struct gl_context *ctx,
const struct _mesa_index_buffer *ib, const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid, GLuint min_index, GLuint max_index, GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
GLuint num_instances, GLuint base_instance, GLuint num_instances, GLuint base_instance,
struct gl_transform_feedback_object *tfb_vertcount, UNUSED struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream) UNUSED unsigned stream)
{ {
/* Update TNLcontext::draw_arrays and return that pointer. /* 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, _tnl_draw_prims(ctx, arrays, prim, nr_prims, ib,
index_bounds_valid, min_index, max_index, index_bounds_valid, min_index, max_index,
num_instances, base_instance, tfb_vertcount, stream); num_instances, base_instance);
} }

View file

@ -247,8 +247,7 @@ void t_rebase_prims( struct gl_context *ctx,
GL_TRUE, GL_TRUE,
0, 0,
max_index - min_index, max_index - min_index,
num_instances, base_instance, num_instances, base_instance);
NULL, 0);
free(tmp_indices); free(tmp_indices);

View file

@ -212,8 +212,7 @@ flush(struct copy_context *copy)
0, 0,
copy->dstbuf_nr - 1, copy->dstbuf_nr - 1,
1, 1,
0, 0);
NULL, 0);
/* Reset all pointers: /* Reset all pointers:
*/ */

View file

@ -96,8 +96,7 @@ flush_vertex( struct split_context *split)
split->min_index, split->min_index,
split->max_index, split->max_index,
split->num_instances, split->num_instances,
split->base_instance, split->base_instance);
NULL, 0);
split->dstprim_nr = 0; split->dstprim_nr = 0;
split->min_index = ~0; split->min_index = ~0;

View file

@ -108,9 +108,7 @@ _tnl_draw_prims(struct gl_context *ctx,
GLuint min_index, GLuint min_index,
GLuint max_index, GLuint max_index,
GLuint num_instances, GLuint num_instances,
GLuint base_instance, GLuint base_instance);
struct gl_transform_feedback_object *tfb_vertcount,
unsigned stream);
void void
_tnl_draw(struct gl_context *ctx, _tnl_draw(struct gl_context *ctx,
@ -176,9 +174,7 @@ typedef void (*tnl_draw_func)(struct gl_context *ctx,
GLuint min_index, GLuint min_index,
GLuint max_index, GLuint max_index,
GLuint num_instances, GLuint num_instances,
GLuint base_instance, GLuint base_instance);
struct gl_transform_feedback_object *tfb_vertcount,
unsigned tfb_stream);
/* Utility function to cope with various constraints on tnl modules or /* Utility function to cope with various constraints on tnl modules or