From: Arkadiusz Sarwa Date: Mon, 25 May 2020 22:31:41 +0000 (+0200) Subject: Fix BindImageMemoryInfo in *render.device_group2 X-Git-Tag: upstream/1.3.5~1353^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e995ca7b5d05b31b1dee74140c92410f9af7cf0;p=platform%2Fupstream%2FVK-GL-CTS.git Fix BindImageMemoryInfo in *render.device_group2 If image was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHR::swapchain, then the pNext chain must include a VkBindImageMemorySwapchainInfoKHR structure containing the same swapchain handle. Affects: dEQP-VK.wsi.win32.swapchain.render.device_group2 Components: Vulkan VK-GL-CTS Issue: 2385 Change-Id: I6fa4e36e273861623b8e00143022f19fd79fc0aa --- diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp index 93bd65c..f985db9 100644 --- a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp +++ b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp @@ -1889,22 +1889,30 @@ tcu::TestStatus deviceGroupRenderTest2 (Context& context, Type wsiType) vector rawImages (numImages); vector imagesSfr (numImages); vector rawImagesSfr (numImages); + vector bindImageMemorySwapchainInfo (numImages); // Create non-SFR image aliases for image layout transition { - vector bindImageMemorySwapchainInfo (numImages); - vector bindImageMemoryDeviceGroupInfo (numImages); - vector bindImageMemoryInfos (numImages); + vector bindImageMemoryInfos (numImages); - for (deUint32 idx = 0; idx < numImages; ++idx) - { - // Create image - images[idx] = ImageSp(new UniqueImage(createImage(vkd, *groupDevice, &imageCreateInfo))); + for (deUint32 idx = 0; idx < numImages; ++idx) + { + // Create image + images[idx] = ImageSp(new UniqueImage(createImage(vkd, *groupDevice, &imageCreateInfo))); + + VkBindImageMemorySwapchainInfoKHR bimsInfo = + { + VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, + DE_NULL, + *swapchain, + idx + }; + bindImageMemorySwapchainInfo[idx] = bimsInfo; VkBindImageMemoryInfo bimInfo = { VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, - DE_NULL, + &bindImageMemorySwapchainInfo[idx], **images[idx], DE_NULL, // If the pNext chain includes an instance of VkBindImageMemorySwapchainInfoKHR, memory must be VK_NULL_HANDLE 0u // If swapchain is not NULL, the swapchain and imageIndex are used to determine the memory that the image is bound to, instead of memory and memoryOffset. @@ -1918,7 +1926,6 @@ tcu::TestStatus deviceGroupRenderTest2 (Context& context, Type wsiType) // Create the SFR images { - vector bindImageMemorySwapchainInfo (numImages); vector bindImageMemoryDeviceGroupInfo (numImages); vector bindImageMemoryInfos (numImages); for (deUint32 idx = 0; idx < numImages; ++idx) @@ -1926,15 +1933,6 @@ tcu::TestStatus deviceGroupRenderTest2 (Context& context, Type wsiType) // Create image imagesSfr[idx] = ImageSp(new UniqueImage(createImage(vkd, *groupDevice, &imageCreateInfo))); - VkBindImageMemorySwapchainInfoKHR bimsInfo = - { - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, - DE_NULL, - *swapchain, - idx - }; - bindImageMemorySwapchainInfo[idx] = bimsInfo; - // Split into 2 vertical halves // NOTE: the same split has to be done also in WsiTriangleRenderer::recordDeviceGroupFrame const deUint32 halfWidth = desiredSize.x() / 2;