glsl: Count builtin uniforms against uniform component limits.
authorEric Anholt <eric@anholt.net>
Mon, 27 Aug 2012 16:48:34 +0000 (09:48 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 7 Sep 2012 15:29:48 +0000 (08:29 -0700)
We don't fully process the builtin uniforms, but at least
num_uniform_components reflects reality now.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/link_uniforms.cpp

index eef9025cf28fe18eb0f3ca46301d9af9eb027cf3..aa8a8b3fbd87bac1c475467ea39b4ce4e5795ad2 100644 (file)
@@ -572,8 +572,11 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
 
         /* FINISHME: Update code to process built-in uniforms!
          */
-        if (strncmp("gl_", var->name, 3) == 0)
+        if (strncmp("gl_", var->name, 3) == 0) {
+           uniform_size.num_shader_uniform_components +=
+              var->type->component_slots();
            continue;
+        }
 
         uniform_size.process(var);
       }