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 <nicolai.haehnle@amd.com>
This commit is contained in:

committed by
Timothy Arceri

parent
794f7326bc
commit
01d1e5a7ad
@@ -4500,12 +4500,14 @@ link_and_validate_uniforms(struct gl_context *ctx,
|
|||||||
update_array_sizes(prog);
|
update_array_sizes(prog);
|
||||||
link_assign_uniform_locations(prog, ctx);
|
link_assign_uniform_locations(prog, ctx);
|
||||||
|
|
||||||
link_assign_atomic_counter_resources(ctx, prog);
|
if (!prog->data->cache_fallback) {
|
||||||
link_calculate_subroutine_compat(prog);
|
link_assign_atomic_counter_resources(ctx, prog);
|
||||||
check_resources(ctx, prog);
|
link_calculate_subroutine_compat(prog);
|
||||||
check_subroutine_resources(prog);
|
check_resources(ctx, prog);
|
||||||
check_image_resources(ctx, prog);
|
check_subroutine_resources(prog);
|
||||||
link_check_atomic_counter_resources(ctx, prog);
|
check_image_resources(ctx, prog);
|
||||||
|
link_check_atomic_counter_resources(ctx, prog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
@@ -4810,8 +4812,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||||||
last = i;
|
last = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
check_explicit_uniform_locations(ctx, prog);
|
if (!prog->data->cache_fallback) {
|
||||||
link_assign_subroutine_types(prog);
|
check_explicit_uniform_locations(ctx, prog);
|
||||||
|
link_assign_subroutine_types(prog);
|
||||||
|
}
|
||||||
|
|
||||||
if (!prog->data->LinkStatus)
|
if (!prog->data->LinkStatus)
|
||||||
goto done;
|
goto done;
|
||||||
|
@@ -359,9 +359,11 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
|
|||||||
shProg->data->ShaderStorageBlocks = NULL;
|
shProg->data->ShaderStorageBlocks = NULL;
|
||||||
shProg->data->NumShaderStorageBlocks = 0;
|
shProg->data->NumShaderStorageBlocks = 0;
|
||||||
|
|
||||||
ralloc_free(shProg->data->AtomicBuffers);
|
if (shProg->data->AtomicBuffers && !shProg->data->cache_fallback) {
|
||||||
shProg->data->AtomicBuffers = NULL;
|
ralloc_free(shProg->data->AtomicBuffers);
|
||||||
shProg->data->NumAtomicBuffers = 0;
|
shProg->data->AtomicBuffers = NULL;
|
||||||
|
shProg->data->NumAtomicBuffers = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (shProg->data->ProgramResourceList) {
|
if (shProg->data->ProgramResourceList) {
|
||||||
ralloc_free(shProg->data->ProgramResourceList);
|
ralloc_free(shProg->data->ProgramResourceList);
|
||||||
|
Reference in New Issue
Block a user