Skip to content

Commit d1d17cf

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

File tree

3 files changed

+57
-55
lines changed

3 files changed

+57
-55
lines changed

Cargo.lock

Lines changed: 43 additions & 44 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
@@ -213,7 +213,7 @@ gpu-descriptor = "0.3.2"
213213
gpu-allocator = { version = "0.28", default-features = false, features = ["hashbrown"] }
214214
range-alloc = "0.1"
215215
mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable
216-
windows-core = { version = "0.61", default-features = false }
216+
windows-core = { version = ">=0.61, <=0.62", default-features = false }
217217

218218
# Gles dependencies
219219
khronos-egl = "6"
@@ -223,7 +223,7 @@ glutin-winit = { version = "0.4", default-features = false }
223223
glutin_wgl_sys = "0.6"
224224

225225
# DX12 and GLES dependencies
226-
windows = { version = "0.61", default-features = false }
226+
windows = { version = ">=0.61, <=0.62", default-features = false }
227227

228228
# wasm32 dependencies
229229
console_error_panic_hook = "0.1.5"
@@ -255,6 +255,9 @@ ndk-sys = "0.6"
255255
[patch.crates-io]
256256
wgpu = { path = "./wgpu" }
257257

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