Skip to content
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

Implement Queue::write_buffer_with #2777

Merged
merged 4 commits into from
Jun 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update doc
teoxoy committed Jun 23, 2022
commit 3bfd1249db9b5eb935d9ceb473f63f6dc44944ab
8 changes: 3 additions & 5 deletions wgpu/src/lib.rs
Original file line number Diff line number Diff line change
@@ -3422,15 +3422,13 @@ impl Queue {

/// Schedule a data write into `buffer` starting at `offset` via the returned [QueueWriteBufferView].
///
/// The returned value can be dereferenced to a `&mut [u8]`.
///
/// Dropping the returned value fails if `size` is greater than the size of `buffer` starting at `offset`.
///
/// Dereferencing the returned value to a `&[u8]` panics!
/// The returned value can be dereferenced to a `&mut [u8]`; dereferencing it to a `&[u8]` panics!
///
/// This method is intended to have low performance costs.
/// As such, the write is not immediately submitted, and instead enqueued
/// internally to happen at the start of the next `submit()` call.
///
/// This method fails if `size` is greater than the size of `buffer` starting at `offset`.
#[must_use]
pub fn write_buffer_with<'a>(
&'a self,