Fix imageExtent to use correct destination size
authorPiers Daniell <pdaniell@nvidia.com>
Wed, 4 Oct 2017 16:51:12 +0000 (10:51 -0600)
committerAlexander Galazin <alexander.galazin@arm.com>
Fri, 12 Jan 2018 09:26:06 +0000 (10:26 +0100)
This fixes an issue with using imageParms to specify the
imageExtent for the cases where the test has done scaling
between the source and destination surfaces.

VK-GL-CTS issue: 729

Affects:

dEQP-VK.api.copy_and_blit.*

Change-Id: I4053496dfa1fdedd9edb7e108e554cb988559bcf
Components: Vulkan
(cherry picked from commit 16986d105c5af4c4ef6f8f54df5c42ec5c357bb5)

external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp

index db628c1..5bbc0b8 100644 (file)
@@ -662,7 +662,7 @@ void CopiesAndBlittingTestInstance::readImageAspect (vk::VkImage                                    image,
        {
                (deUint32)dst.getWidth(),
                (deUint32)dst.getHeight(),
-               imageParms.imageType == VK_IMAGE_TYPE_2D ? 1u : (deUint32)dst.getDepth()
+               (imageParms.imageType == VK_IMAGE_TYPE_3D) ? (deUint32)dst.getDepth() : 1,
        };
 
        // Create destination buffer