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 4f63d51 commit 774edbe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ash/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ impl Entry {
let entry_fn_1_2 = vk::EntryFnV1_2::load(load_fn);
let entry_fn_1_3 = vk::EntryFnV1_3::load(load_fn);

Self::from_parts_1_3(
static_fn,
entry_fn_1_0,
entry_fn_1_1,
entry_fn_1_2,
entry_fn_1_3,
)
}

#[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,
Expand Down

0 comments on commit 774edbe

Please sign in to comment.