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>
(cherry picked from commit 6bc47e65d7)
This commit is contained in:
Rob Clark 2025-07-01 09:14:10 -07:00 committed by Eric Engestrom
parent 9b3b65d7c3
commit 1a85ddb514
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@
"description": "rusticl: Fix work group size validation",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "eca4f0f632b1e3e6e24bd12ee5f00522eb7d0fdb",
"notes": null

View file

@ -595,7 +595,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];