glsl ES: Fix magnitude of gl_MaxVertexUniformVectors.
authorPaul Berry <stereotype441@gmail.com>
Sun, 7 Jul 2013 18:47:22 +0000 (11:47 -0700)
committerPaul Berry <stereotype441@gmail.com>
Sat, 13 Jul 2013 01:18:48 +0000 (18:18 -0700)
Previously, we set it equal to MaxVertexUniformComponents.  It should
be MaxVertexUniformComponents / 4.

NOTE: This is a candidate for the stable branches.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/builtin_variables.cpp

index f4ac20543b8872a9dacda52be6c04cec0e9d41f3..58019c6e45bcd16849c163236f1c73fbeec42e1b 100644 (file)
@@ -533,7 +533,7 @@ generate_common_ES_uniforms(exec_list *instructions,
    add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
                        state->Const.MaxVertexAttribs);
    add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformVectors",
-                       state->Const.MaxVertexUniformComponents);
+                       state->Const.MaxVertexUniformComponents / 4);
    add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
                        state->Const.MaxVertexTextureImageUnits);
    add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",