From 05b37f39681f0b39bdb0d4d4d0bcd373ec1c275c Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 6 Dec 2024 14:28:46 +0100 Subject: [PATCH] rusticl/mem: remove mem_type argument from new_image Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/rusticl/api/memory.rs | 13 +------------ src/gallium/frontends/rusticl/core/memory.rs | 3 +-- 2 files changed, 2 insertions(+), 14 deletions(-) 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,