From 33e5b7af2673bf9ea5b99e6c75fb35c55b01a977 Mon Sep 17 00:00:00 2001 From: Jinlei Li Date: Thu, 5 Jan 2023 05:35:29 +0800 Subject: [PATCH] vulkan feature exclude macOS and iOS by default (#3292) Co-authored-by: Connor Fitzgerald Closes https://github.com/gfx-rs/wgpu/issues/3287 --- player/Cargo.toml | 14 +++++++++++++- wgpu-core/Cargo.toml | 1 - wgpu/Cargo.toml | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/player/Cargo.toml b/player/Cargo.toml index 814ed26ae..0946dad9d 100644 --- a/player/Cargo.toml +++ b/player/Cargo.toml @@ -12,7 +12,7 @@ publish = false [features] angle = ["wgc/angle"] -vulkan-portability = ["wgc/vulkan-portability"] +vulkan-portability = ["wgc/vulkan"] [dependencies] env_logger.workspace = true @@ -29,5 +29,17 @@ features = ["replay"] workspace = true features = ["replay", "raw-window-handle", "strict_asserts", "wgsl"] +[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc] +workspace = true +features = ["metal"] + +[target.'cfg(windows)'.dependencies.wgc] +workspace = true +features = ["dx11", "dx12"] + +[target.'cfg(any(windows, all(unix, not(target_arch = "emscripten"), not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc] +workspace = true +features = ["vulkan"] + [dev-dependencies] serde.workspace = true diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index bc2c212fc..a282b4c6c 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -45,7 +45,6 @@ serial-pass = ["serde", "wgt/serde", "arrayvec/serde"] id32 = [] # Enable `ShaderModuleSource::Wgsl` wgsl = ["naga/wgsl-in"] -vulkan-portability = ["hal/vulkan"] # Features that are intended to work on all platforms. portable_features = ["gles", "strict_asserts", "trace", "replay", "serial-pass", "id32", "wgsl"] diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 4aec1f8ae..c5a02e7fd 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -92,7 +92,7 @@ replay = ["serde", "wgc/replay"] angle = ["wgc/angle"] webgl = ["hal", "wgc"] emscripten = ["webgl"] -vulkan-portability = ["wgc/vulkan-portability"] +vulkan-portability = ["wgc/vulkan"] expose-ids = [] # wgpu-core is always available as an optional dependency, "wgc". @@ -122,7 +122,7 @@ workspace = true features = ["dx11", "dx12"] # We want the wgpu-core Vulkan backend on Unix (but not Emscripten) and Windows. -[target.'cfg(any(windows, all(unix, not(target_arch = "emscripten"))))'.dependencies.wgc] +[target.'cfg(any(windows, all(unix, not(target_arch = "emscripten"), not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc] workspace = true features = ["vulkan"]