From d6d71e5bf4a720a1ee84c96231aec539ec17a7c6 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sun, 30 Aug 2009 12:49:53 +0200 Subject: r300: Move Mesa -> RC program conversion to classic Mesa driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This really doesn't belong into the compiler itself, since the compiler should eventually be independent of Mesa's program representation. Signed-off-by: Nicolai Hähnle --- .../drivers/dri/r300/compiler/radeon_compiler.h | 2 -- .../drivers/dri/r300/compiler/radeon_program.c | 26 ---------------------- 2 files changed, 28 deletions(-) (limited to 'src/mesa/drivers/dri/r300/compiler') diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h index e63ab8840a..fbe7c37dd1 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h @@ -67,8 +67,6 @@ void rc_destroy(struct radeon_compiler * c); void rc_debug(struct radeon_compiler * c, const char * fmt, ...); void rc_error(struct radeon_compiler * c, const char * fmt, ...); -void rc_mesa_to_rc_program(struct radeon_compiler * c, struct gl_program * program); - void rc_calculate_inputs_outputs(struct radeon_compiler * c); void rc_move_input(struct radeon_compiler * c, unsigned input, struct prog_src_register new_input); diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.c b/src/mesa/drivers/dri/r300/compiler/radeon_program.c index bbbf0dd776..bf7f9ac92c 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.c @@ -136,32 +136,6 @@ void rc_remove_instruction(struct rc_instruction * inst) } -void rc_mesa_to_rc_program(struct radeon_compiler * c, struct gl_program * program) -{ - struct prog_instruction *source; - unsigned int i; - - for(source = program->Instructions; source->Opcode != OPCODE_END; ++source) { - struct rc_instruction * dest = rc_insert_new_instruction(c, c->Program.Instructions.Prev); - dest->I = *source; - } - - c->Program.ShadowSamplers = program->ShadowSamplers; - c->Program.InputsRead = program->InputsRead; - c->Program.OutputsWritten = program->OutputsWritten; - - for(i = 0; i < program->Parameters->NumParameters; ++i) { - struct rc_constant constant; - - constant.Type = RC_CONSTANT_EXTERNAL; - constant.Size = 4; - constant.u.External = i; - - rc_constants_add(&c->Program.Constants, &constant); - } -} - - /** * Print program to stderr, default options. */ -- cgit v1.2.3