mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-18 01:43:27 +00:00
allow access to queue family index in vulkan hal device (#2859)
This commit is contained in:
parent
6653dd5b7c
commit
a739354414
@ -56,6 +56,10 @@ Bottom level categories:
|
||||
- Fix depth stencil texture format capability by @jinleili in [#2854](https://github.com/gfx-rs/wgpu/pull/2854)
|
||||
- `get_texture_format_features` now only returns usages for formats it actually supports by @cwfitzgerald in [#2856](https://github.com/gfx-rs/wgpu/pull/2856)
|
||||
|
||||
#### Hal
|
||||
|
||||
- Allow access to queue family index in Vulkan hal by @i509VCB in [#2859](https://github.com/gfx-rs/wgpu/pull/2859)
|
||||
|
||||
### Documentation
|
||||
- Update present_mode docs as most of them don't automatically fall back to Fifo anymore. by @Elabajaba in [#2855](https://github.com/gfx-rs/wgpu/pull/2855)
|
||||
|
||||
|
@ -1316,6 +1316,7 @@ impl super::Adapter {
|
||||
|
||||
let shared = Arc::new(super::DeviceShared {
|
||||
raw: raw_device,
|
||||
family_index,
|
||||
handle_is_owned,
|
||||
instance: Arc::clone(&self.instance),
|
||||
physical_device: self.raw,
|
||||
|
@ -702,6 +702,15 @@ impl super::Device {
|
||||
})
|
||||
}
|
||||
|
||||
/// Returns the queue family index of the device's internal queue.
|
||||
///
|
||||
/// This is useful for constructing memory barriers needed for queue family ownership transfer when
|
||||
/// external memory is involved (from/to `VK_QUEUE_FAMILY_EXTERNAL_KHR` and `VK_QUEUE_FAMILY_FOREIGN_EXT`
|
||||
/// for example).
|
||||
pub fn queue_family_index(&self) -> u32 {
|
||||
self.shared.family_index
|
||||
}
|
||||
|
||||
pub fn raw_device(&self) -> &ash::Device {
|
||||
&self.shared.raw
|
||||
}
|
||||
|
@ -312,6 +312,7 @@ impl UpdateAfterBindTypes {
|
||||
|
||||
struct DeviceShared {
|
||||
raw: ash::Device,
|
||||
family_index: u32,
|
||||
handle_is_owned: bool,
|
||||
instance: Arc<InstanceShared>,
|
||||
physical_device: ash::vk::PhysicalDevice,
|
||||
|
Loading…
Reference in New Issue
Block a user