summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2008-05-25 11:35:54 -0700
committerCorbin Simpson <[email protected]>2008-05-25 11:35:54 -0700
commit594760148cb42cdaf568eef63357fac1c1b7f124 (patch)
tree59daf44a1fa540c397a78bd5862700afd24da5b1 /src/mesa
parentbd74d2aa26a2b87b05e8d086c020a6bdde9e06a7 (diff)
r5xx: Negation masks for every inst except SWZ.
Yay?
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 2c18c3f6fda..c7b551d4b89 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -117,8 +117,10 @@ static inline GLuint make_rgb_swizzle(struct prog_src_register src) {
temp = GET_SWZ(src.Swizzle, i);
/* Fix SWIZZLE_ONE */
if (temp == 5) temp++;
- swiz += temp << i*3;
+ swiz |= temp << i*3;
}
+ if (src.NegateBase)
+ swiz |= (R500_SWIZ_MOD_NEG << 10);
return swiz;
}
@@ -126,6 +128,10 @@ static inline GLuint make_alpha_swizzle(struct prog_src_register src) {
GLuint swiz = GET_SWZ(src.Swizzle, 3);
if (swiz == 5) swiz++;
+
+ if (src.NegateBase)
+ swiz |= (R500_SWIZ_MOD_NEG << 4);
+
return swiz;
}