Fix incorrect layout transition in modifier tests
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 16 Mar 2022 20:40:46 +0000 (13:40 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 7 Apr 2022 17:23:49 +0000 (17:23 +0000)
The queue family ownership acquire operation specifies a layout
transition from the pre-initialized layout. The image isn't in the
pre-initialized layout however, it's in the transfer dst optimal layout.
Align with the Vulkan spec, which says:

When performing a layout transition on an image subresource, the
old layout value must either equal the current layout of the
image subresource (at the time the transition executes), or else
be VK_IMAGE_LAYOUT_UNDEFINED (implying that the contents of the
image subresource need not be preserved).

Components: Vulkan

VK-GL-CTS issue: 3575

Affects: dEQP-VK.drm_format_modifiers.export_import.*
Change-Id: I76dbb54c699ed7d34e964de17f71ef01bc9e98a5

external/vulkancts/modules/vulkan/modifiers/vktModifiersTests.cpp

index aef72f6..9a97ccd 100644 (file)
@@ -620,7 +620,7 @@ bool exportImportMemoryExplicitModifiersCase (Context& context, const VkFormat f
                DE_NULL,                                                                        // const void*                          pNext;
                VK_ACCESS_TRANSFER_WRITE_BIT,                           // VkAccessFlags                        srcAccessMask;
                VK_ACCESS_TRANSFER_WRITE_BIT,                           // VkAccessFlags                        dstAccessMask;
-               VK_IMAGE_LAYOUT_PREINITIALIZED,         // VkImageLayout                        oldLayout;
+               VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,                   // VkImageLayout                        oldLayout;
                VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,                   // VkImageLayout                        newLayout;
                VK_QUEUE_FAMILY_FOREIGN_EXT,                                    // deUint32                                     srcQueueFamilyIndex;
                context.getUniversalQueueFamilyIndex(),                 // deUint32                                     dstQueueFamilyIndex;