Module: Mesa
Branch: master
Commit: 0f96a9ab3b094e1cc2534779bf3a5c6f1d49177a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f96a9ab3b094e1cc2534779bf3a5c6f1d49177a

Author: Iván Briano <[email protected]>
Date:   Wed Nov  4 13:51:56 2020 -0800

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 <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7453>

---

 src/intel/vulkan/anv_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 85f80d24a9d..cfac459b3ce 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -2055,7 +2055,8 @@ void anv_GetPhysicalDeviceProperties2(
          STATIC_ASSERT(8 <= BRW_SUBGROUP_SIZE && BRW_SUBGROUP_SIZE <= 32);
          props->minSubgroupSize = 8;
          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;
          break;
       }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to