@@ -33,11 +33,6 @@ glsl = ["naga/glsl-in"]
33
33
wgsl = [" wgc?/wgsl" ]
34
34
trace = [" serde" , " wgc/trace" ]
35
35
replay = [" serde" , " wgc/replay" ]
36
- # Enables the GLES backend on Windows & macOS
37
- angle = [" wgc/gles" ]
38
- webgl = [" hal" , " wgc/gles" ]
39
- # Enables the Vulkan backend on macOS & iOS
40
- vulkan-portability = [" wgc/vulkan" ]
41
36
expose-ids = []
42
37
# Implement `Send` and `Sync` on Wasm.
43
38
fragile-send-sync-non-atomic-wasm = [
@@ -48,9 +43,18 @@ fragile-send-sync-non-atomic-wasm = [
48
43
# Log all API entry points at info instead of trace level.
49
44
api_log_info = [" wgc/api_log_info" ]
50
45
# Backends
46
+ # Enables the DX11 backend on Windows
51
47
dx11 = [" wgc?/dx11" ]
48
+ # Enables the DX12 backend on Windows
52
49
dx12 = [" wgc?/dx12" ]
50
+ # Enables the Metal backend on macOS & iOS
53
51
metal = [" wgc?/metal" ]
52
+ # Enables the GLES backend on Windows & macOS
53
+ angle = [" wgc?/gles" ]
54
+ # Enables the Vulkan backend on macOS & iOS
55
+ vulkan-portability = [" wgc?/vulkan" ]
56
+ # Enables the GLES backend on Wasm (currently will also enable GLES dependencies on any other target)
57
+ webgl = [" hal" , " wgc/gles" ]
54
58
55
59
# wgpu-core is always available as an optional dependency, "wgc".
56
60
# Whenever wgpu-core is selected, we want raw window handle support.
@@ -65,7 +69,8 @@ features = ["raw-window-handle"]
65
69
workspace = true
66
70
features = [" raw-window-handle" ]
67
71
68
- # We want the wgpu-core Metal backend on macOS and iOS.
72
+ # Enable `wgc` by default on macOS and iOS to allow the `metal` crate feature to
73
+ # enable the Metal backend while being no-op on other targets.
69
74
[target .'cfg(any(target_os = "macos", target_os = "ios"))' .dependencies .wgc ]
70
75
workspace = true
71
76
0 commit comments