radeonsi: remove ac_shader_config from si_shader_part

we only need num_sgprs and num_vgprs from it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
This commit is contained in:
Marek Olšák 2025-01-01 13:49:33 -05:00 committed by Marge Bot
parent 988aca159c
commit d1d6e6695e
4 changed files with 12 additions and 8 deletions

View file

@ -3601,9 +3601,9 @@ bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler
/* Update SGPR and VGPR counts. */
if (shader->prolog) {
shader->config.num_sgprs =
MAX2(shader->config.num_sgprs, shader->prolog->config.num_sgprs);
MAX2(shader->config.num_sgprs, shader->prolog->num_sgprs);
shader->config.num_vgprs =
MAX2(shader->config.num_vgprs, shader->prolog->config.num_vgprs);
MAX2(shader->config.num_vgprs, shader->prolog->num_vgprs);
}
if (shader->previous_stage) {
shader->config.num_sgprs =
@ -3625,9 +3625,9 @@ bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler
}
if (shader->epilog) {
shader->config.num_sgprs =
MAX2(shader->config.num_sgprs, shader->epilog->config.num_sgprs);
MAX2(shader->config.num_sgprs, shader->epilog->num_sgprs);
shader->config.num_vgprs =
MAX2(shader->config.num_vgprs, shader->epilog->config.num_vgprs);
MAX2(shader->config.num_vgprs, shader->epilog->num_vgprs);
}
si_calculate_max_simd_waves(shader);
}

View file

@ -1045,7 +1045,8 @@ struct si_shader_part {
struct si_shader_part *next;
union si_shader_part_key key;
struct si_shader_binary binary;
struct ac_shader_config config;
unsigned num_vgprs;
unsigned num_sgprs;
};
/* si_shader.c */

View file

@ -243,8 +243,8 @@ si_aco_build_shader_part_binary(void** priv_ptr, uint32_t num_sgprs, uint32_t nu
result->binary.disasm_size = disasm_size;
}
result->config.num_sgprs = num_sgprs;
result->config.num_vgprs = num_vgprs;
result->num_sgprs = num_sgprs;
result->num_vgprs = num_vgprs;
}
static bool

View file

@ -926,8 +926,11 @@ bool si_llvm_build_shader_part(struct si_screen *sscreen, gl_shader_stage stage,
/* Compile. */
si_llvm_optimize_module(&ctx);
bool ret = si_compile_llvm(sscreen, &result->binary, &result->config, compiler,
struct ac_shader_config config = {0};
bool ret = si_compile_llvm(sscreen, &result->binary, &config, compiler,
&ctx.ac, debug, ctx.stage, name);
result->num_vgprs = config.num_vgprs;
result->num_sgprs = config.num_sgprs;
si_llvm_dispose(&ctx);
return ret;