mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
Fix missing feature checks for dx11 and dx12 (#4287)
This commit is contained in:
parent
85cab49c53
commit
92d237fd93
@ -615,9 +615,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
presentation: None,
|
||||
#[cfg(all(feature = "vulkan", not(target_arch = "wasm32")))]
|
||||
vulkan: None,
|
||||
#[cfg(all(feature = "dx12", windows))]
|
||||
dx12: self.instance.dx12.as_ref().map(|inst| HalSurface {
|
||||
raw: unsafe { inst.create_surface_from_visual(visual as _) },
|
||||
}),
|
||||
#[cfg(all(feature = "dx11", windows))]
|
||||
dx11: None,
|
||||
#[cfg(feature = "gles")]
|
||||
gl: None,
|
||||
@ -643,9 +645,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
presentation: None,
|
||||
#[cfg(all(feature = "vulkan", not(target_arch = "wasm32")))]
|
||||
vulkan: None,
|
||||
#[cfg(all(feature = "dx12", windows))]
|
||||
dx12: self.instance.dx12.as_ref().map(|inst| HalSurface {
|
||||
raw: unsafe { inst.create_surface_from_surface_handle(surface_handle) },
|
||||
}),
|
||||
#[cfg(all(feature = "dx11", windows))]
|
||||
dx11: None,
|
||||
#[cfg(feature = "gles")]
|
||||
gl: None,
|
||||
@ -671,9 +675,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
presentation: None,
|
||||
#[cfg(all(feature = "vulkan", not(target_arch = "wasm32")))]
|
||||
vulkan: None,
|
||||
#[cfg(all(feature = "dx12", windows))]
|
||||
dx12: self.instance.dx12.as_ref().map(|inst| HalSurface {
|
||||
raw: unsafe { inst.create_surface_from_swap_chain_panel(swap_chain_panel as _) },
|
||||
}),
|
||||
#[cfg(all(feature = "dx11", windows))]
|
||||
dx11: None,
|
||||
#[cfg(feature = "gles")]
|
||||
gl: None,
|
||||
|
Loading…
Reference in New Issue
Block a user