From 917b6f68720abcba85273ec817037427881615d4 Mon Sep 17 00:00:00 2001 From: Fabian Sauter Date: Mon, 20 Jun 2022 17:32:11 +0200 Subject: [PATCH] Added an option to get the current vk instance Signed-off-by: Fabian Sauter --- src/Manager.cpp | 6 ++++++ src/include/kompute/Manager.hpp | 8 ++++++++ 2 files changed, 14 insertions(+) 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;