From 70c10a679b62250275ebeccedba1e8873ee5e88e Mon Sep 17 00:00:00 2001 From: Jesse Hall Date: Fri, 11 Aug 2017 10:18:32 -0700 Subject: [PATCH] Provide dedicated image when importing memory if required The test was using dedicated images when creating memory to be exported, but not when importing that same memory. Affects: dEQP-VK.api.external.memory.*.dedicated.image.bind_export_import_bind dEQP-VK.api.external.memory.*.dedicated.image.export_bind_import_bind dEQP-VK.api.external.memory.*.dedicated.image.export_import_bind_bind Components: Vulkan VK-GL-CTS issue: 635 Change-Id: I5a063f10677aca8f373e29e39a34af293bf0a220 --- .../modules/vulkan/api/vktApiExternalMemoryTests.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp index 13dffec..acf99a1 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp @@ -3463,8 +3463,10 @@ tcu::TestStatus testImageBindExportImportBind (Context& context, getMemoryNative(vkd, *device, *memoryA, config.externalType, handle); { - const vk::Unique memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); const vk::Unique imageB (createExternalImage(vkd, *device, queueFamilyIndex, config.externalType, format, width, height, tiling, 0u, usage)); + const vk::Unique memoryB (config.dedicated + ? importDedicatedMemory(vkd, *device, *imageB, requirements, config.externalType, exportedMemoryTypeIndex, handle) + : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); VK_CHECK(vkd.bindImageMemory(*device, *imageB, *memoryB, 0u)); } @@ -3500,8 +3502,10 @@ tcu::TestStatus testImageExportBindImportBind (Context& context, VK_CHECK(vkd.bindImageMemory(*device, *imageA, *memoryA, 0u)); { - const vk::Unique memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); const vk::Unique imageB (createExternalImage(vkd, *device, queueFamilyIndex, config.externalType, format, width, height, tiling, 0u, usage)); + const vk::Unique memoryB (config.dedicated + ? importDedicatedMemory(vkd, *device, *imageB, requirements, config.externalType, exportedMemoryTypeIndex, handle) + : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); VK_CHECK(vkd.bindImageMemory(*device, *imageB, *memoryB, 0u)); } @@ -3537,8 +3541,10 @@ tcu::TestStatus testImageExportImportBindBind (Context& context, getMemoryNative(vkd, *device, *memoryA, config.externalType, handle); { - const vk::Unique memoryB (importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); const vk::Unique imageB (createExternalImage(vkd, *device, queueFamilyIndex, config.externalType, format, width, height, tiling, 0u, usage)); + const vk::Unique memoryB (config.dedicated + ? importDedicatedMemory(vkd, *device, *imageB, requirements, config.externalType, exportedMemoryTypeIndex, handle) + : importMemory(vkd, *device, requirements, config.externalType, exportedMemoryTypeIndex, handle)); VK_CHECK(vkd.bindImageMemory(*device, *imageA, *memoryA, 0u)); VK_CHECK(vkd.bindImageMemory(*device, *imageB, *memoryB, 0u)); -- 2.7.4