From: Gert Wollny Date: Thu, 18 Jan 2018 08:57:29 +0000 (+0100) Subject: mesa/program: Fix -Wunused-param warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea89843b3d31313f3b3e9ddfd6e8744edb7545d6;p=mesa.git mesa/program: Fix -Wunused-param warning v2: Don't annotate, but remove the unused ctx parameter Signed-off-by: Gert Wollny Reviewed-by: Emil Velikov Reviewed-by: Ian Romanick --- diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index 83a501eea69..7cb1beb5bbb 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -181,7 +181,7 @@ _mesa_parse_arb_vertex_program(struct gl_context *ctx, GLenum target, return; } - _mesa_optimize_program(ctx, &prog, program); + _mesa_optimize_program(&prog, program); ralloc_free(program->String); diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index ad1b701690b..321d8870e4c 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2966,7 +2966,7 @@ get_mesa_program(struct gl_context *ctx, prog->info.fs.depth_layout = shader_program->FragDepthLayout; } - _mesa_optimize_program(ctx, prog, prog); + _mesa_optimize_program(prog, prog); /* This has to be done last. Any operation that can cause * prog->ParameterValues to get reallocated (e.g., anything that adds a diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index 6a228ba2583..7efdcadc122 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_optimize.c @@ -1312,8 +1312,7 @@ _mesa_simplify_cmp(struct gl_program * program) * instructions, temp regs, etc. */ void -_mesa_optimize_program(struct gl_context *ctx, struct gl_program *program, - void *mem_ctx) +_mesa_optimize_program(struct gl_program *program, void *mem_ctx) { GLboolean any_change; diff --git a/src/mesa/program/prog_optimize.h b/src/mesa/program/prog_optimize.h index c99ce9ecee5..fadfd621c55 100644 --- a/src/mesa/program/prog_optimize.h +++ b/src/mesa/program/prog_optimize.h @@ -46,8 +46,7 @@ _mesa_find_temp_intervals(const struct prog_instruction *instructions, GLint intEnd[MAX_PROGRAM_TEMPS]); extern void -_mesa_optimize_program(struct gl_context *ctx, struct gl_program *program, - void *mem_ctx); +_mesa_optimize_program(struct gl_program *program, void *mem_ctx); extern GLboolean _mesa_constant_fold(struct gl_program *prog);