-
Notifications
You must be signed in to change notification settings - Fork 547
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
fill_buffer start has to be 16-byte aligned on DX11 #3718
Comments
@cwfitzgerald It occurred to me that DX11 backend can hide this limitation internally. It can basically create a 16-byte buffer with this data and issue a buffer-buffer copy for the unaligned part. |
I'd be quite worried about the performance of this. Maybe expose a "performance only" limit so that wgpu can always properly align it, and if the value is unaligned we can fall back to this workaround. |
I mean, there is clearly a naive path here. We can do better by making a pool of, say 256 byte buffers that are re-used, in which case the major cost - allocating a new buffer - goes away. The point is that it's possible to implement, and similar workarounds are already employed in other places (unfortunately, I suppose?). Maybe when we finally change the direction to #2249, we can remove the workarounds. |
See gfx-rs/wgpu#1303 (comment)
We may need to expose a limit for this.
cc @cwfitzgerald
The text was updated successfully, but these errors were encountered: