Skip to content

Commit 4c08c37

Browse files
Expose raw_factory (#7827)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1 parent df272d3 commit 4c08c37

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Bottom level categories:
124124
#### D3D12
125125

126126
- Remove the need for dxil.dll. By @teoxoy in [#7566](https://github.com/gfx-rs/wgpu/pull/7566)
127+
- Ability to get the raw `IDXGIFactory4` from `Instance`. By @MendyBerger in [#7827](https://github.com/gfx-rs/wgpu/pull/7827)
127128

128129
#### Vulkan
129130

wgpu-hal/src/dx12/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@ pub struct Instance {
465465
}
466466

467467
impl Instance {
468+
/// Get the raw DXGI factory associated with this instance.
469+
pub unsafe fn raw_factory4(&self) -> &Dxgi::IDXGIFactory4 {
470+
self.factory.deref()
471+
}
472+
468473
pub unsafe fn create_surface_from_visual(&self, visual: *mut ffi::c_void) -> Surface {
469474
let visual = unsafe { DirectComposition::IDCompositionVisual::from_raw_borrowed(&visual) }
470475
.expect("COM pointer should not be NULL");

0 commit comments

Comments
 (0)