diff --git a/src/dawn_native/vulkan/VulkanBackend.cpp b/src/dawn_native/vulkan/VulkanBackend.cpp index b0060edfe3..e13b965f27 100644 --- a/src/dawn_native/vulkan/VulkanBackend.cpp +++ b/src/dawn_native/vulkan/VulkanBackend.cpp @@ -33,6 +33,12 @@ namespace dawn_native { namespace vulkan { return backendDevice->GetVkInstance(); } + DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, + const char* pName) { + Device* backendDevice = reinterpret_cast(device); + return (*backendDevice->fn.GetInstanceProcAddr)(backendDevice->GetVkInstance(), pName); + } + // Explicitly export this function because it uses the "native" type for surfaces while the // header as seen in this file uses the wrapped type. DAWN_NATIVE_EXPORT DawnSwapChainImplementation diff --git a/src/include/dawn_native/VulkanBackend.h b/src/include/dawn_native/VulkanBackend.h index fc81a58fc1..77a4c4f05c 100644 --- a/src/include/dawn_native/VulkanBackend.h +++ b/src/include/dawn_native/VulkanBackend.h @@ -34,6 +34,8 @@ namespace dawn_native { namespace vulkan { DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device); + DAWN_NATIVE_EXPORT PFN_vkVoidFunction GetInstanceProcAddr(WGPUDevice device, const char* pName); + DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(WGPUDevice device, VkSurfaceKHR surface); DAWN_NATIVE_EXPORT WGPUTextureFormat