mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Expose the vk::Queue and the queue index in the Vulkan hal. (#2950)
This commit is contained in:
@@ -93,6 +93,7 @@ the same every time it is rendered, we now warn if it is missing.
|
||||
|
||||
#### Vulkan
|
||||
- Remove use of Vulkan12Features/Properties types. By @i509VCB in [#2936](https://github.com/gfx-rs/wgpu/pull/2936)
|
||||
- Provide a means for `wgpu` users to access `vk::Queue` and the queue index. By @anlumo in [#2950](https://github.com/gfx-rs/wgpu/pull/2950)
|
||||
|
||||
### Documentation
|
||||
|
||||
|
||||
@@ -1181,6 +1181,8 @@ impl super::Adapter {
|
||||
let shared = Arc::new(super::DeviceShared {
|
||||
raw: raw_device,
|
||||
family_index,
|
||||
queue_index,
|
||||
raw_queue,
|
||||
handle_is_owned,
|
||||
instance: Arc::clone(&self.instance),
|
||||
physical_device: self.raw,
|
||||
|
||||
@@ -714,6 +714,10 @@ impl super::Device {
|
||||
self.shared.family_index
|
||||
}
|
||||
|
||||
pub fn queue_index(&self) -> u32 {
|
||||
self.shared.queue_index
|
||||
}
|
||||
|
||||
pub fn raw_device(&self) -> &ash::Device {
|
||||
&self.shared.raw
|
||||
}
|
||||
@@ -722,6 +726,10 @@ impl super::Device {
|
||||
self.shared.physical_device
|
||||
}
|
||||
|
||||
pub fn raw_queue(&self) -> ash::vk::Queue {
|
||||
self.shared.raw_queue
|
||||
}
|
||||
|
||||
pub fn enabled_device_extensions(&self) -> &[&'static CStr] {
|
||||
&self.shared.enabled_extensions
|
||||
}
|
||||
|
||||
@@ -296,6 +296,8 @@ impl UpdateAfterBindTypes {
|
||||
struct DeviceShared {
|
||||
raw: ash::Device,
|
||||
family_index: u32,
|
||||
queue_index: u32,
|
||||
raw_queue: ash::vk::Queue,
|
||||
handle_is_owned: bool,
|
||||
instance: Arc<InstanceShared>,
|
||||
physical_device: ash::vk::PhysicalDevice,
|
||||
|
||||
Reference in New Issue
Block a user