summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2007-03-19 22:17:16 +0100
committerNicolai Haehnle <[email protected]>2007-03-19 22:29:21 +0100
commitb3acba87d7f5ede486cba11db036cf36dff6c29e (patch)
tree4fdf067577b81006836809908f0b397e96cd3457 /src/mesa/drivers/dri/r300
parent826815a5d27d6e79e9d0e0b0fc63bb3fd092d40d (diff)
r300: Clear fragment program instruction slots on first use
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.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 6262dc7a449..3f9d83f1093 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -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++;
}