From: Marek Olšák Date: Tue, 31 Aug 2010 23:51:05 +0000 (+0200) Subject: r300/compiler: remove a redundant parameter in rc_dataflow_deadcode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0ae99252a5af8fbe425301b7ad1b174e7f47602;p=mesa.git r300/compiler: remove a redundant parameter in rc_dataflow_deadcode &c->Base == c. --- diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c index fdad1255e9a..35e8c75824c 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c @@ -160,7 +160,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c) debug_program_log(c, "after native rewrite part 2"); - rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use, c); + rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_use); if (c->Base.Error) return; diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c index c98e123411c..d56ba7f4628 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c @@ -1055,7 +1055,7 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler *c) debug_program_log(c, "after source conflict resolve"); - rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_used, c); + rc_dataflow_deadcode(&c->Base, &dataflow_outputs_mark_used); if (c->Base.Error) return; diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h index 60a6e192a9f..41501e0551b 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h @@ -61,7 +61,7 @@ void rc_remap_registers(struct rc_instruction * inst, rc_remap_register_fn cb, v /*@{*/ typedef void (*rc_dataflow_mark_outputs_fn)(void * userdata, void * data, void (*mark_fn)(void * data, unsigned int index, unsigned int mask)); -void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce, void * userdata); +void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce); void rc_dataflow_swizzles(struct radeon_compiler * c); /*@}*/ diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c index acdb371de93..d27d857721e 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow_deadcode.c @@ -213,7 +213,7 @@ static void mark_output_use(void * data, unsigned int index, unsigned int mask) mark_used(s, RC_FILE_OUTPUT, index, mask); } -void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce, void * userdata) +void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_fn dce) { struct deadcode_state s; unsigned int nr_instructions; @@ -226,7 +226,7 @@ void rc_dataflow_deadcode(struct radeon_compiler * c, rc_dataflow_mark_outputs_f s.Instructions = memory_pool_malloc(&c->Pool, sizeof(struct instruction_state)*nr_instructions); memset(s.Instructions, 0, sizeof(struct instruction_state)*nr_instructions); - dce(userdata, &s, &mark_output_use); + dce(c, &s, &mark_output_use); for(struct rc_instruction * inst = c->Program.Instructions.Prev; inst != &c->Program.Instructions;