Skip to content

Commit

Permalink
added Device::native_handle; update submod
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Mar 19, 2024
1 parent 92cfa27 commit 5f5d2d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions luisa_compute/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,18 @@ impl DeviceExtensions for Device {
}

impl Device {
#[inline]
pub fn query(&self, name: &str) -> Option<String> {
self.inner.query(name)
}

pub fn name(&self) -> String {
self.query("device_name").unwrap_or("unknown".to_string())
}
#[inline]
pub fn native_handle(&self) -> *mut std::ffi::c_void {
self.inner.native_handle()
}
pub fn create_swapchain(
&self,
window: &Window,
Expand Down

0 comments on commit 5f5d2d3

Please sign in to comment.