mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
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:
1 file changed
+6
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user