diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 4371c65301..9c007bf6ef 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -129,6 +129,10 @@ pub struct PhysicalDeviceFeatures { } impl PhysicalDeviceFeatures { + pub fn get_core(&self) -> vk::PhysicalDeviceFeatures { + self.core + } + /// Add the members of `self` into `info.enabled_features` and its `p_next` chain. pub fn add_to_device_create<'a>( &'a mut self, @@ -1859,6 +1863,10 @@ impl super::Adapter { self.raw } + pub fn get_physical_device_features(&self) -> &PhysicalDeviceFeatures { + &self.phd_features + } + pub fn physical_device_capabilities(&self) -> &PhysicalDeviceProperties { &self.phd_capabilities } diff --git a/wgpu-hal/src/vulkan/mod.rs b/wgpu-hal/src/vulkan/mod.rs index c449f0f9c2..c24217d2f7 100644 --- a/wgpu-hal/src/vulkan/mod.rs +++ b/wgpu-hal/src/vulkan/mod.rs @@ -462,6 +462,10 @@ pub struct Surface { } impl Surface { + pub unsafe fn raw_handle(&self) -> vk::SurfaceKHR { + self.raw + } + /// Get the raw Vulkan swapchain associated with this surface. /// /// Returns [`None`] if the surface is not configured.