mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
add methods to get raw d3d12::ComPtr<dxgi1_4::IDXGISwapChain3>
This commit is contained in:
parent
7954a6bd3e
commit
49101f2057
@ -177,6 +177,12 @@ pub struct Surface {
|
||||
unsafe impl Send for Surface {}
|
||||
unsafe impl Sync for Surface {}
|
||||
|
||||
impl Surface {
|
||||
pub unsafe fn swap_chain(&self) -> Option<d3d12::ComPtr<dxgi1_4::IDXGISwapChain3>> {
|
||||
self.swap_chain.read().as_ref().map(|sc| sc.raw())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
enum MemoryArchitecture {
|
||||
Unified {
|
||||
@ -621,6 +627,10 @@ impl SwapChain {
|
||||
self.raw
|
||||
}
|
||||
|
||||
unsafe fn raw(&self) -> d3d12::ComPtr<dxgi1_4::IDXGISwapChain3> {
|
||||
self.raw.clone()
|
||||
}
|
||||
|
||||
unsafe fn wait(
|
||||
&mut self,
|
||||
timeout: Option<std::time::Duration>,
|
||||
|
Loading…
Reference in New Issue
Block a user