From e58223bedf819deb5287c79dc8292fb8b3996a09 Mon Sep 17 00:00:00 2001 From: Lucas Abel <22837557+uael@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:32:34 +0200 Subject: [PATCH] [metal] allow access to command buffer (#8166) --- wgpu-hal/src/metal/command.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wgpu-hal/src/metal/command.rs b/wgpu-hal/src/metal/command.rs index 72a799a02..5888eb4e9 100644 --- a/wgpu-hal/src/metal/command.rs +++ b/wgpu-hal/src/metal/command.rs @@ -33,6 +33,10 @@ impl Default for super::CommandState { } impl super::CommandEncoder { + pub fn raw_command_buffer(&self) -> Option<&metal::CommandBuffer> { + self.raw_cmd_buf.as_ref() + } + fn enter_blit(&mut self) -> &metal::BlitCommandEncoderRef { if self.state.blit.is_none() { debug_assert!(self.state.render.is_none() && self.state.compute.is_none());