r300: Clear fragment program instruction slots on first use
authorNicolai Haehnle <nhaehnle@gmail.com>
Mon, 19 Mar 2007 21:17:16 +0000 (22:17 +0100)
committerNicolai Haehnle <nhaehnle@gmail.com>
Mon, 19 Mar 2007 21:29:21 +0000 (22:29 +0100)
Make sure that instruction slots are fully initialized with NOPs during
find_and_prepare_slot(). This fixes a bug when a fragment program was
translated more than once (e.g. due to a second call to glProgramStringARB).

This partially fixes glean/fragProg1.

src/mesa/drivers/dri/r300/r300_fragprog.c

index 6262dc7a449928fccec91d381188d94052b3a326..3f9d83f1093d9fe9b6e7f141968302ca8c2a5090 100644 (file)
@@ -1143,7 +1143,9 @@ static int find_and_prepare_slot(struct r300_fragment_program* rp,
                        }
 
                        rp->alu.inst[pos].inst0 = NOP_INST0;
+                       rp->alu.inst[pos].inst1 = NOP_INST1;
                        rp->alu.inst[pos].inst2 = NOP_INST2;
+                       rp->alu.inst[pos].inst3 = NOP_INST3;
 
                        cs->nrslots++;
                }