-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BufferMappedRange trait object can not be sent between threads #3795
Comments
wgpu/wgpu/src/backend/direct.rs Lines 3050 to 3051 in 9c8666a
but not on the web Line 3232 in 9c8666a
due to
|
Already covered in that PR. wgpu/wgpu/src/backend/direct.rs Lines 3051 to 3054 in 826b36e
|
I meant the trait specifically. |
Description
With wgpu 0.14, code like the following is valid:
With wgpu 0.15 and forward, it won't compile, because of this change 052bd17#diff-00d306ac48be4eb4a03df7b093e35fabfb521d981f82315a3a725a9dc15e1ae1R77-R80
The error I get is:
Repro steps
wgpu-fail
).cargo build
Expected vs observed behavior
Expected: Build succeeds
Actual: Build fails
Extra materials
The reason I am using this older method of downloading buffers, and not directly using
map_async
, is that I found for my use case that addingMAP_READ
to the buffer I want to read back causes a massive drop in performance. I can still use this older method, but because the trait object isn'tSend
, I'm forced to do an extra copy (ie. copy to vector, send the vector between threads instead). This causes a drop in performance.I've "fixed" the issue myself on my own branch, but I'm not sure if the change is ok and/or breaking: pema99@e44f8ae
The text was updated successfully, but these errors were encountered: