diff --git a/src/Manager.cpp b/src/Manager.cpp index 2e58d714a..eefff07da 100644 --- a/src/Manager.cpp +++ b/src/Manager.cpp @@ -458,4 +458,10 @@ Manager::listDevices() const return this->mInstance->enumeratePhysicalDevices(); } +std::shared_ptr +Manager::getVkInstance() const +{ + return mInstance; +} + } diff --git a/src/include/kompute/Manager.hpp b/src/include/kompute/Manager.hpp index 53261c06d..a0e727cae 100644 --- a/src/include/kompute/Manager.hpp +++ b/src/include/kompute/Manager.hpp @@ -215,6 +215,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;