mesa/program: Fix -Wunused-param warning
authorGert Wollny <gw.fossdev@gmail.com>
Thu, 18 Jan 2018 08:57:29 +0000 (09:57 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 19 Jan 2018 15:45:57 +0000 (15:45 +0000)
v2: Don't annotate, but remove the unused ctx parameter

Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/program/arbprogparse.c
src/mesa/program/ir_to_mesa.cpp
src/mesa/program/prog_optimize.c
src/mesa/program/prog_optimize.h

index 83a501eea69884beffa48a71c5c45eea98a05e80..7cb1beb5bbb5269e5e4e322714151ff21e3f1ab6 100644 (file)
@@ -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);
 
index ad1b701690bb5b673e84aef5ea18735ce1b122a3..321d8870e4c40e0a14c76b5e85a8a5c55de19c88 100644 (file)
@@ -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
index 6a228ba258385e5541046cc0fcca51a7778b92f1..7efdcadc1220edd84a9b91ad2a5348883281f11d 100644 (file)
@@ -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;
 
index c99ce9ecee50f03505d62466c949e64941636c16..fadfd621c55423852798198cd38fc9af62265ab3 100644 (file)
@@ -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);