Skip to content

Commit

Permalink
Add raw_device for dx12, vulkan device
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 authored and kvark committed Jan 6, 2022
1 parent 043e36c commit 10a07e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wgpu-hal/src/dx12/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ impl super::Device {
result
}

pub fn raw_device(&self) -> &native::Device {
&self.raw
}

pub unsafe fn texture_from_raw(
resource: native::Resource,
format: wgt::TextureFormat,
Expand Down
4 changes: 4 additions & 0 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ impl super::Device {
},
})
}

pub fn raw_device(&self) -> &ash::Device {
&self.shared.raw
}
}

impl crate::Device<super::Api> for super::Device {
Expand Down

0 comments on commit 10a07e4

Please sign in to comment.