From 0ac2da4b6baea94c1e9d9bb03bdcf69122da857a Mon Sep 17 00:00:00 2001 From: Xiaopeng Li Date: Fri, 12 Dec 2025 09:43:22 +0800 Subject: [PATCH] [metal] expose render_layer (#8707) --- CHANGELOG.md | 1 + wgpu-hal/src/metal/surface.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1291d7e46..5e5bc5c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -201,6 +201,7 @@ By @cwfitzgerald in [#8609](https://github.com/gfx-rs/wgpu/pull/8609). #### Metal - Add support for mesh shaders. By @SupaMaggie70Incorporated in [#8139](https://github.com/gfx-rs/wgpu/pull/8139) +- Expose render layer. By @xiaopengli89 in [#8707](https://github.com/gfx-rs/wgpu/pull/8707) #### Naga diff --git a/wgpu-hal/src/metal/surface.rs b/wgpu-hal/src/metal/surface.rs index 2a705cd79..05466f2e5 100644 --- a/wgpu-hal/src/metal/surface.rs +++ b/wgpu-hal/src/metal/surface.rs @@ -50,6 +50,10 @@ impl super::Surface { Self::new(layer.to_owned()) } + pub fn render_layer(&self) -> &Mutex { + &self.render_layer + } + /// Get or create a new `CAMetalLayer` associated with the given `NSView` /// or `UIView`. ///