Allow to get raw swap chain from DX12 surface (#7399)

* allow to get raw swap_chain from dx12 surface

* Update wgpu-hal/src/dx12/mod.rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* allow obtaining IDXGISwapChain3 directly

---------

Co-authored-by: Marc Pabst <mail@xxxxxxx>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Marc Pabst <“marcpabst@users.noreply.github.com”>
This commit is contained in:
authored and GitHub committed 2025-03-31 20:15:35 -04:00
1 parent 700a2e8ced
commit 3d7ae9dc92
1 file changed
+6
+6
View File
@@ -546,6 +546,12 @@ pub struct Surface {
unsafe impl Send for Surface {}
unsafe impl Sync for Surface {}
impl Surface {
pub fn swap_chain(&self) -> Option<Dxgi::IDXGISwapChain3> {
Some(self.swap_chain.read().as_ref()?.raw.clone())
}
}
#[derive(Debug, Clone, Copy)]
enum MemoryArchitecture {
Unified {