From d46120883efb64d43d5d69c3b5d6673c693ba1c9 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Sat, 9 Dec 2023 12:15:16 +0100 Subject: [PATCH] missing send/sync on web.rs on BufferMappedRange for fragile-send-sync-non-atomic-wasm + !atomics --- wgpu/src/backend/web.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wgpu/src/backend/web.rs b/wgpu/src/backend/web.rs index 4b6e527ab2..82b31c6f6a 100644 --- a/wgpu/src/backend/web.rs +++ b/wgpu/src/backend/web.rs @@ -92,6 +92,16 @@ unsafe impl Send for Context {} not(target_feature = "atomics") ))] unsafe impl Sync for Context {} +#[cfg(all( + feature = "fragile-send-sync-non-atomic-wasm", + not(target_feature = "atomics") +))] +unsafe impl Send for BufferMappedRange {} +#[cfg(all( + feature = "fragile-send-sync-non-atomic-wasm", + not(target_feature = "atomics") +))] +unsafe impl Sync for BufferMappedRange {} impl fmt::Debug for Context { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {