nak: Add a NAK_SUBGROUP_SIZE #define

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
This commit is contained in:
Faith Ekstrand 2024-09-09 17:36:56 -05:00 committed by Marge Bot
parent 26a02b7df7
commit 4602b52a1c
2 changed files with 4 additions and 2 deletions

View file

@ -17,6 +17,8 @@
extern "C" {
#endif
#define NAK_SUBGROUP_SIZE 32
struct nak_compiler;
struct nir_shader_compiler_options;
struct nv_device_info;

View file

@ -47,7 +47,7 @@ nak_nir_workgroup_has_one_subgroup(const nir_shader *nir)
nir->info.workgroup_size[1] *
nir->info.workgroup_size[2];
return wg_sz <= 32;
return wg_sz <= NAK_SUBGROUP_SIZE;
}
default:
@ -893,7 +893,7 @@ nak_postprocess_nir(nir_shader *nir,
nak_optimize_nir(nir, nak);
const nir_lower_subgroups_options subgroups_options = {
.subgroup_size = 32,
.subgroup_size = NAK_SUBGROUP_SIZE,
.ballot_bit_size = 32,
.ballot_components = 1,
.lower_to_scalar = true,