anv: restrict number of subgroups per group
We are limited to 64 threads per dispatched group, regardless of what num_cs_threads claims, so advertise that limit correctly. Fixes (on TGL and up): dEQP-VK.subgroups.size_control.compute.required_subgroup_size_min and other *.required_subgroup_size_min tests. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7453>
This commit is contained in:
parent
b2c719308c
commit
0f96a9ab3b
|
@ -2055,7 +2055,8 @@ void anv_GetPhysicalDeviceProperties2(
|
||||||
STATIC_ASSERT(8 <= BRW_SUBGROUP_SIZE && BRW_SUBGROUP_SIZE <= 32);
|
STATIC_ASSERT(8 <= BRW_SUBGROUP_SIZE && BRW_SUBGROUP_SIZE <= 32);
|
||||||
props->minSubgroupSize = 8;
|
props->minSubgroupSize = 8;
|
||||||
props->maxSubgroupSize = 32;
|
props->maxSubgroupSize = 32;
|
||||||
props->maxComputeWorkgroupSubgroups = pdevice->info.max_cs_threads;
|
/* Limit max_threads to 64 for the GPGPU_WALKER command. */
|
||||||
|
props->maxComputeWorkgroupSubgroups = MIN2(64, pdevice->info.max_cs_threads);
|
||||||
props->requiredSubgroupSizeStages = VK_SHADER_STAGE_COMPUTE_BIT;
|
props->requiredSubgroupSizeStages = VK_SHADER_STAGE_COMPUTE_BIT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue