diff options
-rw-r--r-- | src/compiler/glsl/linker.cpp | 20 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.c | 8 |
2 files changed, 17 insertions, 11 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; diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 8cc90736801..1ed19a683a3 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -359,9 +359,11 @@ _mesa_clear_shader_program_data(struct gl_context *ctx, shProg->data->ShaderStorageBlocks = NULL; shProg->data->NumShaderStorageBlocks = 0; - ralloc_free(shProg->data->AtomicBuffers); - shProg->data->AtomicBuffers = NULL; - shProg->data->NumAtomicBuffers = 0; + if (shProg->data->AtomicBuffers && !shProg->data->cache_fallback) { + ralloc_free(shProg->data->AtomicBuffers); + shProg->data->AtomicBuffers = NULL; + shProg->data->NumAtomicBuffers = 0; + } if (shProg->data->ProgramResourceList) { ralloc_free(shProg->data->ProgramResourceList); |