From 3c22ad5da36d46c4a9bdec09feccd20521f3f181 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Tue, 7 Jul 2026 06:56:55 +0200 Subject: [PATCH] [core] Make `Global` methods thin on command/mod Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- wgpu-core/src/command/mod.rs | 84 ++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 33 deletions(-) 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