summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-04-24 19:07:44 -0500
committerDylan Baker <dylan.c.baker@intel.com>2020-04-28 12:01:49 -0700
commit4072515d5794eec582c41dad2a233b6d8e062919 (patch)
tree95cf238aebae02d98081fd45171240dcd8b6c691
parent002f718dfafdcb661d13bd8c46dd3d8f36b23494 (diff)
anv: Expose CS workgroup sizes based on a maximum of 64 threads
Otherwise, we'll hit asserts in brw_compile_cs. Fixes: cf12faef614ab "intel/compiler: Restrict cs_threads to 64" Closes: #2835 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4746> (cherry picked from commit 81ac741f8929b90a16a0b4251f3e6da02dde6133)
-rw-r--r--.pick_status.json2
-rw-r--r--src/intel/vulkan/anv_device.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 6a56b35b407..abd9ccb7bf6 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -229,7 +229,7 @@
"description": "anv: Expose CS workgroup sizes based on a maximum of 64 threads",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "cf12faef614ab7cd9996410f1d161558a3853936"
},
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 2da193a2932..2c1b461041f 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1422,7 +1422,8 @@ void anv_GetPhysicalDeviceProperties(
pdevice->has_bindless_images && pdevice->has_a64_buffer_access
? UINT32_MAX : MAX_BINDING_TABLE_SIZE - MAX_RTS - 1;
- const uint32_t max_workgroup_size = 32 * devinfo->max_cs_threads;
+ /* Limit max_threads to 64 for the GPGPU_WALKER command */
+ const uint32_t max_workgroup_size = 32 * MIN2(64, devinfo->max_cs_threads);
VkSampleCountFlags sample_counts =
isl_device_get_sample_counts(&pdevice->isl_dev);