From 5b133c34ec76786b96c26538c8586f7cfdbc19a4 Mon Sep 17 00:00:00 2001 From: Jamen Marz Date: Tue, 14 Sep 2021 19:17:23 -0600 Subject: [PATCH] Add a note that copying within the same buffer panics --- wgpu/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index c5113bd2d..a0325541a 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -2207,6 +2207,7 @@ impl CommandEncoder { /// /// - Buffer offsets or copy size not a multiple of [`COPY_BUFFER_ALIGNMENT`]. /// - Copy would overrun buffer. + /// - Copy within the same buffer. pub fn copy_buffer_to_buffer( &mut self, source: &Buffer, @@ -2300,7 +2301,7 @@ impl CommandEncoder { /// /// - `CLEAR_COMMANDS` extension not enabled /// - Texture does not have `COPY_DST` usage. - /// - Range it out of bounds + /// - Range is out of bounds pub fn clear_texture(&mut self, texture: &Texture, subresource_range: &ImageSubresourceRange) { Context::command_encoder_clear_texture( &*self.context,