rusticl: Fix work group size validation

For each dimension, we `threads *= lws`.. which is still zero if threads
is initialized to zero.

Fixes: eca4f0f632 ("rusticl/kernel: check that local size on dispatch doesn't exceed limits")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35864>
This commit is contained in:
Rob Clark
2025-07-01 09:14:10 -07:00
committed by Marge Bot
parent c417b83f19
commit 6bc47e65d7
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -68,6 +68,10 @@ program@execute@global-offset,Fail
program@execute@global-offset@3d- input dependent,Fail
program@execute@vector-conversion,Fail
# piglit bug, pigligt checks the global limits, but radeonsi advertises
# only half the threads if the work group size is variable...
program@run kernel with max work item sizes,Fail
# uprev Piglit in Mesa
spec@ext_external_objects@vk-semaphores,Crash
spec@ext_external_objects@vk-semaphores-2,Crash
+1 -1
View File
@@ -694,7 +694,7 @@ fn enqueue_ndrange_kernel(
let device_bits = q.device.address_bits();
let device_max = u64::MAX >> (u64::BITS - device_bits);
let mut threads = 0;
let mut threads = 1;
for i in 0..work_dim as usize {
let lws = local_work_size[i];
let gws = global_work_size[i];