mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 09:21:04 +01:00
Merge #781
781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
commit
cadc2df8a1
1 file changed
+3
@@ -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) }
|
||||
|
||||
Reference in new issue
Block a user