glsl: move shader cache lookup call to st
The nir shader cache read call is just below this call now so the code is easier to follow. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
This commit is contained in:
committed by
Marge Bot
parent
b663eb83fe
commit
37ac8f5e79
@@ -115,9 +115,4 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
linker_error(prog, "no shaders attached to the program\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SHADER_CACHE
|
||||
if (shader_cache_read_program_metadata(ctx, prog))
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -985,9 +985,13 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
prog->data->spirv = spirv;
|
||||
|
||||
if (prog->data->LinkStatus) {
|
||||
if (!spirv)
|
||||
if (!spirv) {
|
||||
link_shaders(ctx, prog);
|
||||
else
|
||||
|
||||
#ifdef ENABLE_SHADER_CACHE
|
||||
shader_cache_read_program_metadata(ctx, prog);
|
||||
#endif
|
||||
} else
|
||||
_mesa_spirv_link_shaders(ctx, prog);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user