From 37fbae7872d181714a86435ecebd39b31ebf2518 Mon Sep 17 00:00:00 2001 From: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:16:31 +0200 Subject: [PATCH] Revert "Fix macro to allow disabling `dx12` feature. (#3590)" (#3649) This reverts commit 110e62aed255777ac635a504ec81029483065be8. --- CHANGELOG.md | 1 - wgpu/src/backend/direct.rs | 4 ++-- wgpu/src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ff1f78924..202221fb15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -136,7 +136,6 @@ By @cwfitzgerald in [#3610](https://github.com/gfx-rs/wgpu/pull/3610). - Fix DXC validation issues when using a custom `dxil_path`. By @Elabajaba in [#3434](https://github.com/gfx-rs/wgpu/pull/3434) - Use typeless formats for textures that might be viewed as srgb or non-srgb. By @teoxoy in [#3555](https://github.com/gfx-rs/wgpu/pull/3555) -- Fix conditional compilation for `dx12` feature. By @toastmod in [#3590](https://github.com/gfx-rs/wgpu/pull/3590) #### GLES diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index 1b688b14a9..e3f6bbc6c5 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -232,7 +232,7 @@ impl Context { }) } - #[cfg(all(feature = "dx12", windows))] + #[cfg(target_os = "windows")] pub unsafe fn create_surface_from_visual(&self, visual: *mut std::ffi::c_void) -> Surface { let id = unsafe { self.0.instance_create_surface_from_visual(visual, ()) }; Surface { @@ -241,7 +241,7 @@ impl Context { } } - #[cfg(all(feature = "dx12", windows))] + #[cfg(target_os = "windows")] pub unsafe fn create_surface_from_surface_handle( &self, surface_handle: *mut std::ffi::c_void, diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index e9c700053c..a74ee0d58b 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -1544,7 +1544,7 @@ impl Instance { /// # Safety /// /// - visual must be a valid IDCompositionVisual to create a surface upon. - #[cfg(all(feature = "dx12", windows))] + #[cfg(target_os = "windows")] pub unsafe fn create_surface_from_visual(&self, visual: *mut std::ffi::c_void) -> Surface { let surface = unsafe { self.context @@ -1566,7 +1566,7 @@ impl Instance { /// # Safety /// /// - surface_handle must be a valid SurfaceHandle to create a surface upon. - #[cfg(all(feature = "dx12", windows))] + #[cfg(target_os = "windows")] pub unsafe fn create_surface_from_surface_handle( &self, surface_handle: *mut std::ffi::c_void,