mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
rusticl/kernel: implement CL_KERNEL_GLOBAL_WORK_SIZE for custom devices
Apparently we are supposed to support this on custom devices. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30123>
This commit is contained in:
parent
97ca375f51
commit
97a137ac88
1 changed files with 10 additions and 0 deletions
|
|
@ -115,6 +115,16 @@ unsafe impl CLInfoObj<cl_kernel_work_group_info, cl_device_id> for cl_kernel {
|
|||
|
||||
match *q {
|
||||
CL_KERNEL_COMPILE_WORK_GROUP_SIZE => v.write::<[usize; 3]>(kernel.work_group_size()),
|
||||
CL_KERNEL_GLOBAL_WORK_SIZE => {
|
||||
// If device is not a custom device and kernel is not a built-in kernel
|
||||
// clGetKernelWorkGroupInfo returns the error CL_INVALID_VALUE.
|
||||
if dev.device_type & CL_DEVICE_TYPE_CUSTOM == 0 {
|
||||
return Err(CL_INVALID_VALUE);
|
||||
}
|
||||
|
||||
// We don't have any enqueue limits.
|
||||
v.write::<[usize; 3]>([usize::MAX; 3])
|
||||
}
|
||||
CL_KERNEL_LOCAL_MEM_SIZE => v.write::<cl_ulong>(kernel.local_mem_size(dev)),
|
||||
CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE => {
|
||||
v.write::<usize>(kernel.preferred_simd_size(dev))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue