mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 18:20:10 +01:00
radeonsi: improve the heuristic when to use Wave32 for compute shaders
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24759>
This commit is contained in:
parent
7f25f30443
commit
1c82067b60
1 changed files with 5 additions and 6 deletions
|
|
@ -38,12 +38,11 @@ unsigned si_determine_wave_size(struct si_screen *sscreen, struct si_shader *sha
|
|||
(stage == MESA_SHADER_GEOMETRY && !shader->key.ge.as_ngg))
|
||||
return 64;
|
||||
|
||||
/* Small workgroups use Wave32 unconditionally. */
|
||||
if (stage == MESA_SHADER_COMPUTE && info &&
|
||||
!info->base.workgroup_size_variable &&
|
||||
info->base.workgroup_size[0] *
|
||||
info->base.workgroup_size[1] *
|
||||
info->base.workgroup_size[2] <= 32)
|
||||
/* Workgroup sizes that are not divisible by 64 use Wave32. */
|
||||
if (stage == MESA_SHADER_COMPUTE && info && !info->base.workgroup_size_variable &&
|
||||
(info->base.workgroup_size[0] *
|
||||
info->base.workgroup_size[1] *
|
||||
info->base.workgroup_size[2]) % 64 != 0)
|
||||
return 32;
|
||||
|
||||
/* Debug flags. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue