Skip to content

Commit 6ef8e1f

Browse files
Expose raw handles (#8174)
Co-authored-by: Connor Fitzgerald <[email protected]>
1 parent b2b76e6 commit 6ef8e1f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

wgpu-hal/src/vulkan/adapter.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ pub struct PhysicalDeviceFeatures {
129129
}
130130

131131
impl PhysicalDeviceFeatures {
132+
pub fn get_core(&self) -> vk::PhysicalDeviceFeatures {
133+
self.core
134+
}
135+
132136
/// Add the members of `self` into `info.enabled_features` and its `p_next` chain.
133137
pub fn add_to_device_create<'a>(
134138
&'a mut self,
@@ -1859,6 +1863,10 @@ impl super::Adapter {
18591863
self.raw
18601864
}
18611865

1866+
pub fn get_physical_device_features(&self) -> &PhysicalDeviceFeatures {
1867+
&self.phd_features
1868+
}
1869+
18621870
pub fn physical_device_capabilities(&self) -> &PhysicalDeviceProperties {
18631871
&self.phd_capabilities
18641872
}

wgpu-hal/src/vulkan/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ pub struct Surface {
462462
}
463463

464464
impl Surface {
465+
pub unsafe fn raw_handle(&self) -> vk::SurfaceKHR {
466+
self.raw
467+
}
468+
465469
/// Get the raw Vulkan swapchain associated with this surface.
466470
///
467471
/// Returns [`None`] if the surface is not configured.

0 commit comments

Comments
 (0)