radv: remove set but never used num_preserved_sgprs

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21897>
This commit is contained in:
Samuel Pitoiset
2023-03-10 14:26:00 +01:00
committed by Marge Bot
parent 415b824bc6
commit 2803b786f0
6 changed files with 4 additions and 15 deletions
@@ -11898,13 +11898,12 @@ select_rt_prolog(Program* program, ac_shader_config* config,
void
select_vs_prolog(Program* program, const struct aco_vs_prolog_info* pinfo, ac_shader_config* config,
const struct aco_compiler_options* options, const struct aco_shader_info* info,
const struct ac_shader_args* args, unsigned* num_preserved_sgprs)
const struct ac_shader_args* args)
{
assert(pinfo->num_attributes > 0);
/* This should be enough for any shader/stage. */
unsigned max_user_sgprs = options->gfx_level >= GFX9 ? 32 : 16;
*num_preserved_sgprs = max_user_sgprs + 14;
init_program(program, compute_cs, info, options->gfx_level, options->family, options->wgp_mode,
config);
@@ -11929,7 +11928,7 @@ select_vs_prolog(Program* program, const struct aco_vs_prolog_info* pinfo, ac_sh
lgkm_imm.lgkm = 0;
/* choose sgprs */
PhysReg vertex_buffers(align(*num_preserved_sgprs, 2));
PhysReg vertex_buffers(align(max_user_sgprs + 14, 2));
PhysReg prolog_input = vertex_buffers.advance(8);
PhysReg desc(
align((has_nontrivial_divisors ? prolog_input : vertex_buffers).advance(8).reg(), 4));
+1 -4
View File
@@ -312,8 +312,7 @@ aco_compile_vs_prolog(const struct aco_compiler_options* options,
program->debug.private_data = NULL;
/* create IR */
unsigned num_preserved_sgprs;
aco::select_vs_prolog(program.get(), pinfo, &config, options, info, args, &num_preserved_sgprs);
aco::select_vs_prolog(program.get(), pinfo, &config, options, info, args);
aco::insert_NOPs(program.get());
if (options->dump_shader)
@@ -333,7 +332,6 @@ aco_compile_vs_prolog(const struct aco_compiler_options* options,
(*build_prolog)(binary,
config.num_sgprs,
config.num_vgprs,
num_preserved_sgprs,
code.data(),
code.size(),
disasm.data(),
@@ -376,7 +374,6 @@ aco_compile_ps_epilog(const struct aco_compiler_options* options,
(*build_epilog)(binary,
config.num_sgprs,
config.num_vgprs,
0,
code.data(),
code.size(),
disasm.data(),
-1
View File
@@ -60,7 +60,6 @@ typedef void (aco_callback)(void **priv_ptr,
typedef void (aco_shader_part_callback)(void **priv_ptr,
uint32_t num_sgprs,
uint32_t num_vgprs,
uint32_t num_preserved_sgprs,
const uint32_t *code,
uint32_t code_size,
const char *disasm_str,
+1 -2
View File
@@ -2193,8 +2193,7 @@ void select_rt_prolog(Program* program, ac_shader_config* config,
const struct ac_shader_args* out_args);
void select_vs_prolog(Program* program, const struct aco_vs_prolog_info* pinfo,
ac_shader_config* config, const struct aco_compiler_options* options,
const struct aco_shader_info* info, const struct ac_shader_args* args,
unsigned* num_preserved_sgprs);
const struct aco_shader_info* info, const struct ac_shader_args* args);
void select_ps_epilog(Program* program, const struct aco_ps_epilog_info* epilog_info,
ac_shader_config* config, const struct aco_compiler_options* options,
-3
View File
@@ -2502,7 +2502,6 @@ radv_shader_part_create(struct radv_shader_part_binary *binary, unsigned wave_si
shader_part->code_size = code_size;
shader_part->rsrc1 = S_00B848_VGPRS((binary->num_vgprs - 1) / (wave_size == 32 ? 8 : 4)) |
S_00B228_SGPRS((binary->num_sgprs - 1) / 8);
shader_part->num_preserved_sgprs = binary->num_preserved_sgprs;
shader_part->disasm_string =
binary->disasm_size ? strdup((const char *)(binary->data + binary->code_size)) : NULL;
@@ -2773,7 +2772,6 @@ radv_create_trap_handler_shader(struct radv_device *device)
static void radv_aco_build_shader_part(void **bin,
uint32_t num_sgprs,
uint32_t num_vgprs,
uint32_t num_preserved_sgprs,
const uint32_t *code,
uint32_t code_size,
const char *disasm_str,
@@ -2787,7 +2785,6 @@ static void radv_aco_build_shader_part(void **bin,
part_binary->num_sgprs = num_sgprs;
part_binary->num_vgprs = num_vgprs;
part_binary->num_preserved_sgprs = num_preserved_sgprs;
part_binary->code_size = code_size * sizeof(uint32_t);
memcpy(part_binary->data, code, part_binary->code_size);
if (disasm_size) {
-2
View File
@@ -460,7 +460,6 @@ struct radv_shader_binary_rtld {
struct radv_shader_part_binary {
uint8_t num_sgprs;
uint8_t num_vgprs;
uint8_t num_preserved_sgprs;
unsigned code_size;
unsigned disasm_size;
uint8_t data[0];
@@ -523,7 +522,6 @@ struct radv_shader_part {
union radv_shader_arena_block *alloc;
uint32_t code_size;
uint32_t rsrc1;
uint8_t num_preserved_sgprs;
bool nontrivial_divisors;
uint32_t spi_shader_col_format;
uint64_t upload_seq;