diff --git a/src/gallium/frontends/rusticl/api/icd.rs b/src/gallium/frontends/rusticl/api/icd.rs index 2424d5d45a3..acb239b2db9 100644 --- a/src/gallium/frontends/rusticl/api/icd.rs +++ b/src/gallium/frontends/rusticl/api/icd.rs @@ -166,7 +166,7 @@ pub static DISPATCH: cl_icd_dispatch = cl_icd_dispatch { clGetHostTimer: None, clGetKernelSubGroupInfo: Some(cl_get_kernel_sub_group_info), clSetDefaultDeviceCommandQueue: None, - clSetProgramReleaseCallback: None, + clSetProgramReleaseCallback: Some(cl_set_program_release_callback), clSetProgramSpecializationConstant: Some(cl_set_program_specialization_constant), clCreateBufferWithProperties: Some(cl_create_buffer_with_properties), clCreateImageWithProperties: Some(cl_create_image_with_properties), @@ -1669,6 +1669,14 @@ extern "C" fn cl_get_kernel_sub_group_info( CL_OUT_OF_HOST_MEMORY } +extern "C" fn cl_set_program_release_callback( + program: cl_program, + pfn_notify: ::std::option::Option, + user_data: *mut ::std::os::raw::c_void, +) -> cl_int { + match_err!(set_program_release_callback(program, pfn_notify, user_data)) +} + extern "C" fn cl_set_program_specialization_constant( program: cl_program, spec_id: cl_uint, diff --git a/src/gallium/frontends/rusticl/api/program.rs b/src/gallium/frontends/rusticl/api/program.rs index 1ff71ff878f..d82501d58e2 100644 --- a/src/gallium/frontends/rusticl/api/program.rs +++ b/src/gallium/frontends/rusticl/api/program.rs @@ -47,6 +47,8 @@ impl CLInfo for cl_program { CL_PROGRAM_NUM_DEVICES => cl_prop::(prog.devs.len() as cl_uint), CL_PROGRAM_NUM_KERNELS => cl_prop::(prog.kernels().len()), CL_PROGRAM_REFERENCE_COUNT => cl_prop::(self.refcnt()?), + CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT => cl_prop::(CL_FALSE), + CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT => cl_prop::(CL_FALSE), CL_PROGRAM_SOURCE => cl_prop::<&CStr>(prog.src.as_c_str()), // CL_INVALID_VALUE if param_name is not one of the supported values _ => return Err(CL_INVALID_VALUE), @@ -371,3 +373,11 @@ pub fn set_program_specialization_constant( println!("set_program_specialization_constantnot implemented"); Err(CL_INVALID_OPERATION) } + +pub fn set_program_release_callback( + _program: cl_program, + _pfn_notify: ::std::option::Option, + _user_data: *mut ::std::os::raw::c_void, +) -> CLResult<()> { + Err(CL_INVALID_OPERATION) +}