glsl/linker: check against varying limit after unused varyings are eliminated

We counted even the varyings which were later eliminated, which was
suboptimal.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Marek Olšák
2013-06-13 03:17:22 +02:00
parent 284d954912
commit 3c555827c3
3 changed files with 33 additions and 11 deletions
+4
View File
@@ -1929,6 +1929,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
while (do_dead_code(sh_next->ir, false))
;
/* This must be done after all dead varyings are eliminated. */
if (!check_against_varying_limit(ctx, prog, sh_next))
goto done;
next = i;
}