diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 82869e020a..3558cdc284 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -3157,6 +3157,8 @@ impl Queue { /// 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 `data` overruns the size of `buffer` starting at `offset`. pub fn write_buffer(&self, buffer: &Buffer, offset: BufferAddress, data: &[u8]) { Context::queue_write_buffer(&*self.context, &self.id, &buffer.id, offset, data) } @@ -3166,6 +3168,8 @@ impl Queue { /// 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 `data` overruns the size of fragment of `texture` specified with `size`. pub fn write_texture( &self, texture: ImageCopyTexture,