From 498176a8a0caf2446c52214f3eadbfec00e92113 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Wed, 26 Feb 2020 16:30:29 +0100 Subject: [PATCH] Expose `Global::enumerate_adapters`. --- wgpu-native/src/device.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index 9fbc5c564..f39819f9f 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -143,6 +143,10 @@ pub extern "C" fn wgpu_create_surface_from_windows_hwnd( )) } +pub fn wgpu_enumerate_adapters(mask: core::instance::BackendBit) -> Vec { + GLOBAL.enumerate_adapters(core::instance::AdapterInputs::Mask(mask, || PhantomData)) +} + /// # Safety /// /// This function is unsafe as it calls an unsafe extern callback.