Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo: Bump windows crate range to 0.53-0.56 #213

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ metal = { version = "0.28.0", git = "https://github.com/gfx-rs/metal-rs", rev =
winapi = { version = "0.3.9", features = ["d3d12", "winerror", "impl-default", "impl-debug"], optional = true }

[target.'cfg(windows)'.dependencies.windows]
version = ">=0.51,<=0.52"
version = ">=0.53,<=0.56"
features = [
"Win32_Foundation",
"Win32_Graphics",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
]
optional = true
Expand All @@ -61,13 +57,10 @@ env_logger = "0.10"
winapi = { version = "0.3.9", features = ["d3d12", "d3d12sdklayers", "dxgi1_6", "winerror", "impl-default", "impl-debug", "winuser", "windowsx", "libloaderapi"] }

[target.'cfg(windows)'.dev-dependencies.windows]
version = ">=0.51,<=0.52"
version = ">=0.53,<=0.56"
features = [
"Win32_Foundation",
"Win32_Graphics",
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Dxgi_Common",
]

Expand Down
2 changes: 1 addition & 1 deletion examples/d3d12-buffer-winrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use gpu_allocator::d3d12::{
};
use gpu_allocator::MemoryLocation;
use log::*;
use windows::core::{ComInterface, Result};
use windows::core::{Interface, Result};
use windows::Win32::{
Foundation::E_NOINTERFACE,
Graphics::{
Expand Down
5 changes: 2 additions & 3 deletions src/d3d12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,8 @@ impl std::ops::Deref for ID3D12DeviceVersion {
fn deref(&self) -> &Self::Target {
match self {
Self::Device(device) => device,
// Windows-rs hides CanInto, we know that Device10/Device12 is a subclass of Device but there's not even a Deref.
Self::Device10(device10) => windows::core::CanInto::can_into(device10),
Self::Device12(device12) => windows::core::CanInto::can_into(device12),
Self::Device10(device10) => device10.into(),
Self::Device12(device12) => device12.into(),
}
}
}
Expand Down