Skip to content

Commit

Permalink
Expose the vk::Queue in the Vulkan hal
Browse files Browse the repository at this point in the history
  • Loading branch information
anlumo committed Aug 14, 2022
1 parent c6ca2a7 commit 6706bb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ impl super::Adapter {
let shared = Arc::new(super::DeviceShared {
raw: raw_device,
family_index,
queue_index,
handle_is_owned,
instance: Arc::clone(&self.instance),
physical_device: self.raw,
Expand Down
8 changes: 8 additions & 0 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,14 @@ impl super::Device {
self.shared.physical_device
}

pub fn raw_queue(&self) -> ash::vk::Queue {
unsafe {
self.shared
.raw
.get_device_queue(self.queue_family_index(), self.shared.queue_index)
}
}

pub fn enabled_device_extensions(&self) -> &[&'static CStr] {
&self.shared.enabled_extensions
}
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ impl UpdateAfterBindTypes {
struct DeviceShared {
raw: ash::Device,
family_index: u32,
queue_index: u32,
handle_is_owned: bool,
instance: Arc<InstanceShared>,
physical_device: ash::vk::PhysicalDevice,
Expand Down

0 comments on commit 6706bb8

Please sign in to comment.