diff --git a/ffi/wgpu.h b/ffi/wgpu.h index b6585c8d40..f85060f821 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* Generated with cbindgen:0.14.0 */ +/* Generated with cbindgen:0.14.1 */ /* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen. * To generate this file: diff --git a/wgpu-core/src/id.rs b/wgpu-core/src/id.rs index a2bae01dc7..f50477cbeb 100644 --- a/wgpu-core/src/id.rs +++ b/wgpu-core/src/id.rs @@ -24,6 +24,9 @@ pub struct Id(NonZeroU64, PhantomData); impl Default for Id { fn default() -> Self { Id( + // Create an ID that doesn't make sense: + // the high `BACKEND_BITS` are to be set to 0, which matches `Backend::Empty`, + // the other bits are all 1s unsafe { NonZeroU64::new_unchecked(!0 >> BACKEND_BITS) }, PhantomData, ) diff --git a/wgpu-core/src/track/texture.rs b/wgpu-core/src/track/texture.rs index 17ec6ac49f..d37ac6bb59 100644 --- a/wgpu-core/src/track/texture.rs +++ b/wgpu-core/src/track/texture.rs @@ -300,7 +300,7 @@ mod test { assert_eq!( ts1.merge(id, &ts2, None), Ok(()), - "failed to merge with an emtpy" + "failed to merge with an empty" ); ts2.mips.push(PlaneStates::from_slice(&[(