diff --git a/src/Manager.cpp b/src/Manager.cpp index fd6e654e9..f3f66af91 100644 --- a/src/Manager.cpp +++ b/src/Manager.cpp @@ -450,4 +450,10 @@ Manager::listDevices() const return this->mInstance->enumeratePhysicalDevices(); } +std::shared_ptr +Manager::getVkInstance() const +{ + return this->mInstance; +} + } diff --git a/src/include/kompute/Manager.hpp b/src/include/kompute/Manager.hpp index 5ff325225..e154dc9c1 100644 --- a/src/include/kompute/Manager.hpp +++ b/src/include/kompute/Manager.hpp @@ -214,6 +214,14 @@ class Manager **/ std::vector listDevices() const; + /** + * The current Vulkan instance. + * + * @return a shared pointer to the current Vulkan instance held by this + *object + **/ + std::shared_ptr getVkInstance() const; + private: // -------------- OPTIONALLY OWNED RESOURCES std::shared_ptr mInstance = nullptr;