File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ class Smoke final : public system::IApplicationFramework
1717 bool onAppInitialized (smart_refctd_ptr<ISystem>&& system) override
1818 {
1919 const char * sdk = std::getenv (" NBL_INSTALL_DIRECTORY" );
20+ // const char* sdk = "D:\\Nabla\\smoke\\build-ct\\install";
2021
2122 if (sdk)
2223 {
@@ -47,14 +48,28 @@ class Smoke final : public system::IApplicationFramework
4748private:
4849 static void exportGpuProfiles ()
4950 {
51+ std::string buf;
52+
5053 for (size_t i = 0 ;; i++)
5154 {
5255 auto stringifiedIndex = std::to_string (i);
53- std::array<char *, 2 > args = { (" --json=" + stringifiedIndex).data (), (" -o device_" + stringifiedIndex + " .json" ).data () };
56+ auto outFile = " device_" + stringifiedIndex + " .json" ;
57+ std::array<char *, 2 > args = { (" --json=" + stringifiedIndex).data (), (" -o " + outFile).data () };
58+
5459 int code = nbl::video::vulkaninfo (args);
5560
5661 if (code != 0 )
5762 break ;
63+
64+ // print out file content
65+ std::ifstream output (outFile);
66+
67+ while (output >> buf)
68+ {
69+ std::cout << buf;
70+ }
71+
72+ std::cout << " \n\n " ;
5873 }
5974 }
6075};
You can’t perform that action at this time.
0 commit comments