From cb162a239b0f7d3740a81f880fafd406106284e7 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 12:22:54 +0100 Subject: [PATCH 01/11] refactor: satisfy `clippy::manual_bits` --- wgpu-core/src/id.rs | 2 +- wgpu-core/src/track/metadata.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/id.rs b/wgpu-core/src/id.rs index 83b2494391..19baa2e6f0 100644 --- a/wgpu-core/src/id.rs +++ b/wgpu-core/src/id.rs @@ -11,7 +11,7 @@ type IdType = u64; type ZippedIndex = Index; type NonZeroId = std::num::NonZeroU64; -const INDEX_BITS: usize = std::mem::size_of::() * 8; +const INDEX_BITS: usize = ZippedIndex::BITS as usize; const EPOCH_BITS: usize = INDEX_BITS - BACKEND_BITS; const BACKEND_BITS: usize = 3; const BACKEND_SHIFT: usize = INDEX_BITS * 2 - BACKEND_BITS; diff --git a/wgpu-core/src/track/metadata.rs b/wgpu-core/src/track/metadata.rs index 855282d72c..22576207ae 100644 --- a/wgpu-core/src/track/metadata.rs +++ b/wgpu-core/src/track/metadata.rs @@ -1,7 +1,6 @@ //! The `ResourceMetadata` type. use bit_vec::BitVec; -use std::mem; use wgt::strict_assert; /// A set of resources, holding a `Arc` and epoch for each member. @@ -191,7 +190,7 @@ fn resize_bitvec(vec: &mut BitVec, size: usize) { /// /// Will skip entire usize's worth of bits if they are all false. fn iterate_bitvec_indices(ownership: &BitVec) -> impl Iterator + '_ { - const BITS_PER_BLOCK: usize = mem::size_of::() * 8; + const BITS_PER_BLOCK: usize = usize::BITS as usize; let size = ownership.len(); From e63ac6a0a5ef8e79a15f489dcafba5c10897614d Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:37:35 +0100 Subject: [PATCH 02/11] chore(naga): remove dead `"validation"` feat. refs. Missed in a26e4a00, but we're fixing it now! --- naga/src/valid/expression.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/naga/src/valid/expression.rs b/naga/src/valid/expression.rs index 116560bb61..ba99211f07 100644 --- a/naga/src/valid/expression.rs +++ b/naga/src/valid/expression.rs @@ -1696,7 +1696,7 @@ pub fn check_literal_value(literal: crate::Literal) -> Result<(), LiteralError> Ok(()) } -#[cfg(all(test, feature = "validate"))] +#[cfg(test)] /// Validate a module containing the given expression, expecting an error. fn validate_with_expression( expr: crate::Expression, @@ -1719,7 +1719,7 @@ fn validate_with_expression( validator.validate(&module) } -#[cfg(all(test, feature = "validate"))] +#[cfg(test)] /// Validate a module containing the given constant expression, expecting an error. fn validate_with_const_expression( expr: crate::Expression, @@ -1736,7 +1736,6 @@ fn validate_with_const_expression( } /// Using F64 in a function's expression arena is forbidden. -#[cfg(feature = "validate")] #[test] fn f64_runtime_literals() { let result = validate_with_expression( @@ -1768,7 +1767,6 @@ fn f64_runtime_literals() { } /// Using F64 in a module's constant expression arena is forbidden. -#[cfg(feature = "validate")] #[test] fn f64_const_literals() { let result = validate_with_const_expression( @@ -1797,7 +1795,6 @@ fn f64_const_literals() { } /// Using I64 in a function's expression arena is forbidden. -#[cfg(feature = "validate")] #[test] fn i64_runtime_literals() { let result = validate_with_expression( @@ -1821,7 +1818,6 @@ fn i64_runtime_literals() { } /// Using I64 in a module's constant expression arena is forbidden. -#[cfg(feature = "validate")] #[test] fn i64_const_literals() { let result = validate_with_const_expression( From 7339e59377233213284b1a3ea293cc3fb8f4fbc7 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:54:30 +0100 Subject: [PATCH 03/11] chore(naga): remove broken `Unsupported64Bit` tests Seemingly missed in 4e6f873da5e25acef9898f0f3490591c8be2e0b6. --- naga/src/valid/expression.rs | 43 ------------------------------------ 1 file changed, 43 deletions(-) diff --git a/naga/src/valid/expression.rs b/naga/src/valid/expression.rs index ba99211f07..09dd768e24 100644 --- a/naga/src/valid/expression.rs +++ b/naga/src/valid/expression.rs @@ -1793,46 +1793,3 @@ fn f64_const_literals() { ); assert!(result.is_ok()); } - -/// Using I64 in a function's expression arena is forbidden. -#[test] -fn i64_runtime_literals() { - let result = validate_with_expression( - crate::Expression::Literal(crate::Literal::I64(1729)), - // There is no capability that enables this. - super::Capabilities::all(), - ); - let error = result.unwrap_err().into_inner(); - assert!(matches!( - error, - crate::valid::ValidationError::Function { - source: super::FunctionError::Expression { - source: super::ExpressionError::Literal(super::LiteralError::Width( - super::r#type::WidthError::Unsupported64Bit - ),), - .. - }, - .. - } - )); -} - -/// Using I64 in a module's constant expression arena is forbidden. -#[test] -fn i64_const_literals() { - let result = validate_with_const_expression( - crate::Expression::Literal(crate::Literal::I64(1729)), - // There is no capability that enables this. - super::Capabilities::all(), - ); - let error = result.unwrap_err().into_inner(); - assert!(matches!( - error, - crate::valid::ValidationError::ConstExpression { - source: super::ConstExpressionError::Literal(super::LiteralError::Width( - super::r#type::WidthError::Unsupported64Bit, - ),), - .. - } - )); -} From e7fb872e0812cb131eb07c25fc9f4281138b141e Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:43:07 +0100 Subject: [PATCH 04/11] chore: satisfy `unused_qualifications` lint --- naga/src/valid/expression.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/naga/src/valid/expression.rs b/naga/src/valid/expression.rs index 09dd768e24..1d1420aef6 100644 --- a/naga/src/valid/expression.rs +++ b/naga/src/valid/expression.rs @@ -1747,7 +1747,7 @@ fn f64_runtime_literals() { error, crate::valid::ValidationError::Function { source: super::FunctionError::Expression { - source: super::ExpressionError::Literal(super::LiteralError::Width( + source: ExpressionError::Literal(LiteralError::Width( super::r#type::WidthError::MissingCapability { name: "f64", flag: "FLOAT64", @@ -1777,7 +1777,7 @@ fn f64_const_literals() { assert!(matches!( error, crate::valid::ValidationError::ConstExpression { - source: super::ConstExpressionError::Literal(super::LiteralError::Width( + source: ConstExpressionError::Literal(LiteralError::Width( super::r#type::WidthError::MissingCapability { name: "f64", flag: "FLOAT64", From 59ea2652a9544ffc661cb067a50810485b6e651a Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 12:17:53 +0100 Subject: [PATCH 05/11] refactor(naga): use same Firefox commentary for `rust-version` --- naga/Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/naga/Cargo.toml b/naga/Cargo.toml index cd6bd5e9af..e8415a3bc3 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -9,9 +9,14 @@ keywords = ["shader", "SPIR-V", "GLSL", "MSL"] license = "MIT OR Apache-2.0" exclude = ["bin/**/*", "tests/**/*", "Cargo.lock", "target/**/*"] resolver = "2" -rust-version = "1.76" autotests = false +# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to +# copy the crates it actually uses out of the workspace, so it's meaningful for +# them to have less restrictive MSRVs individually than the workspace as a +# whole, if their code permits. See `../README.md` for details. +rust-version = "1.76" + [[test]] name = "naga-test" path = "tests/root.rs" From 9eee9109afcb51b83c28f5ab149e1bbcd0ccd4c7 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 13:08:10 +0100 Subject: [PATCH 06/11] chore: update out-of-date docs build fix expectation --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8034cd47cc..1cb6a28a19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ env: # # This needs to be newer to work around https://github.com/gfx-rs/wgpu/issues/4905. # - # Once 1.76 coes out, we can use that instead of nightly. + # Once this fix hits stable Rust, we can use that instead of nightly. DOCS_RUST_VERSION: "nightly-2023-12-17" # This is the MSRV used by `wgpu` itself and all surrounding infrastructure. REPO_MSRV: "1.76" From 316e845097f3cb8f478f0053ead290bbe821ceec Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 13:21:52 +0100 Subject: [PATCH 07/11] chore: satisfy `clippy::collapsible_match` --- naga/src/back/glsl/mod.rs | 15 +++++++-------- naga/src/valid/analyzer.rs | 7 +++---- naga/src/valid/mod.rs | 7 +++---- wgpu-hal/examples/raw-gles.rs | 25 +++++++++++++------------ 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/naga/src/back/glsl/mod.rs b/naga/src/back/glsl/mod.rs index 99b0fc7150..d1c0fd75ec 100644 --- a/naga/src/back/glsl/mod.rs +++ b/naga/src/back/glsl/mod.rs @@ -1313,14 +1313,13 @@ impl<'a, W: Write> Writer<'a, W> { crate::MathFunction::Dot => { // if the expression is a Dot product with integer arguments, // then the args needs baking as well - if let TypeInner::Scalar(crate::Scalar { kind, .. }) = *inner { - match kind { - crate::ScalarKind::Sint | crate::ScalarKind::Uint => { - self.need_bake_expressions.insert(arg); - self.need_bake_expressions.insert(arg1.unwrap()); - } - _ => {} - } + if let TypeInner::Scalar(crate::Scalar { + kind: crate::ScalarKind::Sint | crate::ScalarKind::Uint, + .. + }) = *inner + { + self.need_bake_expressions.insert(arg); + self.need_bake_expressions.insert(arg1.unwrap()); } } crate::MathFunction::Pack4xI8 diff --git a/naga/src/valid/analyzer.rs b/naga/src/valid/analyzer.rs index 0322200493..89b3da6a4c 100644 --- a/naga/src/valid/analyzer.rs +++ b/naga/src/valid/analyzer.rs @@ -593,15 +593,14 @@ impl FunctionInfo { E::FunctionArgument(index) => { let arg = &resolve_context.arguments[index as usize]; let uniform = match arg.binding { - Some(crate::Binding::BuiltIn(built_in)) => match built_in { + Some(crate::Binding::BuiltIn( // per-polygon built-ins are uniform crate::BuiltIn::FrontFacing // per-work-group built-ins are uniform | crate::BuiltIn::WorkGroupId | crate::BuiltIn::WorkGroupSize - | crate::BuiltIn::NumWorkGroups => true, - _ => false, - }, + | crate::BuiltIn::NumWorkGroups) + ) => true, // only flat inputs are uniform Some(crate::Binding::Location { interpolation: Some(crate::Interpolation::Flat), diff --git a/naga/src/valid/mod.rs b/naga/src/valid/mod.rs index d9a986df7e..c314ec2ac8 100644 --- a/naga/src/valid/mod.rs +++ b/naga/src/valid/mod.rs @@ -533,14 +533,13 @@ impl Validator { let decl_ty = &gctx.types[o.ty].inner; match decl_ty { - &crate::TypeInner::Scalar(scalar) => match scalar { + &crate::TypeInner::Scalar( crate::Scalar::BOOL | crate::Scalar::I32 | crate::Scalar::U32 | crate::Scalar::F32 - | crate::Scalar::F64 => {} - _ => return Err(OverrideError::TypeNotScalar), - }, + | crate::Scalar::F64, + ) => {} _ => return Err(OverrideError::TypeNotScalar), } diff --git a/wgpu-hal/examples/raw-gles.rs b/wgpu-hal/examples/raw-gles.rs index ceab5b065b..06df610658 100644 --- a/wgpu-hal/examples/raw-gles.rs +++ b/wgpu-hal/examples/raw-gles.rs @@ -49,18 +49,19 @@ fn main() { match event { Event::LoopDestroyed => (), - Event::WindowEvent { event, .. } => match event { - WindowEvent::CloseRequested - | WindowEvent::KeyboardInput { - input: - KeyboardInput { - virtual_keycode: Some(VirtualKeyCode::Escape), - .. - }, - .. - } => *control_flow = ControlFlow::Exit, - _ => (), - }, + Event::WindowEvent { + event: + WindowEvent::CloseRequested + | WindowEvent::KeyboardInput { + input: + KeyboardInput { + virtual_keycode: Some(VirtualKeyCode::Escape), + .. + }, + .. + }, + .. + } => *control_flow = ControlFlow::Exit, _ => (), } }); From c28c17aa5f70c63042cf96bca82e02732688606d Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 13:33:54 +0100 Subject: [PATCH 08/11] =?UTF-8?q?build(ci):=20update=20`nightly`=202023-12?= =?UTF-8?q?-17=20=E2=86=92=202024-01-31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rationale is that this is roughly the last `nightly` 1.77 build to come out. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cb6a28a19..2b3f902d47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,13 +32,13 @@ env: # We sometimes need nightly to use special things in CI. # # In order to prevent CI regressions, we pin the nightly version. - NIGHTLY_VERSION: "nightly-2023-12-17" + NIGHTLY_VERSION: "nightly-2024-01-31" # Version of rust used to build the docs with. # # This needs to be newer to work around https://github.com/gfx-rs/wgpu/issues/4905. # # Once this fix hits stable Rust, we can use that instead of nightly. - DOCS_RUST_VERSION: "nightly-2023-12-17" + DOCS_RUST_VERSION: "nightly-2024-01-31" # This is the MSRV used by `wgpu` itself and all surrounding infrastructure. REPO_MSRV: "1.76" # This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates, From ea69e86f684acad7c4bbe796e5d565c6f7bdfa92 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 12:19:53 +0100 Subject: [PATCH 09/11] =?UTF-8?q?build:=20upgrade=20`rust-version`=20for?= =?UTF-8?q?=20Firefox=20crates=201.76=20=E2=86=92=201.77.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 2 +- naga/Cargo.toml | 2 +- rust-toolchain.toml | 2 +- wgpu-core/Cargo.toml | 2 +- wgpu-hal/Cargo.toml | 2 +- wgpu-types/Cargo.toml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b3f902d47..13e9ef4c1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,10 +40,10 @@ env: # Once this fix hits stable Rust, we can use that instead of nightly. DOCS_RUST_VERSION: "nightly-2024-01-31" # This is the MSRV used by `wgpu` itself and all surrounding infrastructure. - REPO_MSRV: "1.76" + REPO_MSRV: "1.77.2" # This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates, # to ensure that they can be used with firefox. - CORE_MSRV: "1.76" + CORE_MSRV: "1.77.2" # # Environment variables diff --git a/Cargo.toml b/Cargo.toml index 04b26b8044..0262922288 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ default-members = [ [workspace.package] edition = "2021" -rust-version = "1.76" +rust-version = "1.77.0" keywords = ["graphics"] license = "MIT OR Apache-2.0" homepage = "https://wgpu.rs/" diff --git a/naga/Cargo.toml b/naga/Cargo.toml index e8415a3bc3..5c02ff4134 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -15,7 +15,7 @@ autotests = false # copy the crates it actually uses out of the workspace, so it's meaningful for # them to have less restrictive MSRVs individually than the workspace as a # whole, if their code permits. See `../README.md` for details. -rust-version = "1.76" +rust-version = "1.77.0" [[test]] name = "naga-test" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 45bb8d6d51..41d80b8003 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.76" +channel = "1.77.2" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 22d813c4cb..19b16fada9 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" # copy the crates it actually uses out of the workspace, so it's meaningful for # them to have less restrictive MSRVs individually than the workspace as a # whole, if their code permits. See `../README.md` for details. -rust-version = "1.76" +rust-version = "1.77.0" [package.metadata.docs.rs] all-features = true diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index eedd027bfe..cdfec16b5f 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" # copy the crates it actually uses out of the workspace, so it's meaningful for # them to have less restrictive MSRVs individually than the workspace as a # whole, if their code permits. See `../README.md` for details. -rust-version = "1.76" +rust-version = "1.77.0" [package.metadata.docs.rs] # Ideally we would enable all the features. diff --git a/wgpu-types/Cargo.toml b/wgpu-types/Cargo.toml index 387e41a475..6a052c9322 100644 --- a/wgpu-types/Cargo.toml +++ b/wgpu-types/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" # copy the crates it actually uses out of the workspace, so it's meaningful for # them to have less restrictive MSRVs individually than the workspace as a # whole, if their code permits. See `../README.md` for details. -rust-version = "1.76" +rust-version = "1.77.0" [package.metadata.docs.rs] all-features = true From c5fea97bdc2cbd977b43d73800b6c45e9d8c5166 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:06:30 +0100 Subject: [PATCH 10/11] =?UTF-8?q?build:=20upgrade=20`cfg=5Faliases`=200.1.?= =?UTF-8?q?1=20=E2=86=92=200.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This resolves an upstream issue with [`--check-cfg` in Rust 1.80](https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html#checked-cfg-names-and-values). --- Cargo.lock | 20 +++++++++++++------- Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c010f70450..a9b23eb326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -474,6 +474,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "cgl" version = "0.3.2" @@ -2013,7 +2019,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2196,7 +2202,7 @@ dependencies = [ "arrayvec 0.7.4", "bit-set", "bitflags 2.6.0", - "cfg_aliases", + "cfg_aliases 0.2.1", "codespan-reporting", "diff", "env_logger", @@ -4219,7 +4225,7 @@ name = "wgpu" version = "22.0.0" dependencies = [ "arrayvec 0.7.4", - "cfg_aliases", + "cfg_aliases 0.2.1", "document-features", "js-sys", "log", @@ -4263,7 +4269,7 @@ dependencies = [ "bit-vec", "bitflags 2.6.0", "bytemuck", - "cfg_aliases", + "cfg_aliases 0.2.1", "document-features", "indexmap", "log", @@ -4323,7 +4329,7 @@ dependencies = [ "bitflags 2.6.0", "block", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.2.1", "core-graphics-types", "d3d12", "env_logger", @@ -4470,7 +4476,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -4845,7 +4851,7 @@ dependencies = [ "bitflags 2.6.0", "bytemuck", "calloop 0.12.4", - "cfg_aliases", + "cfg_aliases 0.1.1", "core-foundation", "core-graphics 0.23.2", "cursor-icon", diff --git a/Cargo.toml b/Cargo.toml index 0262922288..6146d88969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,7 +77,7 @@ bincode = "1" bit-vec = "0.8" bitflags = "2.6" bytemuck = { version = "1.16", features = ["derive"] } -cfg_aliases = "0.1" +cfg_aliases = "0.2.1" cfg-if = "1" criterion = "0.5" codespan-reporting = "0.11" From 9b10575d0f44f5bad45d4ca114748ab108b47283 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 12 Aug 2024 11:56:01 +0100 Subject: [PATCH 11/11] chore(core): add `wgpu_*` `cfg` keys not exposed in `features` This resolves remaining outstanding cases that offend [`--check-cfg` in Rust 1.80](https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html#checked-cfg-names-and-values). --- wgpu-core/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wgpu-core/build.rs b/wgpu-core/build.rs index 2f715fdb2a..1dfa8f035e 100644 --- a/wgpu-core/build.rs +++ b/wgpu-core/build.rs @@ -10,4 +10,6 @@ fn main() { metal: { all(any(target_os = "ios", target_os = "macos"), feature = "metal") }, vulkan: { all(not(target_arch = "wasm32"), feature = "vulkan") } } + println!("cargo::rustc-check-cfg=cfg(wgpu_core_doc)"); + println!("cargo::rustc-check-cfg=cfg(wgpu_validate_locks)"); }