ac: remove really_needs_scratch, parameter from ac_parse_shader_binary_config
it's always true Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
This commit is contained in:
parent
4b93dd215f
commit
c7ec284024
|
@ -37,11 +37,8 @@
|
|||
|
||||
/* Parse configuration data in .AMDGPU.config section format. */
|
||||
void ac_parse_shader_binary_config(const char *data, size_t nbytes, unsigned wave_size,
|
||||
bool really_needs_scratch, const struct radeon_info *info,
|
||||
struct ac_shader_config *conf)
|
||||
const struct radeon_info *info, struct ac_shader_config *conf)
|
||||
{
|
||||
uint32_t scratch_size = 0;
|
||||
|
||||
for (size_t i = 0; i < nbytes; i += 8) {
|
||||
unsigned reg = util_le32_to_cpu(*(uint32_t *)(data + i));
|
||||
unsigned value = util_le32_to_cpu(*(uint32_t *)(data + i + 4));
|
||||
|
@ -96,7 +93,7 @@ void ac_parse_shader_binary_config(const char *data, size_t nbytes, unsigned wav
|
|||
case R_0286E8_SPI_TMPRING_SIZE:
|
||||
case R_00B860_COMPUTE_TMPRING_SIZE:
|
||||
/* WAVESIZE is in units of 256 dwords. */
|
||||
scratch_size = value;
|
||||
conf->scratch_bytes_per_wave = G_00B860_WAVESIZE(value) * 1024;
|
||||
break;
|
||||
case SPILLED_SGPRS:
|
||||
conf->spilled_sgprs = value;
|
||||
|
@ -121,11 +118,6 @@ void ac_parse_shader_binary_config(const char *data, size_t nbytes, unsigned wav
|
|||
if (!conf->spi_ps_input_addr)
|
||||
conf->spi_ps_input_addr = conf->spi_ps_input_ena;
|
||||
|
||||
if (really_needs_scratch) {
|
||||
/* sgprs spills aren't spilling */
|
||||
conf->scratch_bytes_per_wave = G_00B860_WAVESIZE(scratch_size) * 256 * 4;
|
||||
}
|
||||
|
||||
/* GFX 10.3 internally:
|
||||
* - aligns VGPRS to 16 for Wave32 and 8 for Wave64
|
||||
* - aligns LDS to 1024
|
||||
|
|
|
@ -51,8 +51,7 @@ struct ac_shader_config {
|
|||
};
|
||||
|
||||
void ac_parse_shader_binary_config(const char *data, size_t nbytes, unsigned wave_size,
|
||||
bool really_needs_scratch, const struct radeon_info *info,
|
||||
struct ac_shader_config *conf);
|
||||
const struct radeon_info *info, struct ac_shader_config *conf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -526,7 +526,7 @@ bool ac_rtld_read_config(const struct radeon_info *info, struct ac_rtld_binary *
|
|||
|
||||
/* TODO: be precise about scratch use? */
|
||||
struct ac_shader_config c = {0};
|
||||
ac_parse_shader_binary_config(config_data, config_nbytes, binary->wave_size, true, info, &c);
|
||||
ac_parse_shader_binary_config(config_data, config_nbytes, binary->wave_size, info, &c);
|
||||
|
||||
config->num_sgprs = MAX2(config->num_sgprs, c.num_sgprs);
|
||||
config->num_vgprs = MAX2(config->num_vgprs, c.num_vgprs);
|
||||
|
|
Loading…
Reference in New Issue