radv: Recompute max_waves after postprocessing RT config
The max waves for RT prolog need to be recalculated after merging the
resource usage of all shaders invoked from it.
Note that there is no need to panic, as the info was only used to
calculate maximum scratch size and with the RT prolog being low
footprint, this likely only caused overestimation rather than
underestimation.
Fixes: 533ec9843e ("radv: Precompute shader max_waves.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26998>
(cherry picked from commit 63827751e136cbfd8f5eb5cd74df40442377972e)
This commit is contained in:
parent
1f5604ed45
commit
fc11cbb37e
4 changed files with 7 additions and 2 deletions
|
|
@ -734,7 +734,7 @@
|
|||
"description": "radv: Recompute max_waves after postprocessing RT config",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "533ec9843e466e0cadf876a39d6fac74db2bdcd6",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -732,6 +732,8 @@ compile_rt_prolog(struct radv_device *device, struct radv_ray_tracing_pipeline *
|
|||
combine_config(config, &pipeline->base.base.shaders[MESA_SHADER_INTERSECTION]->config);
|
||||
|
||||
postprocess_rt_config(config, device->physical_device->rad_info.gfx_level, device->physical_device->rt_wave_size);
|
||||
|
||||
pipeline->prolog->max_waves = radv_get_max_waves(device, config, &pipeline->prolog->info);
|
||||
}
|
||||
|
||||
static VkResult
|
||||
|
|
|
|||
|
|
@ -2051,7 +2051,7 @@ radv_shader_upload(struct radv_device *device, struct radv_shader *shader, const
|
|||
return true;
|
||||
}
|
||||
|
||||
static unsigned
|
||||
unsigned
|
||||
radv_get_max_waves(const struct radv_device *device, const struct ac_shader_config *conf,
|
||||
const struct radv_shader_info *info)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -803,6 +803,9 @@ struct radv_shader_part *radv_shader_part_cache_get(struct radv_device *device,
|
|||
uint64_t radv_shader_get_va(const struct radv_shader *shader);
|
||||
struct radv_shader *radv_find_shader(struct radv_device *device, uint64_t pc);
|
||||
|
||||
unsigned radv_get_max_waves(const struct radv_device *device, const struct ac_shader_config *conf,
|
||||
const struct radv_shader_info *info);
|
||||
|
||||
unsigned radv_get_max_scratch_waves(const struct radv_device *device, struct radv_shader *shader);
|
||||
|
||||
const char *radv_get_shader_name(const struct radv_shader_info *info, gl_shader_stage stage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue