diff --git a/wgpu-core/src/command/mod.rs b/wgpu-core/src/command/mod.rs index 3b57c391c..171312ae1 100644 --- a/wgpu-core/src/command/mod.rs +++ b/wgpu-core/src/command/mod.rs @@ -1315,10 +1315,19 @@ impl CommandEncoder { Ok(()) } - fn finish( + /// Finishes a command encoder, creating a command buffer and returning errors that were + /// deferred until now. + /// + /// The returned `String` is the label of the command encoder, supplied so that `wgpu` can + /// include the label when printing deferred errors without having its own copy of the label. + /// This is a kludge and should be replaced if we think of a better solution to propagating + /// labels. + pub fn finish( self: &Arc, desc: &wgt::CommandBufferDescriptor