mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fix macro to allow disabling dx12 feature. (#3590)
* Fix macro for DX12 conditional compilation * Update CHANGELOG.md * Apply suggestions from code review --------- Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
This commit is contained in:
@@ -118,6 +118,7 @@ By @teoxoy in [#3534](https://github.com/gfx-rs/wgpu/pull/3534)
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ impl Context {
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
#[cfg(all(feature = "dx12", 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(target_os = "windows")]
|
||||
#[cfg(all(feature = "dx12", windows))]
|
||||
pub unsafe fn create_surface_from_surface_handle(
|
||||
&self,
|
||||
surface_handle: *mut std::ffi::c_void,
|
||||
|
||||
@@ -1544,7 +1544,7 @@ impl Instance {
|
||||
/// # Safety
|
||||
///
|
||||
/// - visual must be a valid IDCompositionVisual to create a surface upon.
|
||||
#[cfg(target_os = "windows")]
|
||||
#[cfg(all(feature = "dx12", 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(target_os = "windows")]
|
||||
#[cfg(all(feature = "dx12", windows))]
|
||||
pub unsafe fn create_surface_from_surface_handle(
|
||||
&self,
|
||||
surface_handle: *mut std::ffi::c_void,
|
||||
|
||||
Reference in New Issue
Block a user