Extended Queue::write_* docs to reflect overrun error (#2250)

* Extended Queue::write_buffer to reflect overrun error

* Extended Queue::write_texture doc to reflect overrun error
This commit is contained in:
Jerónimo Sánchez authored and GitHub committed 2021-12-03 20:34:30 +00:00
1 parent d8c3b9489f
commit dd315e50ff
1 file changed
+4
+4
View File
@@ -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,