diff options
author | Timothy Arceri <[email protected]> | 2016-04-23 22:34:38 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-02-17 11:18:43 +1100 |
commit | 01d1e5a7ad4883d3f3aa7675711a5acd38736325 (patch) | |
tree | 3e7444593d122651937add7dd927eb6a78d523b6 /src/compiler | |
parent | 794f7326bcc3ffb7ab473d2c10a8c81ff4958167 (diff) |
glsl: skip more uniform initialisation when doing fallback linking
We already pull these values from the metadata cache so no need to
recreate them.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index d8b8a183db6..c875e410eaf 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4500,12 +4500,14 @@ link_and_validate_uniforms(struct gl_context *ctx, update_array_sizes(prog); link_assign_uniform_locations(prog, ctx); - link_assign_atomic_counter_resources(ctx, prog); - link_calculate_subroutine_compat(prog); - check_resources(ctx, prog); - check_subroutine_resources(prog); - check_image_resources(ctx, prog); - link_check_atomic_counter_resources(ctx, prog); + if (!prog->data->cache_fallback) { + link_assign_atomic_counter_resources(ctx, prog); + link_calculate_subroutine_compat(prog); + check_resources(ctx, prog); + check_subroutine_resources(prog); + check_image_resources(ctx, prog); + link_check_atomic_counter_resources(ctx, prog); + } } static bool @@ -4810,8 +4812,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) last = i; } - check_explicit_uniform_locations(ctx, prog); - link_assign_subroutine_types(prog); + if (!prog->data->cache_fallback) { + check_explicit_uniform_locations(ctx, prog); + link_assign_subroutine_types(prog); + } if (!prog->data->LinkStatus) goto done; |