Skip to content

Commit c4ba936

Browse files
committed
fixed arguments, tiny bug, variable naming
1 parent f4ff861 commit c4ba936

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

3rdparty/Vulkan-Tools

smoke/main.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,26 @@ class Smoke final : public system::IApplicationFramework
4747
private:
4848
static void exportGpuProfiles()
4949
{
50+
std::string arg2 = "-o";
5051
std::string buf;
52+
std::string arg1;
53+
std::string arg3;
5154

5255
for (size_t i = 0;; i++)
5356
{
5457
auto stringifiedIndex = std::to_string(i);
5558
auto outFile = "device_" + stringifiedIndex + ".json";
56-
std::array<char*, 2> args = { ("--json=" + stringifiedIndex).data(), ("-o " + outFile).data() };
59+
std::array<char*, 3> args = { arg1.data(), arg2.data(), outFile.data() };
5760

5861
int code = nbl::video::vulkaninfo(args);
5962

60-
if (code != 0)
63+
if (code == 0)
6164
break;
6265

6366
// print out file content
64-
std::ifstream output(outFile);
67+
std::ifstream input(outFile);
6568

66-
while (output >> buf)
69+
while (input >> buf)
6770
{
6871
std::cout << buf;
6972
}

0 commit comments

Comments
 (0)