Skip to content

Commit 8ffa34a

Browse files
authored
[metal] Use raw-window-metal to do layer creation (#6210)
This removes the manual implementation introduced in 7b00140.
1 parent 2002283 commit 8ffa34a

File tree

8 files changed

+146
-319
lines changed

8 files changed

+146
-319
lines changed

.deny.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ skip-tree = [
77

88
# introduced by Deno, to be investigated
99
{ name = "petgraph", version = "0.6.5" },
10+
11+
# Winit 0.30 uses an older objc2
12+
{ name = "objc2-foundation", version = "0.2" },
1013
]
1114
skip = [
1215
# Deno uses an old version

Cargo.lock

Lines changed: 96 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
@@ -206,6 +206,7 @@ metal = "0.33"
206206
block = "0.1.6"
207207
core-graphics-types = "0.2"
208208
objc = "0.2.5"
209+
raw-window-metal = "1.0"
209210

210211
# Vulkan dependencies
211212
android_system_properties = "0.1.1"

wgpu-hal/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
6060
# exclude the Vulkan backend on MacOS unless a separate feature `vulkan-portability` is enabled. In response
6161
# to these features, it enables features of platform specific crates. For example, the `vulkan` feature in wgpu-core
6262
# enables the `vulkan` feature in `wgpu-core-deps-windows-linux-android` which in turn enables the
63-
# `vulkan` feature in `wgpu-hal` _only_ on those platforms. If you enable the `vulkan-portability` feature, it
63+
# `vulkan` feature in `wgpu-hal` _only_ on those platforms. If you enable the `vulkan-portability` feature, it
6464
# will enable the `vulkan` feature in `wgpu-core-deps-apple`. The only way to do this is unfortunately to have
6565
# a separate crate for each platform category that participates in the feature unification.
6666
#
@@ -85,6 +85,7 @@ metal = [
8585
"dep:parking_lot",
8686
"dep:profiling",
8787
"dep:smallvec",
88+
"dep:raw-window-metal",
8889
]
8990
vulkan = [
9091
"naga/spv-out",
@@ -100,6 +101,7 @@ vulkan = [
100101
"dep:ordered-float",
101102
"dep:parking_lot",
102103
"dep:profiling",
104+
"dep:raw-window-metal",
103105
"dep:smallvec",
104106
"dep:windows",
105107
"gpu-allocator/vulkan",
@@ -284,6 +286,9 @@ core-graphics-types = { workspace = true, optional = true }
284286
metal = { workspace = true, optional = true }
285287
objc = { workspace = true, optional = true }
286288

289+
# backend: Metal + Vulkan
290+
raw-window-metal = { workspace = true, optional = true }
291+
287292
#########################
288293
### Platform: Android ###
289294
#########################

0 commit comments

Comments
 (0)