summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/nvvertexec.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-10-29 16:03:19 +0000
committerBrian Paul <[email protected]>2005-10-29 16:03:19 +0000
commit4174f79b1916746c826352875b27f897484885e7 (patch)
tree2a58515d318d62102fcc44a3803894ab0d8d1e80 /src/mesa/shader/nvvertexec.c
parentdb02ab767f4b030ae2668c609ed147b9f464ee82 (diff)
fix a few bugs in SWZ execution
Diffstat (limited to 'src/mesa/shader/nvvertexec.c')
-rw-r--r--src/mesa/shader/nvvertexec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c
index f99c4dfac13..ad785193e3b 100644
--- a/src/mesa/shader/nvvertexec.c
+++ b/src/mesa/shader/nvvertexec.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -765,14 +765,14 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct vertex_program *program)
GLuint i;
/* do extended swizzling here */
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 4; i++) {
if (GET_SWZ(source->Swizzle, i) == SWIZZLE_ZERO)
result[i] = 0.0;
else if (GET_SWZ(source->Swizzle, i) == SWIZZLE_ONE)
- result[i] = -1.0;
+ result[i] = 1.0;
else
- result[i] = -src[GET_SWZ(source->Swizzle, i)];
- if (source->Negate)
+ result[i] = src[GET_SWZ(source->Swizzle, i)];
+ if (source->Negate & (1 << i))
result[i] = -result[i];
}
store_vector4( &inst->DstReg, state, result );