Skip to content

Commit 58c9e29

Browse files
committed
[d3d12 wgl] Upgrade to windows 0.62 crates
https://github.com/microsoft/windows-rs/releases/tag/69
1 parent ddfcb13 commit 58c9e29

File tree

4 files changed

+46
-48
lines changed

4 files changed

+46
-48
lines changed

.deny.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ private = { ignore = true }
5656
[sources]
5757
allow-git = [
5858
# Waiting on releases; used in examples/tests only
59+
60+
# Pending a release for https://github.com/Xudong-Huang/generator-rs/pull/75
61+
"https://github.com/Xudong-Huang/generator-rs",
5962
]
6063
unknown-registry = "deny"
6164
unknown-git = "deny"

Cargo.lock

Lines changed: 29 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ gpu-allocator = { version = "0.28", default-features = false, features = [
217217
] }
218218
range-alloc = "0.1"
219219
mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable
220-
windows-core = { version = "0.61", default-features = false }
220+
windows-core = { version = "0.62", default-features = false }
221221

222222
# Gles dependencies
223223
khronos-egl = "6"
@@ -227,7 +227,7 @@ glutin-winit = { version = "0.4", default-features = false }
227227
glutin_wgl_sys = "0.6"
228228

229229
# DX12 and GLES dependencies
230-
windows = { version = "0.61", default-features = false }
230+
windows = { version = "0.62", default-features = false }
231231

232232
# wasm32 dependencies
233233
console_error_panic_hook = "0.1.5"
@@ -259,6 +259,9 @@ ndk-sys = "0.6"
259259
[patch.crates-io]
260260
wgpu = { path = "./wgpu" }
261261

262+
# https://github.com/Xudong-Huang/generator-rs/pull/75
263+
generator = { git = "https://github.com/Xudong-Huang/generator-rs", rev = "70b89fdabcc0e82fe84ca17f65cc52ff25e8e6de" }
264+
262265
[profile.release]
263266
lto = "thin"
264267
debug = true

wgpu-hal/src/gles/wgl.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
226226
if index == 0 {
227227
return Err(crate::InstanceError::with_source(
228228
String::from("unable to choose pixel format"),
229-
Error::from_win32(),
229+
Error::from_thread(),
230230
));
231231
}
232232

@@ -244,7 +244,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
244244
if index == 0 {
245245
return Err(crate::InstanceError::with_source(
246246
String::from("unable to get pixel format index"),
247-
Error::from_win32(),
247+
Error::from_thread(),
248248
));
249249
}
250250
let mut format = Default::default();
@@ -254,7 +254,7 @@ unsafe fn setup_pixel_format(dc: Gdi::HDC) -> Result<(), crate::InstanceError> {
254254
{
255255
return Err(crate::InstanceError::with_source(
256256
String::from("unable to read pixel format"),
257-
Error::from_win32(),
257+
Error::from_thread(),
258258
));
259259
}
260260

@@ -311,7 +311,7 @@ fn create_global_window_class() -> Result<CString, crate::InstanceError> {
311311
if atom == 0 {
312312
return Err(crate::InstanceError::with_source(
313313
String::from("unable to register window class"),
314-
Error::from_win32(),
314+
Error::from_thread(),
315315
));
316316
}
317317

@@ -398,7 +398,7 @@ fn create_instance_device() -> Result<InstanceDevice, crate::InstanceError> {
398398
if dc.is_invalid() {
399399
return Err(crate::InstanceError::with_source(
400400
String::from("unable to create memory device"),
401-
Error::from_win32(),
401+
Error::from_thread(),
402402
));
403403
}
404404
let dc = DeviceContextHandle {
@@ -484,7 +484,7 @@ impl crate::Instance for Instance {
484484
if context.is_null() {
485485
return Err(crate::InstanceError::with_source(
486486
String::from("unable to create OpenGL context"),
487-
Error::from_win32(),
487+
Error::from_thread(),
488488
));
489489
}
490490
WglContext {
@@ -676,7 +676,7 @@ impl Surface {
676676
if dc.is_invalid() {
677677
log::error!(
678678
"unable to get the device context from window: {}",
679-
Error::from_win32()
679+
Error::from_thread()
680680
);
681681
return Err(crate::SurfaceError::Other(
682682
"unable to get the device context from window",
@@ -754,7 +754,7 @@ impl crate::Surface for Surface {
754754
if dc.is_invalid() {
755755
log::error!(
756756
"unable to get the device context from window: {}",
757-
Error::from_win32()
757+
Error::from_thread()
758758
);
759759
return Err(crate::SurfaceError::Other(
760760
"unable to get the device context from window",
@@ -828,7 +828,7 @@ impl crate::Surface for Surface {
828828
};
829829

830830
if unsafe { extra.SwapIntervalEXT(if vsync { 1 } else { 0 }) } == Foundation::FALSE.0 {
831-
log::error!("unable to set swap interval: {}", Error::from_win32());
831+
log::error!("unable to set swap interval: {}", Error::from_thread());
832832
return Err(crate::SurfaceError::Other("unable to set swap interval"));
833833
}
834834

0 commit comments

Comments
 (0)