-
Couldn't load subscription status.
- Fork 67
GPU Diagnostics #938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
GPU Diagnostics #938
Changes from 23 commits
de89a25
92fd0f0
a8f4dbb
a8d9ea3
67ee163
e4207b8
dd4c7fd
e645f4f
824662a
0002aef
1361717
9cb542d
6f6420b
471d128
6e15b42
e2bb3cc
e3c34aa
2725307
4c7386b
e956dca
58bceda
211ad29
1c1b9c7
1c06649
cd267ad
8ab07a1
4147b99
f4ff861
c4ba936
67b1ae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,4 +125,7 @@ | |
| path = ci | ||
| url = [email protected]:Devsh-Graphics-Programming/Nabla-CI.git | ||
| branch = ditt | ||
| update = none | ||
| update = none | ||
| [submodule "3rdparty/Vulkan-Tools"] | ||
| path = 3rdparty/Vulkan-Tools | ||
| url = [email protected]:Devsh-Graphics-Programming/Vulkan-Tools.git | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,11 +36,16 @@ class Smoke final : public system::IApplicationFramework | |
| return false; | ||
| } | ||
|
|
||
| nbl::video::vulkaninfo(); | ||
|
||
|
|
||
| return true; | ||
| } | ||
|
|
||
| void workLoopBody() override {} | ||
| bool keepRunning() override { return false; } | ||
|
|
||
| private: | ||
| smart_refctd_ptr<CVulkanConnection> m_api; | ||
| }; | ||
|
|
||
| NBL_MAIN_FUNC(Smoke) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ | |
| // TODO: move inside `create` and call it LOG_FAIL and return nullptr | ||
| #define LOG(logger, ...) if (logger) {logger->log(__VA_ARGS__);} | ||
|
|
||
| extern int vulkaninfo(const std::span<const std::string_view>); | ||
|
||
|
|
||
| namespace nbl::video | ||
| { | ||
|
|
||
|
|
@@ -306,6 +308,7 @@ core::smart_refctd_ptr<CVulkanConnection> CVulkanConnection::create(core::smart_ | |
| continue; | ||
| } | ||
| api->m_physicalDevices.emplace_back(std::move(device)); | ||
| // device enumeration | ||
| } | ||
| #undef LOF | ||
|
|
||
|
|
@@ -372,4 +375,17 @@ bool CVulkanConnection::endCapture() | |
| return true; | ||
| } | ||
|
|
||
| void CVulkanConnection::exportGpuProfiles() | ||
|
||
| { | ||
| for (size_t i = 0;; i++) | ||
| { | ||
| auto arg = "--json=" + std::to_string(i); | ||
| int code = ::vulkaninfo(std::array<const std::string_view, 1>{ arg }); | ||
|
||
| if (code != 0) | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| NBL_API2 int vulkaninfo(const std::span<const std::string_view> args) { return ::vulkaninfo(args); } | ||
|
||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#938 (comment)