Skip to content

Commit a71a431

Browse files
committed
cargo>: Replace metal-rs patch with git dependency
`gpu-allocator` is a library crate, meaning that `[patch]`es don't get applied when users depend on our crate, and falsely end up with a broken build while our CI said everything was hunky dory ( #224). Even though we cannot normally have a direct `git` dependency as that blocks us from publishing to crates.io, the current `gpu-allocator` release (though only for Metal) is broken anyway. It's relying on functionality that has just now been merged upstream, but still has to make it into a (followup patch) release. What's worse, the harcoded hash that this was pointing to no longer has a live reference on our fork (maybe due to a force-push), and the CI is now failing to to fetch that commit by hash while build-testing `gpu-allocator`. Let's bump to a `git` dependency for now, and replace that as soon as we have a workable solution, however that pans out.
1 parent cbf5299 commit a71a431

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Cargo.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ egui = { version = ">=0.24, <=0.27", optional = true, default-features = false }
3434
egui_extras = { version = ">=0.24, <=0.27", optional = true, default-features = false }
3535

3636
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
37-
metal = { version = "0.27.0", default-features = false, features = ["link", "dispatch"], optional = true }
37+
metal = { version = "0.28.0", git = "https://github.com/gfx-rs/metal-rs", rev = "0d6214f", default-features = false, features = ["link", "dispatch"], optional = true }
3838

3939
[target.'cfg(windows)'.dependencies]
4040
# Only needed for public-winapi interop helpers
@@ -96,6 +96,3 @@ metal = ["dep:metal"]
9696
public-winapi = ["dep:winapi"]
9797

9898
default = ["d3d12", "vulkan"]
99-
100-
[patch.crates-io]
101-
metal = { git = "https://github.com/Traverse-Research/metal-rs", rev = "a354c33" }

src/vulkan/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub struct AllocatorCreateDesc {
105105
/// let my_gpu_data: Vec<MyGpuData> = make_vertex_data();
106106
/// ```
107107
///
108-
/// Depending on how the data we're copying will be used, the vulkan device may have a minimum
108+
/// Depending on how the data we're copying will be used, the Vulkan device may have a minimum
109109
/// alignment requirement for that data:
110110
///
111111
/// ```ignore
@@ -180,7 +180,7 @@ impl Allocation {
180180
///
181181
/// [`Slab`]: presser::Slab
182182
// best to be explicit where the lifetime is coming from since we're doing unsafe things
183-
// and relying on an inferred liftime type in the PhantomData below
183+
// and relying on an inferred lifetime type in the PhantomData below
184184
#[allow(clippy::needless_lifetimes)]
185185
pub fn try_as_mapped_slab<'a>(&'a mut self) -> Option<MappedAllocationSlab<'a>> {
186186
let mapped_ptr = self.mapped_ptr()?.cast().as_ptr();

0 commit comments

Comments
 (0)