vulkan: setup max_subgroup_size for drivers without varying/max/min size support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Ensures max_subgroup_size is set to the subgroupSize physical device
property on drivers that don't support VK_EXT_shader_object,
VK_EXT_subgroup_size_control, or Vulkan 1.3.

Fixes: d807f5a351 ("vulkan: set nir subgroup size shader info")
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37477>
This commit is contained in:
Simon Perretta 2025-09-19 20:53:57 +01:00 committed by Marge Bot
parent 2c676a38ea
commit 67c4b762a5

View file

@ -122,11 +122,11 @@ vk_set_subgroup_size(struct vk_device *device,
/* Starting with SPIR-V 1.6, varying subgroup size is the default */ /* Starting with SPIR-V 1.6, varying subgroup size is the default */
} else { } else {
shader->info.api_subgroup_size = properties->subgroupSize; shader->info.api_subgroup_size = properties->subgroupSize;
shader->info.max_subgroup_size = properties->subgroupSize;
if (require_full) { if (require_full) {
assert(shader->info.stage == MESA_SHADER_COMPUTE || assert(shader->info.stage == MESA_SHADER_COMPUTE ||
shader->info.stage == MESA_SHADER_MESH || shader->info.stage == MESA_SHADER_MESH ||
shader->info.stage == MESA_SHADER_TASK); shader->info.stage == MESA_SHADER_TASK);
shader->info.max_subgroup_size = properties->subgroupSize;
shader->info.min_subgroup_size = properties->subgroupSize; shader->info.min_subgroup_size = properties->subgroupSize;
} }
} }