[vulkan] Fix missing macros/definitions on guest side
bug: 122080810
- Takes codegen for AHardwareBuffer entry points
- Need vk.xml change to get Fuchsia external memory entry points
- Adjust Fuchsia external memory definitions in ResourceTracker.cpp
to fit with what will be generated
Change-Id: Ib59951770158745f8d9a52dc1c2e6f9a30dbdac8
diff --git a/system/vulkan/func_table.cpp b/system/vulkan/func_table.cpp
index 3ce65a1..970b642 100644
--- a/system/vulkan/func_table.cpp
+++ b/system/vulkan/func_table.cpp
@@ -36,7 +36,6 @@
// required extensions, but the approach will be to
// implement them completely on the guest side.
#undef VK_KHR_android_surface
-#undef VK_ANDROID_external_memory_android_hardware_buffer
namespace goldfish_vk {
@@ -3503,7 +3502,8 @@
AEMU_SCOPED_TRACE("vkGetAndroidHardwareBufferPropertiesANDROID");
auto vkEnc = HostConnection::get()->vkEncoder();
VkResult vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = (VkResult)0;
- vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = vkEnc->vkGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties);
+ auto resources = ResourceTracker::get();
+ vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = resources->on_vkGetAndroidHardwareBufferPropertiesANDROID(vkEnc, VK_SUCCESS, device, buffer, pProperties);
return vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return;
}
static VkResult entry_vkGetMemoryAndroidHardwareBufferANDROID(
@@ -3514,7 +3514,8 @@
AEMU_SCOPED_TRACE("vkGetMemoryAndroidHardwareBufferANDROID");
auto vkEnc = HostConnection::get()->vkEncoder();
VkResult vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = (VkResult)0;
- vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = vkEnc->vkGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer);
+ auto resources = ResourceTracker::get();
+ vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = resources->on_vkGetMemoryAndroidHardwareBufferANDROID(vkEnc, VK_SUCCESS, device, pInfo, pBuffer);
return vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return;
}
#endif