[Mesa-dev] [PATCH] radv: handle z offset for 3d image <-> buffer copies.
Dave Airlie
airlied at gmail.com
Tue Mar 7 00:30:49 UTC 2017
From: Dave Airlie <airlied at redhat.com>
This fixes:
dEQP-VK.pipeline.render_to_image.3d.huge.depth.r8g8b8a8_unorm
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_meta_copy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c
index 5473764..54dadde 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;
--
2.7.4
More information about the mesa-dev
mailing list