-
-
Notifications
You must be signed in to change notification settings - Fork 97
Update to gfx-hal 0.5 #277
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
Conversation
37ae446 to
50cd4f6
Compare
|
Note that this also updates the examples from winit-0.20-alpha to winit-0.21, which matches the version used by gfx-hal 0.5. |
50cd4f6 to
3e6fdb3
Compare
|
Looks like this breaks windows, but I don't have a windows machine to debug on. Seems to be a problem with the Cargo features used for |
|
Hey, I just happened to find this and it turns out I'm working on the So there are changes that are being backported from I discovered an issue that I have to fix, though, and it might be in the range of a few weeks or so before I fix it ( I don't know, my availability is pretty variable at the moment ). |
|
Is there a reason that this PR is updating to gfx-rs/gfx@6d10d21, rather than diff --git a/core/Cargo.toml b/core/Cargo.toml
index b6bcce1..8641420 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -26,9 +26,9 @@ vulkan = ["gfx-backend-vulkan"]
no-slow-safety-checks = []
[dependencies]
-gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7" }
-gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7", optional = true }
-gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7", features = ["glutin"], default_features = false, optional = true }
+gfx-hal = { version = "0.5" }
+gfx-backend-empty = { version = "0.5", optional = true }
+gfx-backend-gl = { version = "0.5", features = ["glutin"], default_features = false, optional = true }
lazy_static = "1.0"
log = "0.4"
parking_lot = "0.9"
@@ -37,10 +37,10 @@ thread_profiler = "0.3"
raw-window-handle = "0.3"
[target.'cfg(all(target_os = "windows", not(target_arch = "wasm32")))'.dependencies]
-gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7", optional = true }
+gfx-backend-dx12 = { version = "0.5", optional = true }
[target.'cfg(any(all(not(target_arch = "wasm32"), target_os = "macos"), all(target_arch = "aarch64", target_os = "ios")))'.dependencies]
-gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7", optional = true }
+gfx-backend-metal = { version = "0.5", optional = true }
[target.'cfg(all(any(target_os = "windows", all(unix, not(any(target_os = "macos", target_os = "ios")))), not(target_arch = "wasm32")))'.dependencies]
-gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7", features = ["x11"], optional = true }
+gfx-backend-vulkan = { version = "0.5", features = ["x11"], optional = true }
diff --git a/descriptor/Cargo.toml b/descriptor/Cargo.toml
index f2375a9..cd19479 100644
--- a/descriptor/Cargo.toml
+++ b/descriptor/Cargo.toml
@@ -11,7 +11,7 @@ categories = ["rendering"]
description = "Rendy's descriptor allocator"
[dependencies]
-gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7" }
+gfx-hal = { version = "0.5" }
log = "0.4"
relevant = { version = "0.4", features = ["log"] }
smallvec = "1.0"
diff --git a/descriptor/src/allocator.rs b/descriptor/src/allocator.rs
index 248832e..fd106ca 100644
--- a/descriptor/src/allocator.rs
+++ b/descriptor/src/allocator.rs
@@ -77,7 +77,8 @@ unsafe fn allocate_from_pool<B: Backend>(
let sets_were = allocation.len();
raw.allocate(std::iter::repeat(layout).take(count as usize), allocation)
.map_err(|err| match err {
- AllocationError::OutOfMemory(oom) => oom,
+ AllocationError::Host => OutOfMemory::Host,
+ AllocationError::Device => OutOfMemory::Device,
err => {
// We check pool for free descriptors and sets before calling this function,
// so it can't be exhausted.
diff --git a/memory/Cargo.toml b/memory/Cargo.toml
index 5f5d548..b3c709f 100644
--- a/memory/Cargo.toml
+++ b/memory/Cargo.toml
@@ -14,7 +14,7 @@ description = "Rendy's memory manager"
serde-1 = ["serde", "gfx-hal/serde"]
[dependencies]
-gfx-hal = { git = "https://github.com/gfx-rs/gfx", rev = "6d10d21788fffa6a7ca17888c8d3a4b6265442e7" }
+gfx-hal = { version = "0.5" }
log = "0.4"
hibitset = {version = "0.6", default-features = false}
relevant = { version = "0.4", features = ["log"] } |
|
I do get the same errors as CI when running this PR as-is. I think that points to a problem in |
Fixes #275
This is probably a breaking change since at least one public type is affected (
rendy_resource::image::ImageViewCreationError)