}
-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;
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 },