radv: Fix copying from 3D images starting at non-zero depth.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 4 Mar 2018 13:47:20 +0000 (14:47 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 5 Mar 2018 00:04:54 +0000 (01:04 +0100)
Fixes: f4e499ec79 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta_copy.c

index 7f7ef22efc815f7b01f43d80ec657386c1b355f9..2a3faa64f1c2f5312470ab430122d5379e19e4c6 100644 (file)
@@ -417,6 +417,9 @@ meta_copy_image(struct radv_cmd_buffer *cmd_buffer,
                        .height = img_extent_el.height,
                };
 
+               if (src_image->type == VK_IMAGE_TYPE_3D)
+                       b_src.layer = src_offset_el.z;
+
                if (dest_image->type == VK_IMAGE_TYPE_3D)
                        b_dst.layer = dst_offset_el.z;