summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2021-12-05 12:58:18 +1100
committerMarge Bot <emma+marge@anholt.net>2021-12-06 10:15:08 +0000
commit33cbab854ea6f182a7a19d183f1b85b8fc8fee07 (patch)
tree339515b3c7b38d3d84dab1a9a73494612f2a9bd5
parentd44478483c77233a2e44fba4afce371ba4946fa6 (diff)
mesa: remove _mesa_ir_link_shader()
The final use of this was removed when the classic drivers were dropped. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14066>
-rw-r--r--src/mesa/main/shaderobj.c7
-rw-r--r--src/mesa/main/shaderobj.h4
-rw-r--r--src/mesa/program/ir_to_mesa.cpp87
-rw-r--r--src/mesa/program/ir_to_mesa.h1
4 files changed, 0 insertions, 99 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 5d7dd85672c..75f8e064ae3 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -483,10 +483,3 @@ _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name,
{
return _mesa_lookup_shader_program_err_glthread(ctx, name, false, caller);
}
-
-
-void
-_mesa_init_shader_object_functions(struct dd_function_table *driver)
-{
- driver->LinkShader = _mesa_ir_link_shader;
-}
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index 8c9cb8bc921..5900f4bc7bf 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -123,10 +123,6 @@ extern void
_mesa_delete_shader_program(struct gl_context *ctx,
struct gl_shader_program *shProg);
-
-extern void
-_mesa_init_shader_object_functions(struct dd_function_table *driver);
-
static inline gl_shader_stage
_mesa_shader_enum_to_shader_stage(GLenum v)
{
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index acf20347ccd..af3f2a42d0e 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -3003,93 +3003,6 @@ fail_exit:
extern "C" {
/**
- * Link a shader.
- * Called via ctx->Driver.LinkShader()
- * This actually involves converting GLSL IR into Mesa gl_programs with
- * code lowering and other optimizations.
- */
-GLboolean
-_mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
-{
- assert(prog->data->LinkStatus);
-
- for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
- if (prog->_LinkedShaders[i] == NULL)
- continue;
-
- bool progress;
- exec_list *ir = prog->_LinkedShaders[i]->ir;
- const struct gl_shader_compiler_options *options =
- &ctx->Const.ShaderCompilerOptions[prog->_LinkedShaders[i]->Stage];
-
- do {
- progress = false;
-
- /* Lowering */
- do_mat_op_to_vec(ir);
- lower_instructions(ir, (MOD_TO_FLOOR | DIV_TO_MUL_RCP | EXP_TO_EXP2
- | LOG_TO_LOG2 | INT_DIV_TO_MUL_RCP
- | MUL64_TO_MUL_AND_MUL_HIGH
- | ((options->EmitNoPow) ? POW_TO_EXP2 : 0)));
-
- progress = do_common_optimization(ir, true, true,
- options, ctx->Const.NativeIntegers)
- || progress;
-
- progress = lower_quadop_vector(ir, true) || progress;
-
- if (options->MaxIfDepth == 0)
- progress = lower_discard(ir) || progress;
-
- progress = lower_if_to_cond_assign((gl_shader_stage)i, ir,
- options->MaxIfDepth) || progress;
-
- /* If there are forms of indirect addressing that the driver
- * cannot handle, perform the lowering pass.
- */
- if (options->EmitNoIndirectInput || options->EmitNoIndirectOutput
- || options->EmitNoIndirectTemp || options->EmitNoIndirectUniform)
- progress =
- lower_variable_index_to_cond_assign(prog->_LinkedShaders[i]->Stage, ir,
- options->EmitNoIndirectInput,
- options->EmitNoIndirectOutput,
- options->EmitNoIndirectTemp,
- options->EmitNoIndirectUniform)
- || progress;
-
- progress = do_vec_index_to_cond_assign(ir) || progress;
- progress = lower_vector_insert(ir, true) || progress;
- } while (progress);
-
- validate_ir_tree(ir);
- }
-
- for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
- struct gl_program *linked_prog;
-
- if (prog->_LinkedShaders[i] == NULL)
- continue;
-
- linked_prog = get_mesa_program(ctx, prog, prog->_LinkedShaders[i]);
-
- if (linked_prog) {
- _mesa_copy_linked_program_data(prog, prog->_LinkedShaders[i]);
-
- if (!ctx->Driver.ProgramStringNotify(ctx,
- _mesa_shader_stage_to_program(i),
- linked_prog)) {
- _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program,
- NULL);
- return GL_FALSE;
- }
- }
- }
-
- build_program_resource_list(ctx, prog, false);
- return prog->data->LinkStatus;
-}
-
-/**
* Link a GLSL shader program. Called via glLinkProgram().
*/
void
diff --git a/src/mesa/program/ir_to_mesa.h b/src/mesa/program/ir_to_mesa.h
index 81c05e298e8..25d4fc89932 100644
--- a/src/mesa/program/ir_to_mesa.h
+++ b/src/mesa/program/ir_to_mesa.h
@@ -38,7 +38,6 @@ struct gl_linked_shader;
struct gl_program_parameter_list;
void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
void
_mesa_generate_parameters_list_for_uniforms(struct gl_context *ctx,