From f1ef6517e83a9440ce3dcdb34f608aa4641f0b3b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 31 May 2024 14:00:19 +1000 Subject: [PATCH] glsl: remove Par-linking from the standalone linker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- src/compiler/glsl/standalone.cpp | 41 ++------------------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp index e7acdc5fb12..7807e7ce524 100644 --- a/src/compiler/glsl/standalone.cpp +++ b/src/compiler/glsl/standalone.cpp @@ -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;