From: Petros Bantolas Date: Wed, 20 Sep 2017 10:58:15 +0000 (+0100) Subject: Use correct image extent for image to buffer copies X-Git-Tag: upstream/1.3.5~2565^2~6^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=09ff4043c7f2778423f6542f9e66a5596abb9ecd;p=platform%2Fupstream%2FVK-GL-CTS.git 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 --- diff --git a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp index ca1af2148..d1435e975 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 {