mesa: Branch 'master' - 2 commits
Nicolai Hähnle
nh at kemper.freedesktop.org
Mon Mar 19 21:29:38 UTC 2007
src/mesa/drivers/dri/r300/r300_fragprog.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
New commits:
diff-tree 5a6547878373798113f8b55b912abc5bfb93add5 (from b3acba87d7f5ede486cba11db036cf36dff6c29e)
Author: Nicolai Haehnle <nhaehnle at gmail.com>
Date: Mon Mar 19 22:26:08 2007 +0100
r300: Fix special case (tmp.x <= 0) in fragment program LIT instruction
Also, fix a typo in a related comment.
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 3f9d83f..1d462eb 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -1463,7 +1463,7 @@ static void emit_lit(struct r300_fragmen
temp = keep(dest);
}
- // Npte: The order of emit_arith inside the slots is relevant,
+ // Note: The order of emit_arith inside the slots is relevant,
// because emit_arith only looks at scalar vs. vector when resolving
// dependencies, and it does not consider individual vector components,
// so swizzling between the two parts can create fake dependencies.
@@ -1496,7 +1496,7 @@ static void emit_lit(struct r300_fragmen
// Fifth slot
emit_arith(rp, PFS_OP_CMP, temp, WRITEMASK_Z,
- swizzle(temp, W, W, W, W), pfs_zero, swizzle(temp, Y, Y, Y, Y), flags);
+ pfs_zero, swizzle(temp, W, W, W, W), negate(swizzle(temp, Y, Y, Y, Y)), flags);
emit_arith(rp, PFS_OP_MAD, temp, WRITEMASK_W,
pfs_one, pfs_one, pfs_zero, 0);
diff-tree b3acba87d7f5ede486cba11db036cf36dff6c29e (from 826815a5d27d6e79e9d0e0b0fc63bb3fd092d40d)
Author: Nicolai Haehnle <nhaehnle at gmail.com>
Date: Mon Mar 19 22:17:16 2007 +0100
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.
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 6262dc7..3f9d83f 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
}
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++;
}
More information about the mesa-commit
mailing list