Skip to content

Commit 7841fa7

Browse files
committed
[d3d12 wgl] Upgrade to windows 0.59 crates
https://github.com/microsoft/windows-rs/releases/tag/0.61.0 The latest `windows 0.59` and `windows-core 0.59` crates were just released (strangely tagged `0.61`), including some minor code improvements for us. The MSRV has been bumped to `1.74`, but `wgpu` is already on `1.76` anyway.
1 parent a8a9173 commit 7841fa7

File tree

5 files changed

+153
-35
lines changed

5 files changed

+153
-35
lines changed

Cargo.lock

+139-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ bit-set = "0.8"
158158
gpu-allocator = { version = "0.27", default-features = false }
159159
range-alloc = "0.1"
160160
mach-dxcompiler-rs = { version = "0.1.4", default-features = false }
161-
windows-core = { version = "0.58", default-features = false }
161+
windows-core = { version = "0.59", default-features = false }
162162

163163
# Gles dependencies
164164
khronos-egl = "6"
@@ -168,7 +168,7 @@ glutin-winit = { version = "0.4", default-features = false }
168168
glutin_wgl_sys = "0.6"
169169

170170
# DX and GLES dependencies
171-
windows = { version = "0.58", default-features = false }
171+
windows = { version = "0.59", default-features = false }
172172

173173
# wasm32 dependencies
174174
console_error_panic_hook = "0.1.7"
@@ -207,6 +207,9 @@ ndk-sys = "0.5.0"
207207
#js-sys = { path = "../wasm-bindgen/crates/js-sys" }
208208
#wasm-bindgen = { path = "../wasm-bindgen" }
209209

210+
# https://github.com/Traverse-Research/gpu-allocator/pull/258
211+
gpu-allocator = { git = "https://github.com/Traverse-Research/gpu-allocator", rev = "dd4ad67" }
212+
210213
[profile.release]
211214
lto = "thin"
212215
debug = true

wgpu-hal/src/dx12/command.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -768,23 +768,12 @@ impl crate::CommandEncoder for super::CommandEncoder {
768768
if let Some(ds_view) = ds_view {
769769
if flags != Direct3D12::D3D12_CLEAR_FLAGS::default() {
770770
unsafe {
771-
// list.ClearDepthStencilView(
772-
// ds_view,
773-
// flags,
774-
// ds.clear_value.0,
775-
// ds.clear_value.1 as u8,
776-
// None,
777-
// )
778-
// TODO: Replace with the above in the next breaking windows-rs release,
779-
// when https://github.com/microsoft/win32metadata/pull/1971 is in.
780-
(windows_core::Interface::vtable(list).ClearDepthStencilView)(
781-
windows_core::Interface::as_raw(list),
771+
list.ClearDepthStencilView(
782772
ds_view,
783773
flags,
784774
ds.clear_value.0,
785775
ds.clear_value.1 as u8,
786-
0,
787-
std::ptr::null(),
776+
None,
788777
)
789778
}
790779
}

wgpu-hal/src/dx12/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ impl crate::Surface for Surface {
11541154
.ok_or(crate::SurfaceError::Other("IDXGIFactoryMedia not found"))?
11551155
.CreateSwapChainForCompositionSurfaceHandle(
11561156
&device.present_queue,
1157-
handle,
1157+
Some(handle),
11581158
&desc,
11591159
None,
11601160
)

0 commit comments

Comments
 (0)