summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2006-04-19 23:15:51 +0000
committerDave Airlie <airliedfreedesktop.org>2006-04-19 23:15:51 +0000
commitb5d76b68588c3be2a6b73f80e41a169716463644 (patch)
tree09f60d70d33831331a26a550ddd4f8e1e474ee8c /src/mesa/shader
parent6e542f11c9cc792123992446900df919d6ea1a83 (diff)
SrcReg->Swizzle is always initialized to SWIZZLE_NOOP, and if the program
specifies a 2/3/4-compontent swizzle suffix, SrcReg->Swizzles is just ORed against the new component values, without resetting it first. Attached patch makes tests/vptest2 pass. From Tilam Sauerbeck bug 6673
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/nvvertparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/nvvertparse.c b/src/mesa/shader/nvvertparse.c
index 71d5116b3ef..a7e062c61cb 100644
--- a/src/mesa/shader/nvvertparse.c
+++ b/src/mesa/shader/nvvertparse.c
@@ -699,6 +699,9 @@ Parse_SwizzleSrcReg(struct parse_state *parseState, struct prog_src_register *sr
else {
/* 2, 3 or 4-component swizzle */
GLint k;
+
+ srcReg->Swizzle = 0;
+
for (k = 0; token[k] && k < 5; k++) {
if (token[k] == 'x')
srcReg->Swizzle |= 0 << (k*3);