Skip to content

Commit de89a25

Browse files
committed
add a structure that holds information about vulkan devices
1 parent 31f9fd9 commit de89a25

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

include/nbl/video/CVulkanConnection.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class NBL_API2 CVulkanConnection final : public IAPIConnection
2626
inline E_API_TYPE getAPIType() const override {return EAT_VULKAN;}
2727

2828
inline IDebugCallback* getDebugCallback() const override {return m_debugCallback.get();}
29+
30+
inline const core::vector<core::string>& getVulkanDevicesInfo() const { return m_vulkanDevicesInfo; }
2931

3032
bool startCapture() override;
3133
bool endCapture() override;
@@ -44,6 +46,7 @@ class NBL_API2 CVulkanConnection final : public IAPIConnection
4446
const VkDebugUtilsMessengerEXT m_vkDebugUtilsMessengerEXT;
4547
const std::unique_ptr<CVulkanDebugCallback> m_debugCallback; // this needs to live longer than VkDebugUtilsMessengerEXT handle above
4648
std::atomic_flag flag;
49+
core::vector<core::string> m_vulkanDevicesInfo;
4750
};
4851

4952
}

src/nbl/video/CVulkanConnection.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ core::smart_refctd_ptr<CVulkanConnection> CVulkanConnection::create(core::smart_
297297

298298
core::smart_refctd_ptr<CVulkanConnection> api(new CVulkanConnection(vk_instance,enabledFeatures,std::move(debugCallback),vk_debugMessenger),core::dont_grab);
299299
api->m_physicalDevices.reserve(vk_physicalDevices.size());
300+
api->m_vulkanDevicesInfo.reserve(vk_physicalDevices.size());
300301
for (auto vk_physicalDevice : vk_physicalDevices)
301302
{
302303
auto device = CVulkanPhysicalDevice::create(core::smart_refctd_ptr(sys),api.get(),api->m_rdoc_api,vk_physicalDevice);
@@ -306,6 +307,7 @@ core::smart_refctd_ptr<CVulkanConnection> CVulkanConnection::create(core::smart_
306307
continue;
307308
}
308309
api->m_physicalDevices.emplace_back(std::move(device));
310+
// device enumeration
309311
}
310312
#undef LOF
311313

0 commit comments

Comments
 (0)