Skip to content

Commit

Permalink
[rs] Mark BufferMappedRange Send/Sync on native
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Mar 4, 2021
1 parent b53a00e commit 9be3031
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wgpu/src/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,9 @@ pub struct BufferMappedRange {
size: usize,
}

unsafe impl Send for BufferMappedRange {}
unsafe impl Sync for BufferMappedRange {}

impl crate::BufferMappedRangeSlice for BufferMappedRange {
fn slice(&self) -> &[u8] {
unsafe { slice::from_raw_parts(self.ptr, self.size) }
Expand Down

0 comments on commit 9be3031

Please sign in to comment.