From 45efae315bf182ffbe9d6485c4b411ecacf05f33 Mon Sep 17 00:00:00 2001 From: Sven Sauleau Date: Wed, 21 Jun 2023 22:54:07 +0200 Subject: [PATCH] fix Wasm casing (#3878) --- CHANGELOG.md | 4 ++-- wgpu-hal/src/gles/adapter.rs | 4 ++-- wgpu-hal/src/gles/device.rs | 2 +- wgpu-hal/src/gles/mod.rs | 10 +++++----- wgpu-hal/src/gles/queue.rs | 2 +- wgpu-hal/src/gles/web.rs | 2 +- wgpu/README.md | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b190435d7..231ce06f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -339,7 +339,7 @@ By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671). ### Documentation #### General -- Build for WASM on docs.rs. By @daxpedda in [#3462](https://github.com/gfx-rs/wgpu/pull/3428) +- Build for Wasm on docs.rs. By @daxpedda in [#3462](https://github.com/gfx-rs/wgpu/pull/3428) ## wgpu-0.15.0 (2023-01-25) @@ -1725,7 +1725,7 @@ DeviceDescriptor { - better error messages - timestamp and pipeline statistics queries - ETC2 and ASTC compressed textures - - (beta) targeting WASM with WebGL backend + - (beta) targeting Wasm with WebGL backend - reduced dependencies - Native-only: - clamp-to-border addressing diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index dac13f27df..fc68b437e8 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -585,7 +585,7 @@ impl super::Adapter { let downlevel_defaults = wgt::DownlevelLimits {}; // Drop the GL guard so we can move the context into AdapterShared - // ( on WASM the gl handle is just a ref so we tell clippy to allow + // ( on Wasm the gl handle is just a ref so we tell clippy to allow // dropping the ref ) #[allow(clippy::drop_ref)] drop(gl); @@ -936,7 +936,7 @@ impl super::AdapterShared { } } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Sync for super::Adapter {} #[cfg(target_arch = "wasm32")] diff --git a/wgpu-hal/src/gles/device.rs b/wgpu-hal/src/gles/device.rs index 0a1cfaf241..14bbb36601 100644 --- a/wgpu-hal/src/gles/device.rs +++ b/wgpu-hal/src/gles/device.rs @@ -1321,7 +1321,7 @@ impl crate::Device for super::Device { } } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Sync for super::Device {} #[cfg(target_arch = "wasm32")] diff --git a/wgpu-hal/src/gles/mod.rs b/wgpu-hal/src/gles/mod.rs index f11286833d..1b5e3f1422 100644 --- a/wgpu-hal/src/gles/mod.rs +++ b/wgpu-hal/src/gles/mod.rs @@ -246,7 +246,7 @@ pub struct Buffer { data: Option>>>, } -// Safe: WASM doesn't have threads +// Safe: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Sync for Buffer {} #[cfg(target_arch = "wasm32")] @@ -268,7 +268,7 @@ pub enum TextureInner { }, } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Send for TextureInner {} #[cfg(target_arch = "wasm32")] @@ -462,7 +462,7 @@ struct UniformDesc { utype: u32, } -// Safe: WASM doesn't have threads +// Safe: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Sync for UniformDesc {} #[cfg(target_arch = "wasm32")] @@ -530,7 +530,7 @@ pub struct RenderPipeline { alpha_to_coverage_enabled: bool, } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Send for RenderPipeline {} #[cfg(target_arch = "wasm32")] @@ -540,7 +540,7 @@ pub struct ComputePipeline { inner: Arc, } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Send for ComputePipeline {} #[cfg(target_arch = "wasm32")] diff --git a/wgpu-hal/src/gles/queue.rs b/wgpu-hal/src/gles/queue.rs index 7e5143501c..ec2a18d422 100644 --- a/wgpu-hal/src/gles/queue.rs +++ b/wgpu-hal/src/gles/queue.rs @@ -1525,7 +1525,7 @@ impl crate::Queue for super::Queue { } } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads #[cfg(target_arch = "wasm32")] unsafe impl Sync for super::Queue {} #[cfg(target_arch = "wasm32")] diff --git a/wgpu-hal/src/gles/web.rs b/wgpu-hal/src/gles/web.rs index 565ffcab18..a6f807857b 100644 --- a/wgpu-hal/src/gles/web.rs +++ b/wgpu-hal/src/gles/web.rs @@ -106,7 +106,7 @@ impl Instance { } } -// SAFE: WASM doesn't have threads +// SAFE: Wasm doesn't have threads unsafe impl Sync for Instance {} unsafe impl Send for Instance {} diff --git a/wgpu/README.md b/wgpu/README.md index 44a6f05c04..331cb3b049 100644 --- a/wgpu/README.md +++ b/wgpu/README.md @@ -2,7 +2,7 @@ wgpu-rs is an idiomatic Rust wrapper over [wgpu-core](https://github.com/gfx-rs/wgpu). It's designed to be suitable for general purpose graphics and computation needs of Rust community. -wgpu-rs can target both the natively supported backends and WASM directly. +wgpu-rs can target both the natively supported backends and Wasm directly. See our [gallery](https://wgpu.rs/#showcase) and the [wiki page](https://github.com/gfx-rs/wgpu/wiki/Users) for the list of libraries and applications using `wgpu-rs`.