Add getHostPtr() to vk::Allocation
authorPyry Haulos <phaulos@google.com>
Tue, 1 Sep 2015 21:52:56 +0000 (14:52 -0700)
committerPyry Haulos <phaulos@google.com>
Wed, 2 Sep 2015 17:16:59 +0000 (10:16 -0700)
commit7965292de01eac3af42c1de1e61b9442739eb188
tree54a846b86ddd337446b8cbef9397a9e6f15dab43
parenta4520485ceef517e547c8dd49a7f0452befdc31e
Add getHostPtr() to vk::Allocation

Since there can exist only one memory mapping for any VkDeviceMemory
and vkUmapMemory() unmaps all pages, current Allocator interface doesn't
extend to sub-allocators properly. To make sub-allocation work,
Allocator must be responsible of managing memory mappings.

The new behavior is to always map any host-visible allocations and
provide host pointer as part of Allocation.

Change-Id: I83a28b1387b282a373604cb112757ffdd75b20b3
external/vulkancts/framework/vulkan/vkMemUtil.cpp
external/vulkancts/framework/vulkan/vkMemUtil.hpp
external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp