mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Merge #505
505: Expose `Global::enumerate_adapters`. r=kvark a=daxpedda Expose `enumerate_adapters` to use it in `wgpu-rs`. Issue was that directly accessing `wgpu-core` wasn't possible because an instantiation of `Global` was needed. Co-authored-by: daxpedda <daxpedda@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user