Skip to content

Draft: intel/compiler: fix default subgroup size for compute, mesh & task stages

Marcin Ślusarz requested to merge mslusarz/mesa:subgroups into main

Vulkan spec mandates that when user didn't specify subgroup size themselves (via VkPipelineShaderStageRequiredSubgroupSizeCreateInfo) or SPIR-V version is below 1.6, then subgroup size must match Vulkan 1.1 default (VkPhysicalDeviceVulkan11Properties->subgroupSize).

Right now if the above conditions are not fullfilled then all SIMD variants (8/16/32) are compiled with gl_SubgroupSize == 32 (because in brw_nir_apply_key get_subgroup_size returns BRW_SUBGROUP_SIZE for SUBGROUP_SIZE_API_CONSTANT independent of dispatch size), which can break all kind of assumptions.

This patch fixes dEQP-VK.subgroups.ballot_broadcast.mesh.subgroupbroadcast_nonconst_*_[task|mesh] which after unrelated register allocator change started to touch registers >= g128.

Merge request reports