[vulkan] host coherent: take codegen (guest)
bug: 111137294
Fixes: 121377497
This hooks everything up, enabling host coherent mappings when
GLDirectMem feature is enabled.
Change-Id: Idfc7471dc767b5872def14aff6e8437c7b54fdf5
diff --git a/system/vulkan/func_table.cpp b/system/vulkan/func_table.cpp
index ea87560..724190e 100644
--- a/system/vulkan/func_table.cpp
+++ b/system/vulkan/func_table.cpp
@@ -3320,6 +3320,18 @@
vkEnc->vkGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData);
}
#endif
+#ifdef VK_GOOGLE_address_space
+static VkResult entry_vkMapMemoryIntoAddressSpaceGOOGLE(
+ VkDevice device,
+ VkDeviceMemory memory,
+ uint64_t* pAddress)
+{
+ auto vkEnc = HostConnection::get()->vkEncoder();
+ VkResult vkMapMemoryIntoAddressSpaceGOOGLE_VkResult_return = (VkResult)0;
+ vkMapMemoryIntoAddressSpaceGOOGLE_VkResult_return = vkEnc->vkMapMemoryIntoAddressSpaceGOOGLE(device, memory, pAddress);
+ return vkMapMemoryIntoAddressSpaceGOOGLE_VkResult_return;
+}
+#endif
void* goldfish_vulkan_get_proc_address(const char* name){
#ifdef VK_VERSION_1_0
if (!strcmp(name, "vkCreateInstance"))
@@ -4715,6 +4727,12 @@
return (void*)entry_vkGetQueueCheckpointDataNV;
}
#endif
+#ifdef VK_GOOGLE_address_space
+ if (!strcmp(name, "vkMapMemoryIntoAddressSpaceGOOGLE"))
+ {
+ return (void*)entry_vkMapMemoryIntoAddressSpaceGOOGLE;
+ }
+#endif
return nullptr;
}