Expose Global::enumerate_adapters.

This commit is contained in:
daxpedda 2020-02-26 16:30:29 +01:00
parent 153c7f3f08
commit 498176a8a0
No known key found for this signature in database
GPG Key ID: 43D62A3EA388E46F

View File

@ -143,6 +143,10 @@ pub extern "C" fn wgpu_create_surface_from_windows_hwnd(
))
}
pub fn wgpu_enumerate_adapters(mask: core::instance::BackendBit) -> Vec<id::AdapterId> {
GLOBAL.enumerate_adapters(core::instance::AdapterInputs::Mask(mask, || PhantomData))
}
/// # Safety
///
/// This function is unsafe as it calls an unsafe extern callback.