diff --git a/content_handler/vulkan_surface.cc b/content_handler/vulkan_surface.cc index 542de3d9c0be2..9e01b0d13d85d 100644 --- a/content_handler/vulkan_surface.cc +++ b/content_handler/vulkan_surface.cc @@ -225,11 +225,16 @@ bool VulkanSurface::AllocateDeviceMemory(sk_sp context, { // Acquire the VMO for the device memory. uint32_t vmo_handle = 0; - if (VK_CALL_LOG_ERROR(vk_.ExportDeviceMemoryMAGMA( - backend_context_->fDevice, vk_memory_, &vmo_handle)) != + + VkMemoryGetFuchsiaHandleInfoKHR get_handle_info = { + VK_STRUCTURE_TYPE_MEMORY_GET_FUCHSIA_HANDLE_INFO_KHR, nullptr, + vk_memory_, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FUCHSIA_VMO_BIT_KHR}; + if (VK_CALL_LOG_ERROR(vk_.GetMemoryFuchsiaHandleKHR( + backend_context_->fDevice, &get_handle_info, &vmo_handle)) != VK_SUCCESS) { return false; } + exported_vmo.reset(static_cast(vmo_handle)); } diff --git a/vulkan/vulkan_proc_table.cc b/vulkan/vulkan_proc_table.cc index 47ee1c910a3ca..f6be9a83e02ad 100644 --- a/vulkan/vulkan_proc_table.cc +++ b/vulkan/vulkan_proc_table.cc @@ -92,9 +92,7 @@ bool VulkanProcTable::SetupInstanceProcAddresses( #if OS_FUCHSIA [this, &handle]() -> bool { ACQUIRE_PROC(CreateMagmaSurfaceKHR, handle); - ACQUIRE_PROC(ExportDeviceMemoryMAGMA, handle); ACQUIRE_PROC(GetPhysicalDeviceMagmaPresentationSupportKHR, handle); - ACQUIRE_PROC(ImportSemaphoreFuchsiaHandleKHR, handle); return true; }(); #endif // OS_FUCHSIA @@ -146,7 +144,7 @@ bool VulkanProcTable::SetupDeviceProcAddresses( ACQUIRE_PROC(ResetFences, handle); ACQUIRE_PROC(WaitForFences, handle); #if OS_FUCHSIA - ACQUIRE_PROC(ExportDeviceMemoryMAGMA, handle); + ACQUIRE_PROC(GetMemoryFuchsiaHandleKHR, handle); ACQUIRE_PROC(ImportSemaphoreFuchsiaHandleKHR, handle); #endif // OS_FUCHSIA device_ = {handle, nullptr}; diff --git a/vulkan/vulkan_proc_table.h b/vulkan/vulkan_proc_table.h index 4b127a85e3ec7..e00b5b7e8cc79 100644 --- a/vulkan/vulkan_proc_table.h +++ b/vulkan/vulkan_proc_table.h @@ -116,7 +116,7 @@ class VulkanProcTable : public fxl::RefCountedThreadSafe { #endif // OS_ANDROID #if OS_FUCHSIA DEFINE_PROC(CreateMagmaSurfaceKHR); - DEFINE_PROC(ExportDeviceMemoryMAGMA); + DEFINE_PROC(GetMemoryFuchsiaHandleKHR); DEFINE_PROC(GetPhysicalDeviceMagmaPresentationSupportKHR); DEFINE_PROC(ImportSemaphoreFuchsiaHandleKHR); #endif // OS_FUCHSIA