diff options
author | Marek Olšák <[email protected]> | 2013-06-13 03:17:22 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-07-02 17:02:14 +0200 |
commit | 3c555827c3e2fdb84ee4b4b8fd8296985cbb1fda (patch) | |
tree | 344bc224a6b3893dd4b2b7a516f89f6c52857886 /src/glsl/linker.cpp | |
parent | 284d9549123d7a5417310d359c2c46a4317e47bb (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 3adcddd16b6..6d7357820c9 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -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; } |