diff --git a/src/gallium/frontends/rusticl/api/memory.rs b/src/gallium/frontends/rusticl/api/memory.rs index 3a2c5b3c203..af779a0c788 100644 --- a/src/gallium/frontends/rusticl/api/memory.rs +++ b/src/gallium/frontends/rusticl/api/memory.rs @@ -811,18 +811,7 @@ fn create_image_with_properties( return Err(CL_INVALID_PROPERTY); } - Ok(MemBase::new_image( - c, - parent, - desc.image_type, - flags, - format, - desc, - elem_size, - host_ptr, - props, - )? - .into_cl()) + Ok(MemBase::new_image(c, parent, flags, format, desc, elem_size, host_ptr, props)?.into_cl()) } #[cl_entrypoint(clCreateImage)] diff --git a/src/gallium/frontends/rusticl/core/memory.rs b/src/gallium/frontends/rusticl/core/memory.rs index 582e2fada6e..db9c18249f2 100644 --- a/src/gallium/frontends/rusticl/core/memory.rs +++ b/src/gallium/frontends/rusticl/core/memory.rs @@ -470,7 +470,6 @@ impl MemBase { pub fn new_image( context: Arc, parent: Option, - mem_type: cl_mem_object_type, flags: cl_mem_flags, image_format: &cl_image_format, mut image_desc: cl_image_desc, @@ -536,7 +535,7 @@ impl MemBase { base: CLObjectBase::new(RusticlTypes::Image), context: context, parent: parent, - mem_type: mem_type, + mem_type: image_desc.image_type, flags: flags, size: image_desc.pixels() * image_format.pixel_size().unwrap() as usize, host_ptr: host_ptr,