Skip to content

Commit b2baf75

Browse files
committed
[metal] Use raw-window-metal to do layer creation
This removes the manual implementation introduced in 7b00140.
1 parent 8fb09a5 commit b2baf75

File tree

8 files changed

+131
-316
lines changed

8 files changed

+131
-316
lines changed

.deny.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ skip-tree = [
1616
{ name = "bit-vec", version = "0.6.3" },
1717
{ name = "capacity_builder", version = "0.1.3" },
1818
{ name = "itertools", version = "0.10.5" },
19+
20+
# Winit 0.30 uses an older objc2
21+
{ name = "objc2-foundation", version = "0.2" },
1922
]
2023
skip = [
2124
# Strum uses an old version

Cargo.lock

Lines changed: 85 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ metal = "0.31.0"
161161
block = "0.1"
162162
core-graphics-types = "0.1"
163163
objc = "0.2.5"
164+
raw-window-metal = "1.0"
164165

165166
# Vulkan dependencies
166167
android_system_properties = "0.1.1"

wgpu-hal/Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
5959
# exclude the Vulkan backend on MacOS unless a separate feature `vulkan-portability` is enabled. In response
6060
# to these features, it enables features of platform specific crates. For example, the `vulkan` feature in wgpu-core
6161
# enables the `vulkan` feature in `wgpu-core-deps-windows-linux-android` which in turn enables the
62-
# `vulkan` feature in `wgpu-hal` _only_ on those platforms. If you enable the `vulkan-portability` feature, it
62+
# `vulkan` feature in `wgpu-hal` _only_ on those platforms. If you enable the `vulkan-portability` feature, it
6363
# will enable the `vulkan` feature in `wgpu-core-deps-apple`. The only way to do this is unfortunately to have
6464
# a separate crate for each platform category that participates in the feature unification.
6565
#
@@ -82,6 +82,7 @@ metal = [
8282
"dep:metal",
8383
"dep:objc",
8484
"dep:profiling",
85+
"dep:raw-window-metal",
8586
]
8687
vulkan = [
8788
"naga/spv-out",
@@ -96,6 +97,7 @@ vulkan = [
9697
"dep:log",
9798
"dep:ordered-float",
9899
"dep:profiling",
100+
"dep:raw-window-metal",
99101
"dep:smallvec",
100102
"dep:windows",
101103
"windows/Win32",
@@ -112,6 +114,7 @@ gles = [
112114
"dep:libloading",
113115
"dep:log",
114116
"dep:ndk-sys",
117+
"dep:objc",
115118
"dep:profiling",
116119
"dep:wasm-bindgen",
117120
"dep:web-sys",
@@ -274,6 +277,9 @@ core-graphics-types = { workspace = true, optional = true }
274277
metal = { workspace = true, optional = true }
275278
objc = { workspace = true, optional = true }
276279

280+
# backend: Metal + Vulkan
281+
raw-window-metal = { workspace = true, optional = true }
282+
277283
#########################
278284
### Platform: Android ###
279285
#########################

0 commit comments

Comments
 (0)