summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2007-03-19 22:26:08 +0100
committerNicolai Haehnle <nhaehnle@gmail.com>2007-03-19 22:29:34 +0100
commit5a6547878373798113f8b55b912abc5bfb93add5 (patch)
tree01128afb2b532d25103adfa10c6064e941733f9d /src/mesa
parentb3acba87d7f5ede486cba11db036cf36dff6c29e (diff)
r300: Fix special case (tmp.x <= 0) in fragment program LIT instruction
Also, fix a typo in a related comment.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index 3f9d83f109..1d462ebec8 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_fragment_program *rp,
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_fragment_program *rp,
// 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);