From 5a6547878373798113f8b55b912abc5bfb93add5 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Mon, 19 Mar 2007 22:26:08 +0100 Subject: [PATCH] r300: Fix special case (tmp.x <= 0) in fragment program LIT instruction Also, fix a typo in a related comment. --- src/mesa/drivers/dri/r300/r300_fragprog.c | 4 ++-- 1 file 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 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_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); -- 2.7.4