Skip to content

Commit

Permalink
update gpu-allocator to 0.23 (#4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elabajaba authored Oct 3, 2023
1 parent a4d733b commit 61300af
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ By @teoxoy in [#4185](https://github.com/gfx-rs/wgpu/pull/4185)

- Don't bother calling `vkFreeCommandBuffers` when `vkDestroyCommandPool` will take care of that for us. By @jimblandy in [#4059](https://github.com/gfx-rs/wgpu/pull/4059)

#### DX12

- Bump `gpu-allocator` to 0.23. By @Elabajaba in [#4198](https://github.com/gfx-rs/wgpu/pull/4198)


### Documentation
- Use WGSL for VertexFormat example types. By @ScanMountGoat in [#4035](https://github.com/gfx-rs/wgpu/pull/4035)
Expand Down
77 changes: 47 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ android_system_properties = "0.1.1"

# DX dependencies
bit-set = "0.5"
gpu-allocator = { version = "0.21", default_features = false, features = ["d3d12", "windows", "public-winapi"] }
gpu-allocator = { version = "0.23", default_features = false, features = ["d3d12", "public-winapi"] }
d3d12 = "0.7.0"
range-alloc = "0.1"
winapi = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ libloading = { version = ">=0.7, <0.9", optional = true }
# backend: Dx12
bit-set = { version = "0.5", optional = true }
range-alloc = { version = "0.1", optional = true }
gpu-allocator = { version = "0.22", default_features = false, features = ["d3d12", "windows", "public-winapi"], optional = true }
gpu-allocator = { version = "0.23", default_features = false, features = ["d3d12", "public-winapi"], optional = true }
hassle-rs = { version = "0.10", optional = true }

winapi = { version = "0.3", features = ["profileapi", "libloaderapi", "windef", "winuser", "dcomp"] }
Expand Down
4 changes: 3 additions & 1 deletion wgpu-hal/src/dx12/suballocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ mod placed {
let device = raw.as_ptr();

match gpu_allocator::d3d12::Allocator::new(&gpu_allocator::d3d12::AllocatorCreateDesc {
device: device.as_windows().clone(),
device: gpu_allocator::d3d12::ID3D12DeviceVersion::Device(device.as_windows().clone()),
debug_settings: Default::default(),
allocation_sizes: gpu_allocator::AllocationSizes::default(),
}) {
Ok(allocator) => Ok(Some(Mutex::new(GpuAllocatorWrapper { allocator }))),
Err(e) => {
Expand Down Expand Up @@ -213,6 +214,7 @@ mod placed {
log::error!("DX12 gpu-allocator: Internal Error: {}", e);
Self::Lost
}
gpu_allocator::AllocationError::BarrierLayoutNeedsDevice10 => todo!(),
}
}
}
Expand Down

0 comments on commit 61300af

Please sign in to comment.