Skip to content

Commit f7ce2a0

Browse files
authored
wgpu: Relese map_context lock before map_async closure call (gfx-rs#8966)
1 parent 8a37e0f commit f7ce2a0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

wgpu/src/api/buffer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ impl<'a> BufferSlice<'a> {
572572
assert_eq!(mc.mapped_range, 0..0, "Buffer is already mapped");
573573
let end = self.offset + self.size.get();
574574
mc.mapped_range = self.offset..end;
575+
drop(mc); // release the lock of map_context as callback can call lock it again
575576

576577
self.buffer
577578
.inner

0 commit comments

Comments
 (0)