Module: Mesa Branch: glsl2 Commit: 3e2127b9dea6fd0628c4d7cb9e338d83583d2729 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e2127b9dea6fd0628c4d7cb9e338d83583d2729
Author: Eric Anholt <[email protected]> Date: Wed Jun 30 14:28:38 2010 -0700 mesa: Don't look in unallocatd param slots for parameter values. glsl-derivs would add 40.0, 0.0, and 1.0 in order. When we went looking for 0.0, we'd find it in the second slot of the param, and use it, but param->Size would still be 1. When we went to add 1.0 and didn't find it, we'd put allocate it to that second slot and the 0.0 would actualy end up being 1.0. Fixes glsl-derivs, glsl-deriv-varyings. --- src/mesa/shader/prog_parameter.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index aac488c..ddbfe95 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -591,7 +591,7 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, if (vSize == 1) { /* look for v[0] anywhere within float[4] value */ GLuint j; - for (j = 0; j < 4; j++) { + for (j = 0; j < list->Parameters[i].Size; j++) { if (list->ParameterValues[i][j] == v[0]) { /* found it */ *posOut = i; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
