A small logic error.
authorRune Petersen <rune@megahurts.dk>
Sat, 15 Jul 2006 10:44:25 +0000 (10:44 +0000)
committerRune Petersen <rune@megahurts.dk>
Sat, 15 Jul 2006 10:44:25 +0000 (10:44 +0000)
We need to call do_swizzle() when the scaler _or_ vector unit have a
swizzle other 000/ZERO/111/ONE.

This ensures that the gloss on banners in ut2004 is not angel-dependent
(since when was banners glossy?).

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

index e045f0c6a1ed1063cead679f0c35e6a599ff64a2..61efdec6a8d71213ddcb71213e615a24d9b77ee9 100644 (file)
@@ -529,7 +529,7 @@ static pfs_reg_t t_src(struct r300_fragment_program *rp,
        }
 
        /* no point swizzling ONE/ZERO/HALF constants... */
-       if (r.v_swz < SWIZZLE_111 && r.s_swz < SWIZZLE_ZERO)
+       if (r.v_swz < SWIZZLE_111 || r.s_swz < SWIZZLE_ZERO)
                r = do_swizzle(rp, r, fpsrc.Swizzle, fpsrc.NegateBase);
 #if 0
        /* WRONG! Need to be able to do individual component negation,