rusticl: switch to new subgroup size info

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37258>
This commit is contained in:
Georg Lehmann 2025-09-09 19:39:22 +02:00 committed by Marge Bot
parent 1b5c78d1f7
commit 8d7b1498cc

View file

@ -322,20 +322,7 @@ impl NirShader {
}
pub fn subgroup_size(&self) -> u8 {
let subgroup_size = unsafe { (*self.nir.as_ptr()).info.subgroup_size };
let valid_subgroup_sizes = [
gl_subgroup_size::SUBGROUP_SIZE_REQUIRE_8,
gl_subgroup_size::SUBGROUP_SIZE_REQUIRE_16,
gl_subgroup_size::SUBGROUP_SIZE_REQUIRE_32,
gl_subgroup_size::SUBGROUP_SIZE_REQUIRE_64,
gl_subgroup_size::SUBGROUP_SIZE_REQUIRE_128,
];
if valid_subgroup_sizes.contains(&subgroup_size) {
subgroup_size as u8
} else {
0
}
unsafe { (*self.nir.as_ptr()).info.api_subgroup_size }
}
pub fn num_subgroups(&self) -> u8 {