aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
diff options
context:
space:
mode:
authorRichard S. Wright Jr <richard@lunarg.com>2020-11-19 21:38:50 -0500
committerRichard S. Wright Jr <58573781+richard-lunarg@users.noreply.github.com>2020-11-23 14:24:26 -0500
commit9afdbeb6c2bdc56b02779a7cd51da2311db03891 (patch)
tree39a6f4e725c71c1da5cc465b30b9d0dfd4b38382 /vulkaninfo/vulkaninfo.cpp
parenta9e415eea355a01d32eb8dca083b80976b04f24e (diff)
downloadusermoji-9afdbeb6c2bdc56b02779a7cd51da2311db03891.tar.xz
vulkaninfo: cleanup and comments
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
-rw-r--r--vulkaninfo/vulkaninfo.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp
index 9a813688..51783187 100644
--- a/vulkaninfo/vulkaninfo.cpp
+++ b/vulkaninfo/vulkaninfo.cpp
@@ -859,11 +859,11 @@ void print_usage(const char *argv0) {
std::cout << "--summary Show a summary of the instance and GPU's on a system.\n\n";
}
-#ifndef VK_USE_PLATFORM_IOS_MVK
-int main(int argc, char **argv) {
-#else
+#ifdef VK_USE_PLATFORM_IOS_MVK
// On iOS, we'll call this ourselves from a parent routine in the GUI
int vulkanInfoMain(int argc, char **argv) {
+#else
+int main(int argc, char **argv) {
#endif
#ifdef _WIN32
@@ -979,13 +979,13 @@ int vulkanInfoMain(int argc, char **argv) {
"\t\"comments\": {\n\t\t\"desc\": \"JSON configuration file describing GPU " + std::to_string(selected_gpu) +
". Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": \"" +
VkVersionString(instance.vk_version) + "\"\n" + "\t}";
-#ifndef VK_USE_PLATFORM_IOS_MVK
- printers.push_back(
- std::unique_ptr<Printer>(new Printer(OutputType::json, out, selected_gpu, instance.vk_version, start_string)));
-#else
+#ifdef VK_USE_PLATFORM_IOS_MVK
json_out = std::ofstream("vulkaninfo.json");
printers.push_back(
std::unique_ptr<Printer>(new Printer(OutputType::json, json_out, selected_gpu, instance.vk_version, start_string)));
+#else
+ printers.push_back(
+ std::unique_ptr<Printer>(new Printer(OutputType::json, out, selected_gpu, instance.vk_version, start_string)));
#endif
}
#if defined(VK_ENABLE_BETA_EXTENSIONS)
@@ -1002,13 +1002,13 @@ int vulkanInfoMain(int argc, char **argv) {
"'s portability features and properties. Generated using the vulkaninfo program.\",\n\t\t\"vulkanApiVersion\": "
"\"" +
VkVersionString(instance.vk_version) + "\"\n" + "\t}";
-#ifndef VK_USE_PLATFORM_IOS_MVK
+#ifdef VK_USE_PLATFORM_IOS_MVK
+ portability_out = std::ofstream("portability.json");
printers.push_back(
- std::unique_ptr<Printer>(new Printer(OutputType::json, out, selected_gpu, instance.vk_version, start_string)));
+ std::unique_ptr<Printer>(new Printer(OutputType::json, portability_out, selected_gpu, instance.vk_version, start_string)));
#else
- portability_out = std::ofstream("portabiliyt.json");
printers.push_back(
- std::unique_ptr<Printer>(new Printer(OutputType::json, portability_out, selected_gpu, instance.vk_version, start_string)));
+ std::unique_ptr<Printer>(new Printer(OutputType::json, out, selected_gpu, instance.vk_version, start_string)));
#endif
}
}
@@ -1025,7 +1025,7 @@ int vulkanInfoMain(int argc, char **argv) {
}
for (auto &p : printers) {
-#if defined(VK_USE_PLATFORM_IOS_MVK)
+#ifdef VK_USE_PLATFORM_IOS_MVK
p->SetAlwaysOpenDetails(true);
#endif
if (summary) {