From 6bc47e65d79268d84f7417cba2fb5f17b1894ca5 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 1 Jul 2025 09:14:10 -0700 Subject: [PATCH] rusticl: Fix work group size validation For each dimension, we `threads *= lws`.. which is still zero if threads is initialized to zero. Fixes: eca4f0f632b1 ("rusticl/kernel: check that local size on dispatch doesn't exceed limits") Signed-off-by: Rob Clark Reviewed-by: Karol Herbst Part-of: --- src/amd/ci/radeonsi-raven-fails.txt | 4 ++++ src/gallium/frontends/rusticl/api/kernel.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/amd/ci/radeonsi-raven-fails.txt b/src/amd/ci/radeonsi-raven-fails.txt index 97c8c241ddb..5b0fed533ff 100644 --- a/src/amd/ci/radeonsi-raven-fails.txt +++ b/src/amd/ci/radeonsi-raven-fails.txt @@ -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 diff --git a/src/gallium/frontends/rusticl/api/kernel.rs b/src/gallium/frontends/rusticl/api/kernel.rs index 0505fd3cc7e..84db0545fb6 100644 --- a/src/gallium/frontends/rusticl/api/kernel.rs +++ b/src/gallium/frontends/rusticl/api/kernel.rs @@ -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];