summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-26 13:04:57 -0600
committerBrian <[email protected]>2007-03-26 13:46:46 -0600
commit680abf8a02bd88e55ebaa81326c7621a745bedd4 (patch)
tree813819ee33d95695dcf9b348a06131ce4c4e2e23 /src/mesa/shader
parent11702680888038a22d9a406ea5646af2902c125e (diff)
In _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/prog_parameter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index adffafdd713..2c8a3407634 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -532,6 +532,10 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list,
}
}
}
+ /* smear last value to remaining positions */
+ for (; j < 4; j++)
+ swz[j] = swz[j-1];
+
if (match == vSize) {
*posOut = i;
*swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]);