diff --git a/src/gallium/frontends/rusticl/api/kernel.rs b/src/gallium/frontends/rusticl/api/kernel.rs index a8f7f40f1fd..06cc13b4a7c 100644 --- a/src/gallium/frontends/rusticl/api/kernel.rs +++ b/src/gallium/frontends/rusticl/api/kernel.rs @@ -280,17 +280,17 @@ pub fn set_kernel_arg( if ptr.is_null() || (*ptr).is_null() { KernelArgValue::None } else { - KernelArgValue::MemObject((*ptr).get_ref()?) + KernelArgValue::MemObject((*ptr).get_arc()?) } } KernelArgType::MemLocal => KernelArgValue::LocalMem(arg_size), KernelArgType::Image | KernelArgType::RWImage | KernelArgType::Texture => { let img: *const cl_mem = arg_value.cast(); - KernelArgValue::MemObject((*img).get_ref()?) + KernelArgValue::MemObject((*img).get_arc()?) } KernelArgType::Sampler => { let ptr: *const cl_sampler = arg_value.cast(); - KernelArgValue::Sampler((*ptr).get_ref()?) + KernelArgValue::Sampler((*ptr).get_arc()?) } } } diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index 1e36bd79896..19f3f9892b0 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -30,8 +30,8 @@ use std::sync::Arc; pub enum KernelArgValue { None, Constant(Vec), - MemObject(&'static Mem), - Sampler(&'static Sampler), + MemObject(Arc), + Sampler(Arc), LocalMem(usize), }