From f7ce2a0052c778286e780351fa3622d3b844320d Mon Sep 17 00:00:00 2001 From: Sam <16504129+sagudev@users.noreply.github.com> Date: Thu, 29 Jan 2026 20:49:51 +0100 Subject: [PATCH] wgpu: Relese map_context lock before map_async closure call (#8966) --- wgpu/src/api/buffer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/wgpu/src/api/buffer.rs b/wgpu/src/api/buffer.rs index 4b5bb7332..a64b6593d 100644 --- a/wgpu/src/api/buffer.rs +++ b/wgpu/src/api/buffer.rs @@ -572,6 +572,7 @@ impl<'a> BufferSlice<'a> { assert_eq!(mc.mapped_range, 0..0, "Buffer is already mapped"); let end = self.offset + self.size.get(); mc.mapped_range = self.offset..end; + drop(mc); // release the lock of map_context as callback can call lock it again self.buffer .inner