From 09ff4043c7f2778423f6542f9e66a5596abb9ecd Mon Sep 17 00:00:00 2001 From: Petros Bantolas Date: Wed, 20 Sep 2017 11:58:15 +0100 Subject: [PATCH] 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 --- .../vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp index ca1af21..d1435e9 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp @@ -656,12 +656,7 @@ void CopiesAndBlittingTestInstance::readImageAspect (vk::VkImage image, const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex(); const VkDeviceSize pixelDataSize = calculateSize(dst); - const VkExtent3D imageExtent = - { - (deUint32)dst.getWidth(), - (deUint32)dst.getHeight(), - (deUint32)dst.getDepth(), - }; + const VkExtent3D imageExtent = getExtent3D(imageParms); // Create destination buffer { -- 2.7.4