mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
expose some underlying types in Vulkan hal
This commit is contained in:
parent
c7872ab8b5
commit
435188cb89
@ -1113,6 +1113,10 @@ impl super::Instance {
|
||||
}
|
||||
|
||||
impl super::Adapter {
|
||||
pub fn raw_physical_device(&self) -> ash::vk::PhysicalDevice {
|
||||
self.raw
|
||||
}
|
||||
|
||||
pub fn required_device_extensions(&self, features: wgt::Features) -> Vec<&'static CStr> {
|
||||
let (supported_extensions, unsupported_extensions) = self
|
||||
.phd_capabilities
|
||||
|
@ -133,6 +133,22 @@ impl super::Swapchain {
|
||||
}
|
||||
|
||||
impl super::Instance {
|
||||
pub fn entry(&self) -> &ash::Entry {
|
||||
&self.shared.entry
|
||||
}
|
||||
|
||||
pub fn raw_instance(&self) -> &ash::Instance {
|
||||
&self.shared.raw
|
||||
}
|
||||
|
||||
pub fn driver_api_version(&self) -> u32 {
|
||||
self.shared.driver_api_version
|
||||
}
|
||||
|
||||
pub fn extensions(&self) -> &[&'static CStr] {
|
||||
&self.extensions[..]
|
||||
}
|
||||
|
||||
pub fn required_extensions(
|
||||
entry: &ash::Entry,
|
||||
flags: crate::InstanceFlags,
|
||||
@ -266,6 +282,7 @@ impl super::Instance {
|
||||
get_physical_device_properties,
|
||||
entry,
|
||||
has_nv_optimus,
|
||||
driver_api_version,
|
||||
}),
|
||||
extensions,
|
||||
})
|
||||
|
@ -87,6 +87,7 @@ struct InstanceShared {
|
||||
get_physical_device_properties: Option<khr::GetPhysicalDeviceProperties2>,
|
||||
entry: ash::Entry,
|
||||
has_nv_optimus: bool,
|
||||
driver_api_version: u32,
|
||||
}
|
||||
|
||||
pub struct Instance {
|
||||
|
Loading…
Reference in New Issue
Block a user