diff options
author | Dave Airlie <[email protected]> | 2017-03-07 00:30:01 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-03-07 04:02:00 +0000 |
commit | b26249781e5bc8fc00e8b94d2a1c0d8e48eebe9e (patch) | |
tree | 0565d66aed23febc8f368cd659e6f9ced9fa0bb1 | |
parent | c5947e9787c700239da329fb4c373a5c6b4f35da (diff) |
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_copy.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |