glsl: remove more now unused params from glsl_to_nir()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
This commit is contained in:
Timothy Arceri 2024-11-20 17:57:54 +11:00 committed by Marge Bot
parent 44de5f1c46
commit 7469f99ea1
3 changed files with 8 additions and 12 deletions

View file

@ -2500,8 +2500,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
if (shader->CompileStatus == COMPILE_SUCCESS) {
memcpy(shader->compiled_source_blake3, source_blake3, BLAKE3_OUT_LEN);
shader->nir = glsl_to_nir(&ctx->Const, shader, NULL,
options->NirOptions, source_blake3);
shader->nir = glsl_to_nir(shader, options->NirOptions, source_blake3);
}
if (ctx->Cache && shader->CompileStatus == COMPILE_SUCCESS) {

View file

@ -78,8 +78,7 @@ namespace {
class nir_visitor : public ir_visitor
{
public:
nir_visitor(const struct gl_constants *consts, nir_shader *shader,
const uint8_t *src_blake3);
nir_visitor(nir_shader *shader, const uint8_t *src_blake3);
nir_visitor(const nir_visitor &) = delete;
~nir_visitor();
nir_visitor & operator=(const nir_visitor &) = delete;
@ -172,16 +171,16 @@ private:
} /* end of anonymous namespace */
nir_shader *
glsl_to_nir(const struct gl_constants *consts,
struct gl_shader *gl_shader, shader_info *si,
glsl_to_nir(struct gl_shader *gl_shader,
const nir_shader_compiler_options *options,
const uint8_t *src_blake3)
{
MESA_TRACE_FUNC();
nir_shader *shader = nir_shader_create(NULL, gl_shader->Stage, options, si);
nir_shader *shader =
nir_shader_create(NULL, gl_shader->Stage, options, NULL);
nir_visitor v1(consts, shader, src_blake3);
nir_visitor v1(shader, src_blake3);
nir_function_visitor v2(&v1);
v2.run(gl_shader->ir);
visit_exec_list(gl_shader->ir, &v1);
@ -199,8 +198,7 @@ glsl_to_nir(const struct gl_constants *consts,
return shader;
}
nir_visitor::nir_visitor(const struct gl_constants *consts, nir_shader *shader,
const uint8_t *src_blake3)
nir_visitor::nir_visitor(nir_shader *shader, const uint8_t *src_blake3)
{
this->shader = shader;
this->is_global = true;

View file

@ -39,8 +39,7 @@ struct gl_constants;
struct gl_shader;
struct gl_shader_program;
nir_shader *glsl_to_nir(const struct gl_constants *consts,
struct gl_shader *shader, shader_info *si,
nir_shader *glsl_to_nir(struct gl_shader *shader,
const nir_shader_compiler_options *options,
const uint8_t *src_blake3);