Skip to content

Commit 44e09d8

Browse files
committed
[d3d12 wgl] Upgrade to windows 0.61 crates
https://github.com/microsoft/windows-rs/releases/tag/63
1 parent f45d87a commit 44e09d8

File tree

6 files changed

+25
-65
lines changed

6 files changed

+25
-65
lines changed

Cargo.lock

Lines changed: 14 additions & 56 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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ gpu-alloc = "0.6"
207207
gpu-descriptor = "0.3.2"
208208

209209
# DX12 dependencies
210-
gpu-allocator = { version = "0.27", default-features = false }
210+
gpu-allocator = { version = "0.27", default-features = false, features = ["hashbrown"] }
211211
range-alloc = "0.1"
212212
mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable
213-
windows-core = { version = "0.59", default-features = false }
213+
windows-core = { version = "0.61", default-features = false }
214214

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

222222
# DX12 and GLES dependencies
223-
windows = { version = "0.59", default-features = false }
223+
windows = { version = "0.61", default-features = false }
224224

225225
# wasm32 dependencies
226226
console_error_panic_hook = "0.1.5"
@@ -252,7 +252,8 @@ ndk-sys = "0.6"
252252
wgpu = { path = "./wgpu" }
253253

254254
# https://github.com/Traverse-Research/gpu-allocator/pull/258
255-
gpu-allocator = { git = "https://github.com/Traverse-Research/gpu-allocator", rev = "955b13a" }
255+
# https://github.com/Traverse-Research/gpu-allocator/pull/269
256+
gpu-allocator = { git = "https://github.com/Traverse-Research/gpu-allocator", rev = "673e4ecb503af4188e0ca576acd0dad681f22413" }
256257

257258
[profile.release]
258259
lto = "thin"

wgpu-hal/src/dx12/device.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,8 +1905,8 @@ impl crate::Device for super::Device {
19051905
DepthBias: bias.constant,
19061906
DepthBiasClamp: bias.clamp,
19071907
SlopeScaledDepthBias: bias.slope_scale,
1908-
DepthClipEnable: Foundation::BOOL::from(!desc.primitive.unclipped_depth),
1909-
MultisampleEnable: Foundation::BOOL::from(desc.multisample.count > 1),
1908+
DepthClipEnable: windows_core::BOOL::from(!desc.primitive.unclipped_depth),
1909+
MultisampleEnable: windows_core::BOOL::from(desc.multisample.count > 1),
19101910
ForcedSampleCount: 0,
19111911
AntialiasedLineEnable: false.into(),
19121912
ConservativeRaster: if desc.primitive.conservative {
@@ -1936,7 +1936,7 @@ impl crate::Device for super::Device {
19361936
RasterizedStream: 0,
19371937
},
19381938
BlendState: Direct3D12::D3D12_BLEND_DESC {
1939-
AlphaToCoverageEnable: Foundation::BOOL::from(
1939+
AlphaToCoverageEnable: windows_core::BOOL::from(
19401940
desc.multisample.alpha_to_coverage_enabled,
19411941
),
19421942
IndependentBlendEnable: true.into(),

wgpu-hal/src/dx12/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use hashbrown::HashMap;
9292
use parking_lot::{Mutex, RwLock};
9393
use suballocation::Allocator;
9494
use windows::{
95-
core::{Free, Interface},
95+
core::{Free as _, Interface},
9696
Win32::{
9797
Foundation,
9898
Graphics::{Direct3D, Direct3D12, DirectComposition, Dxgi},

wgpu-hal/src/dx12/suballocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Allocator {
144144
allocations,
145145
blocks,
146146
total_allocated_bytes: upstream.total_allocated_bytes,
147-
total_reserved_bytes: upstream.total_reserved_bytes,
147+
total_reserved_bytes: upstream.total_capacity_bytes,
148148
}
149149
}
150150
}

wgpu-types/src/counters.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ pub struct AllocatorReport {
181181
/// Sum of the memory used by all allocations, in bytes.
182182
pub total_allocated_bytes: u64,
183183
/// Sum of the memory reserved by all memory blocks including unallocated regions, in bytes.
184+
// XXX: Rename to total_capacity_bytes following the rename at https://github.com/Traverse-Research/gpu-allocator/pull/266?
184185
pub total_reserved_bytes: u64,
185186
}
186187

0 commit comments

Comments
 (0)