pvr: Fix image to buffer copies
authorJames Glanville <james.glanville@imgtec.com>
Tue, 25 Apr 2023 20:20:02 +0000 (21:20 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 2 May 2023 09:04:44 +0000 (09:04 +0000)
The code to increment the destination buffer address was wrong. Instead of
incrementing an address on every iteration, the buffer slice size was added
as a static offset to all blits.

Seen in dEQP-VK.draw.renderpass.depth_clamp.d16_unorm, though issues remain.

Signed-off-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22747>

src/imagination/vulkan/pvr_blit.c

index e40c73f..f0cb783 100644 (file)
@@ -923,7 +923,7 @@ pvr_copy_image_to_buffer_region(struct pvr_device *device,
             return result;
          }
 
-         transfer_cmd->dst.dev_addr.addr += buffer_slice_size;
+         dst_surface.dev_addr.addr += buffer_slice_size;
 
          if (src_surface.mem_layout == PVR_MEMLAYOUT_3DTWIDDLED)
             src_surface.z_position += 1.0f;