Use correct image extent for image to buffer copies
authorPetros Bantolas <petros.bantolas@imgtec.com>
Wed, 20 Sep 2017 10:58:15 +0000 (11:58 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 3 Oct 2017 09:16:45 +0000 (05:16 -0400)
commit09ff4043c7f2778423f6542f9e66a5596abb9ecd
tree589970fde19f3ce29b4e0d3342cc1984a0f3abed
parent29187373151e51dc93db833313faeb81313a0d0c
Use correct image extent for image to buffer copies

The final stage of those tests (reading back to a host-mapped buffer)
would use an incorrect depth for the source image extent, when that is a
2D texture array. Because the test didn't factor in the image type, it
would set both the image extent and the subresource layerCount to the
number of layers being copied.

Using `getExtent3D` we get the appropriate behaviour.

Affects:
- dEQP-VK.api.copy_and_blit.*.3d_images.3d_to_2d*
- dEQP-VK.api.copy_and_blit.*.resolve_image.whole_array_image.*
- dEQP-VK.api.copy_and_blit.*.resolve_image.diff_image_size.
  dst_256_256_11*

Components: Vulkan

VK-GL-CTS issue: 729

Change-Id: I26109772c42286a741a38aa9c9cd8a42a5873adc
external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp