diff --git a/.pick_status.json b/.pick_status.json index 2312fcd6879..9888d9e8416 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6114,7 +6114,7 @@ "description": "rusticl/mem: fix Image::read for 1Darray images", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/frontends/rusticl/core/memory.rs b/src/gallium/frontends/rusticl/core/memory.rs index 472a52766f6..b2d5272d63d 100644 --- a/src/gallium/frontends/rusticl/core/memory.rs +++ b/src/gallium/frontends/rusticl/core/memory.rs @@ -1948,7 +1948,7 @@ impl Image { let pixel_size = self.image_format.pixel_size().unwrap(); let tx; - let src_row_pitch; + let mut src_row_pitch; let src_slice_pitch; if let Some(Mem::Buffer(buffer)) = self.parent() { src_row_pitch = self.image_desc.image_row_pitch; @@ -1966,6 +1966,10 @@ impl Image { tx = self.tx_image(ctx, &bx, RWFlags::RD)?; src_row_pitch = tx.row_pitch() as usize; src_slice_pitch = tx.slice_pitch(); + + if self.mem_type == CL_MEM_OBJECT_IMAGE1D_ARRAY { + src_row_pitch = src_slice_pitch; + } }; perf_warning!("clEnqueueReadImage and clEnqueueMapImage stall the GPU");