diff --git a/src/gallium/frontends/rusticl/api/kernel.rs b/src/gallium/frontends/rusticl/api/kernel.rs index c219d3cc55c..bd8cb2bbcc8 100644 --- a/src/gallium/frontends/rusticl/api/kernel.rs +++ b/src/gallium/frontends/rusticl/api/kernel.rs @@ -489,7 +489,7 @@ fn set_kernel_arg_svm_pointer( return Err(CL_INVALID_ARG_INDEX); } - let arg_value = KernelArgValue::Constant(arg_value.to_ne_bytes().to_vec()); + let arg_value = KernelArgValue::SVM(arg_value); kernel.set_kernel_arg(arg_index, arg_value) } else { Err(CL_INVALID_ARG_INDEX) diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index ee20b1bcca1..7a161e8064c 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -53,6 +53,7 @@ pub enum KernelArgValue { None, /// cl_ext_buffer_device_address BDA(u64), + SVM(usize), Buffer(Weak), Constant(Vec), Image(Weak), @@ -1496,6 +1497,11 @@ impl Kernel { ); } } + &KernelArgValue::SVM(handle) => { + if !api_arg.dead { + add_pointer(q, &mut input, handle as u64); + } + } KernelArgValue::Image(image) => { let image = &image_arcs[&(image.as_ptr() as usize)]; let (formats, orders) = if api_arg.kind == KernelArgType::Image {