From: Dave Airlie Date: Tue, 7 Mar 2017 00:30:01 +0000 (+0000) Subject: radv: handle z offset for 3d image <-> buffer copies. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b26249781e5bc8fc00e8b94d2a1c0d8e48eebe9e;p=mesa.git radv: handle z offset for 3d image <-> buffer copies. This fixes: dEQP-VK.pipeline.render_to_image.3d.huge.depth.r8g8b8a8_unorm Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c index 5473764dd19..54dadde788d 100644 --- a/src/amd/vulkan/radv_meta_copy.c +++ b/src/amd/vulkan/radv_meta_copy.c @@ -169,6 +169,8 @@ meta_copy_buffer_to_image(struct radv_cmd_buffer *cmd_buffer, .pitch = buf_extent_el.width, }; + if (image->type == VK_IMAGE_TYPE_3D) + img_bsurf.layer = img_offset_el.z; /* Loop through each 3D or array slice */ unsigned num_slices_3d = img_extent_el.depth; unsigned num_slices_array = pRegions[r].imageSubresource.layerCount; @@ -276,6 +278,8 @@ meta_copy_image_to_buffer(struct radv_cmd_buffer *cmd_buffer, .pitch = buf_extent_el.width, }; + if (image->type == VK_IMAGE_TYPE_3D) + img_info.layer = img_offset_el.z; /* Loop through each 3D or array slice */ unsigned num_slices_3d = img_extent_el.depth; unsigned num_slices_array = pRegions[r].imageSubresource.layerCount;