glsl: remove Par-linking from the standalone linker

lima was the last user of this feature so lets remove it. This will
allow us to drop more soon to be unused glsl ir code once full nir
linker support lands.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29519>
This commit is contained in:
Timothy Arceri 2024-05-31 14:00:19 +10:00 committed by Marge Bot
parent 0bf10ad4ad
commit f1ef6517e8

View file

@ -471,47 +471,10 @@ standalone_compile_shader(const struct standalone_options *_options,
}
}
if (status == EXIT_SUCCESS) {
if (status == EXIT_SUCCESS && options->do_link) {
_mesa_clear_shader_program_data(ctx, whole_program);
if (options->do_link) {
link_shaders(ctx, whole_program);
} else {
const gl_shader_stage stage = whole_program->Shaders[0]->Stage;
whole_program->data->LinkStatus = LINKING_SUCCESS;
whole_program->_LinkedShaders[stage] =
link_intrastage_shaders(whole_program /* mem_ctx */,
ctx,
whole_program,
whole_program->Shaders,
1,
true);
/* Par-linking can fail, for example, if there are undefined external
* references.
*/
if (whole_program->_LinkedShaders[stage] != NULL) {
assert(whole_program->data->LinkStatus);
struct gl_shader_compiler_options *const compiler_options =
&ctx->Const.ShaderCompilerOptions[stage];
exec_list *const ir =
whole_program->_LinkedShaders[stage]->ir;
bool progress;
do {
progress = do_function_inlining(ir);
progress = do_common_optimization(ir,
false,
compiler_options,
true)
&& progress;
} while(progress);
}
}
link_shaders(ctx, whole_program);
status = (whole_program->data->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE;