Fix initial YCbCr image layout
authorGraeme Leese <gleese@broadcom.com>
Fri, 14 Dec 2018 16:21:40 +0000 (16:21 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 20 Dec 2018 08:06:24 +0000 (03:06 -0500)
When initialising linear tiling images they should be created with
LAYOUT_PREINITIALIZED rather then UNDEFINED.

Components: Vulkan
Affects: dEQP-VK.ycbcr.copy.*

Change-Id: Ie9136ce45cfa1e9f18e83c4655cc762d2211274e

external/vulkancts/modules/vulkan/ycbcr/vktYCbCrCopyTests.cpp

index ef44958fca9d25dfdf44676fe464c0121ef28680..ab85f53b40c8c4251169fa98d884905e5ce6d0b2 100644 (file)
@@ -171,7 +171,7 @@ vk::Move<vk::VkImage> createImage (const vk::DeviceInterface&       vkd,
                vk::VK_SHARING_MODE_EXCLUSIVE,
                0u,
                (const deUint32*)DE_NULL,
-               vk::VK_IMAGE_LAYOUT_UNDEFINED,
+               tiling == vk::VK_IMAGE_TILING_LINEAR ? vk::VK_IMAGE_LAYOUT_PREINITIALIZED : vk::VK_IMAGE_LAYOUT_UNDEFINED,
        };
 
        return vk::createImage(vkd, device, &createInfo);