Skip to content

Commit 1736a0f

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

File tree

4 files changed

+44
-46
lines changed

4 files changed

+44
-46
lines changed

.deny.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ private = { ignore = true }
5353
[sources]
5454
allow-git = [
5555
# Waiting on releases; used in examples/tests only
56+
57+
# Pending a release for https://github.com/Xudong-Huang/generator-rs/pull/75
58+
"https://github.com/Xudong-Huang/generator-rs",
5659
]
5760
unknown-registry = "deny"
5861
unknown-git = "deny"

Cargo.lock

Lines changed: 27 additions & 35 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
@@ -215,7 +215,7 @@ gpu-allocator = { version = "0.28", default-features = false, features = [
215215
] }
216216
range-alloc = "0.1"
217217
mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable
218-
windows-core = { version = "0.61", default-features = false }
218+
windows-core = { version = "0.62", default-features = false }
219219

220220
# Gles dependencies
221221
khronos-egl = "6"
@@ -225,7 +225,7 @@ glutin-winit = { version = "0.4", default-features = false }
225225
glutin_wgl_sys = "0.6"
226226

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

230230
# wasm32 dependencies
231231
console_error_panic_hook = "0.1.5"
@@ -257,6 +257,9 @@ ndk-sys = "0.6"
257257
[patch.crates-io]
258258
wgpu = { path = "./wgpu" }
259259

260+
# https://github.com/Xudong-Huang/generator-rs/pull/75
261+
generator = { git = "https://github.com/Xudong-Huang/generator-rs", rev = "70b89fdabcc0e82fe84ca17f65cc52ff25e8e6de" }
262+
260263
[profile.release]
261264
lto = "thin"
262265
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)