In _mesa_lookup_parameter_constant() make sure we return a full, 4-component swizzle.
authorBrian <brian@yutani.localnet.net>
Mon, 26 Mar 2007 19:04:57 +0000 (13:04 -0600)
committerBrian <brian@yutani.localnet.net>
Mon, 26 Mar 2007 19:46:46 +0000 (13:46 -0600)
src/mesa/shader/prog_parameter.c

index adffafdd713e2b5f7a1e08430c51640d2e4f24de..2c8a3407634c625d6b688e88251a0b92cddd685c 100644 (file)
@@ -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]);