Skip to content

Commit

Permalink
Added an option to get the current vk instance
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
  • Loading branch information
COM8 committed Jun 21, 2022
1 parent e232f28 commit 888413f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,10 @@ Manager::listDevices() const
return this->mInstance->enumeratePhysicalDevices();
}

std::shared_ptr<vk::Instance>
Manager::getVkInstance() const
{
return this->mInstance;
}

}
8 changes: 8 additions & 0 deletions src/include/kompute/Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ class Manager
**/
std::vector<vk::PhysicalDevice> listDevices() const;

/**
* The current Vulkan instance.
*
* @return a shared pointer to the current Vulkan instance held by this
*object
**/
std::shared_ptr<vk::Instance> getVkInstance() const;

private:
// -------------- OPTIONALLY OWNED RESOURCES
std::shared_ptr<vk::Instance> mInstance = nullptr;
Expand Down

0 comments on commit 888413f

Please sign in to comment.