diff options
author | Nicolai Hähnle <[email protected]> | 2009-07-24 22:50:35 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2009-07-27 22:51:35 +0200 |
commit | aab949cb9d62343303ab0836a84fe034244d1584 (patch) | |
tree | db221dfaf06c0be3c12023681bc54304389aeb77 | |
parent | 6f4608f53c7ba28b5640974fc1daf6ad860df2f6 (diff) |
r300/compiler: Refactor rewrite_depth_out to use rc_program
Signed-off-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c index bdab61f32da..08283c81474 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c @@ -195,11 +195,13 @@ static void rewriteFog(struct r300_fragment_program_compiler *compiler) } -static void rewrite_depth_out(struct gl_program *prog) +static void rewrite_depth_out(struct r300_fragment_program_compiler * c) { - struct prog_instruction *inst; + struct rc_instruction *rci; + + for (rci = c->Base.Program.Instructions.Next; rci != &c->Base.Program.Instructions; rci = rci->Next) { + struct prog_instruction * inst = &rci->I; - for (inst = prog->Instructions; inst->Opcode != OPCODE_END; ++inst) { if (inst->DstReg.File != PROGRAM_OUTPUT || inst->DstReg.Index != FRAG_RESULT_DEPTH) continue; @@ -248,10 +250,10 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c) rewriteFog(c); - rewrite_depth_out(c->program); - rc_mesa_to_rc_program(&c->Base, c->program); + rewrite_depth_out(c); + if (c->is_r500) { struct radeon_program_transformation transformations[] = { { &r500_transform_TEX, c }, |