From 680abf8a02bd88e55ebaa81326c7621a745bedd4 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Mar 2007 13:04:57 -0600 Subject: In _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle. --- src/mesa/shader/prog_parameter.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index adffafdd71..2c8a340763 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]); -- cgit v1.2.3