-
Notifications
You must be signed in to change notification settings - Fork 18
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
Sessioned reads and writes #13
Comments
In this case you can use |
Sure, this isn't a blocker. However, doing map/unmap manually also requires handling the flush/invalidation for non-coherent memory, which is tedious. A session-based reader/writer would strictly be better in this case. |
How about function that takes a closure in which reads and/or writes are available? |
That would be inferior to RAII. Are you concerned about safety guarantees when doing this, so that closure helps you to preserve them? I think there are no guarantees here for the most part, so no need to try restricting the users too much. |
I try to guarantee that memory gets unmapped. To prevent attempts to map memory when it's already mapped. |
Mapping is already |
It would be very useful to do multiple reads/writes in a single mapping session. Currently,
write_bytes
andread_bytes
are limited to exactly one request. Case in question: laying out texture data into the staging buffer, it needs to be done row by row to respect the alignment of the target API.The text was updated successfully, but these errors were encountered: