Select correct memory heap index for memory import
authorTony Zlatinski <tzlatinski@nvidia.com>
Wed, 19 Jul 2017 21:21:53 +0000 (16:21 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Mon, 24 Jul 2017 20:15:44 +0000 (16:15 -0400)
commitc34a126a1c1839e832ac6871a8c20c42609454a2
tree84c2118aaa44f2d25bf80287a2f53236411a0865
parent0e3c7aa3248603fcbbaf791c4ceb494eb14eeeb5
Select correct memory heap index for memory import

When importing memory, the application (CTS) should follow
the spec rules about memory imports. I.e. The application must use the
same memory heap index for the import that has been used for the
exported memory. In addition, the application can't
import a buffer or image to a heap that does not support CPU mapping and
expect the memory to be CPU mappable/accessible.

This change modifies the export memory routines, now, returning the
index of the heap memory used for the export. Then the import routines are
modified to use those indexes for the memory import operations.

Components: Vulkan

Affects:
    dEQP-VK.api.external.memory.*
    dEQP-VK.synchronization.cross_instance.*

VK-GL-CTS issue: 585

Change-Id: I48ab85b7fd2b67655163f055fb03e8f2a3a42fd6
external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp
external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
external/vulkancts/modules/vulkan/vktExternalMemoryUtil.cpp
external/vulkancts/modules/vulkan/vktExternalMemoryUtil.hpp