Skip to content

Commit

Permalink
ash/entry: Allow building entry from handle+fns
Browse files Browse the repository at this point in the history
Adds a constructor to build an entry from a handle + functions.
Helps with interoperability with other vulkan wrappers
  • Loading branch information
pac85 committed May 6, 2023
1 parent 82aa3c0 commit 9473bac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ash/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,25 @@ impl Entry {
}
}

#[inline]
pub unsafe fn from_parts_1_3(
static_fn: vk::StaticFn,
entry_fn_1_0: vk::EntryFnV1_0,
entry_fn_1_1: vk::EntryFnV1_1,
entry_fn_1_2: vk::EntryFnV1_2,
entry_fn_1_3: vk::EntryFnV1_3,
) -> Self {
Self {
static_fn,
entry_fn_1_0,
entry_fn_1_1,
entry_fn_1_2,
entry_fn_1_3,
#[cfg(feature = "loaded")]
_lib_guard: None,
}
}

#[inline]
pub fn fp_v1_0(&self) -> &vk::EntryFnV1_0 {
&self.entry_fn_1_0
Expand Down

0 comments on commit 9473bac

Please sign in to comment.