diff --git a/src/gallium/frontends/rusticl/api/icd.rs b/src/gallium/frontends/rusticl/api/icd.rs index 3de9cb2c6f6..bb88e1abf5f 100644 --- a/src/gallium/frontends/rusticl/api/icd.rs +++ b/src/gallium/frontends/rusticl/api/icd.rs @@ -211,6 +211,7 @@ cl_dispatch!([ clCreateBufferWithProperties: Some(clCreateBufferWithProperties), clCreateImageWithProperties: Some(clCreateImageWithProperties), clSetContextDestructorCallback: Some(clSetContextDestructorCallback), + clGetKernelSuggestedLocalWorkSize: Some(clGetKernelSuggestedLocalWorkSize), ]); pub type CLError = cl_int; @@ -577,7 +578,7 @@ pub extern "C" fn clGetExtensionFunctionAddress( "clRetainSemaphoreKHR" => cl_ext_func!(clRetainSemaphoreKHR: clRetainSemaphoreKHR_t), // cl_khr_suggested_local_work_size - "clGetKernelSuggestedLocalWorkSizeKHR" => cl_ext_func!(clGetKernelSuggestedLocalWorkSizeKHR: clGetKernelSuggestedLocalWorkSizeKHR_fn), + "clGetKernelSuggestedLocalWorkSizeKHR" => cl_ext_func!(clGetKernelSuggestedLocalWorkSize: clGetKernelSuggestedLocalWorkSizeKHR_fn), // cl_ext_buffer_device_address "clSetKernelArgDevicePointerEXT" => cl_ext_func!(clSetKernelArgDevicePointerEXT: clSetKernelArgDevicePointerEXT_fn), diff --git a/src/gallium/frontends/rusticl/api/kernel.rs b/src/gallium/frontends/rusticl/api/kernel.rs index ce4e2ed1961..811ad5dc4e8 100644 --- a/src/gallium/frontends/rusticl/api/kernel.rs +++ b/src/gallium/frontends/rusticl/api/kernel.rs @@ -389,11 +389,7 @@ fn set_kernel_arg( // arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the // local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler). match arg.kind { - KernelArgType::MemLocal => { - if arg_size == 0 { - return Err(CL_INVALID_ARG_SIZE); - } - } + KernelArgType::MemLocal => {} KernelArgType::MemGlobal | KernelArgType::MemConstant | KernelArgType::Image @@ -856,8 +852,8 @@ fn clone_kernel(source_kernel: cl_kernel) -> CLResult { Ok(Arc::new(k.clone()).into_cl()) } -#[cl_entrypoint(clGetKernelSuggestedLocalWorkSizeKHR)] -fn get_kernel_suggested_local_work_size_khr( +#[cl_entrypoint(clGetKernelSuggestedLocalWorkSize)] +fn get_kernel_suggested_local_work_size( command_queue: cl_command_queue, kernel: cl_kernel, work_dim: cl_uint, diff --git a/src/gallium/frontends/rusticl/api/platform.rs b/src/gallium/frontends/rusticl/api/platform.rs index 99aa0442213..e98711a9e4a 100644 --- a/src/gallium/frontends/rusticl/api/platform.rs +++ b/src/gallium/frontends/rusticl/api/platform.rs @@ -25,7 +25,7 @@ unsafe impl CLInfo for cl_platform_id { CL_PLATFORM_HOST_TIMER_RESOLUTION => v.write::(1), CL_PLATFORM_ICD_SUFFIX_KHR => v.write::<&CStr>(c"MESA"), CL_PLATFORM_NAME => v.write::<&CStr>(c"rusticl"), - CL_PLATFORM_NUMERIC_VERSION => v.write::(CLVersion::Cl3_0.into()), + CL_PLATFORM_NUMERIC_VERSION => v.write::(CLVersion::Cl3_1.into()), CL_PLATFORM_PROFILE => v.write::<&CStr>(c"FULL_PROFILE"), CL_PLATFORM_SEMAPHORE_EXPORT_HANDLE_TYPES_KHR => { v.write::<&[cl_external_semaphore_handle_type_khr]>( @@ -54,7 +54,7 @@ unsafe impl CLInfo for cl_platform_id { } CL_PLATFORM_VENDOR => v.write::<&CStr>(c"Mesa/X.org"), // OpenCL - CL_PLATFORM_VERSION => v.write::<&CStr>(c"OpenCL 3.0 "), + CL_PLATFORM_VERSION => v.write::<&CStr>(c"OpenCL 3.1 "), // CL_INVALID_VALUE if param_name is not one of the supported values _ => Err(CL_INVALID_VALUE), } diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build index d582dc50936..4885b5c80eb 100644 --- a/src/gallium/frontends/rusticl/meson.build +++ b/src/gallium/frontends/rusticl/meson.build @@ -128,7 +128,7 @@ cl_c_args = [ '-DCL_USE_DEPRECATED_OPENCL_2_0_APIS', '-DCL_USE_DEPRECATED_OPENCL_2_1_APIS', '-DCL_USE_DEPRECATED_OPENCL_2_2_APIS', - '-DCL_TARGET_OPENCL_VERSION=300', + '-DCL_TARGET_OPENCL_VERSION=310', ] rusticl_opencl_bindings_rs = rust.bindgen(