diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec46c5ce..ebd42dcaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## v0.8 (TBD) +## v0.8 (2021-04-29) - Naga is used by default to translate shaders, SPIRV-Cross is optional behind `cross` feature - Features: - buffers are zero-initialized @@ -17,6 +17,7 @@ - switch from `tracing` to `profiling` - more concrete and detailed errors - API traces include the command that crashed/panicked + - Vulkan Portability support is removed from Apple platforms - Validation: - texture bindings - filtering of textures by samplers diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index cd338d8ac..6f53ac092 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -36,9 +36,8 @@ serde = { version = "1.0", features = ["serde_derive"], optional = true } smallvec = "1" thiserror = "1" -# Update to 0.4 when it will be available -gpu-alloc = { git = "https://github.com/zakarumych/gpu-alloc.git", rev = "2cd1ad650cdd24d1647b6041f77ced0cbf1ff2a6" } -gpu-descriptor = { version = "0.1" } +gpu-alloc = "0.4" +gpu-descriptor = "0.1" hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd661fe4d3003f4275270e9c40d" } gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd661fe4d3003f4275270e9c40d" } @@ -49,7 +48,7 @@ gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd [target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies] gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd661fe4d3003f4275270e9c40d" } -gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd661fe4d3003f4275270e9c40d", optional = true } +#TODO: could also depend on gfx-backend-vulkan for Vulkan Portability [target.'cfg(all(not(target_arch = "wasm32"), windows))'.dependencies] gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "32684a7da923cfd661fe4d3003f4275270e9c40d" } diff --git a/wgpu-core/build.rs b/wgpu-core/build.rs index 2a5c02a8b..786064d70 100644 --- a/wgpu-core/build.rs +++ b/wgpu-core/build.rs @@ -11,7 +11,7 @@ fn main() { unix_wo_apple: {all(unix, not(apple))}, // Backends - vulkan: { all(not(wasm), any(windows, unix_wo_apple, feature = "gfx-backend-vulkan")) }, + vulkan: { all(not(wasm), any(windows, unix_wo_apple)) }, metal: { all(not(wasm), apple) }, dx12: { all(not(wasm), windows) }, dx11: { all(not(wasm), windows) }, diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index a6b69b5f8..1f79be13b 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -733,8 +733,6 @@ impl Global { profiling::scope!("create_surface_metal", "Instance"); let surface = Surface { - #[cfg(feature = "gfx-backend-vulkan")] - vulkan: None, //TODO: create_surface_from_layer ? metal: self.instance.metal.as_ref().map(|inst| { // we don't want to link to metal-rs for this #[allow(clippy::transmute_ptr_to_ref)] diff --git a/wgpu-core/src/lib.rs b/wgpu-core/src/lib.rs index a76c5014e..01db1471e 100644 --- a/wgpu-core/src/lib.rs +++ b/wgpu-core/src/lib.rs @@ -254,7 +254,7 @@ macro_rules! gfx_select { // Note: For some reason the cfg aliases defined in build.rs don't succesfully apply in this // macro so we must specify their equivalents manually match $id.backend() { - #[cfg(all(not(target_arch = "wasm32"), any(not(any(target_os = "ios", target_os = "macos")), feature = "gfx-backend-vulkan")))] + #[cfg(all(not(target_arch = "wasm32"), not(target_os = "ios"), not(target_os = "macos")))] wgt::Backend::Vulkan => $global.$method::<$crate::backend::Vulkan>( $($param),* ), #[cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))] wgt::Backend::Metal => $global.$method::<$crate::backend::Metal>( $($param),* ), diff --git a/wgpu-core/src/macros.rs b/wgpu-core/src/macros.rs index 47485e6d4..a8bf6c1ef 100644 --- a/wgpu-core/src/macros.rs +++ b/wgpu-core/src/macros.rs @@ -59,11 +59,7 @@ macro_rules! backends_map { #[test] fn test_backend_macro() { struct Foo { - #[cfg(any( - windows, - all(unix, not(any(target_os = "ios", target_os = "macos"))), - feature = "gfx-backend-vulkan", - ))] + #[cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos")),))] vulkan: u32, #[cfg(any(target_os = "ios", target_os = "macos"))] @@ -108,11 +104,7 @@ fn test_backend_macro() { map((test_foo.dx11, 'd')), } - #[cfg(any( - windows, - all(unix, not(any(target_os = "ios", target_os = "macos"))), - feature = "gfx-backend-vulkan", - ))] + #[cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos")),))] assert!(vec.contains(&(1, 'a'))); #[cfg(any(target_os = "ios", target_os = "macos"))] @@ -208,11 +200,7 @@ fn test_backend_macro() { println!("backend int: {:?}", var_dx11); } - #[cfg(any( - windows, - all(unix, not(any(target_os = "ios", target_os = "macos"))), - feature = "gfx-backend-vulkan", - ))] + #[cfg(any(windows, all(unix, not(target_os = "ios"), not(target_os = "macos")),))] let _ = var_vulkan; #[cfg(any(target_os = "ios", target_os = "macos"))]