diff options
| author | Charles Giessen <charles@lunarg.com> | 2021-11-16 19:10:15 -0700 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2021-11-16 20:37:56 -0700 |
| commit | bfdd0c8753824b734a448308f6ca0e1a2af57802 (patch) | |
| tree | 3687af9cc5e307177f7b41008f7c3820411084a5 /vulkaninfo/vulkaninfo.cpp | |
| parent | 1e60e360990b81abe34b75e69c41a4c1a1027465 (diff) | |
| download | usermoji-bfdd0c8753824b734a448308f6ca0e1a2af57802.tar.xz | |
vulkaninfo: Make printing ToolProperties optional
This field has caused numerous crashes and has generally been more trouble than
its worth to have as a default output. Now, a new command line argument is
needed to get vulkaninfo to print tooling info.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index d25cf1f0..79acf5f4 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -642,7 +642,7 @@ void GpuDevDumpJson(Printer &p, AppGpu &gpu) { } // Print gpu info for text, html, & vkconfig_output // Uses a seperate function than schema-json for clarity -void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats) { +void DumpGpu(Printer &p, AppGpu &gpu, bool show_tooling_info, bool show_formats) { ObjectWrapper obj_gpu(p, "GPU" + std::to_string(gpu.id)); IndentWrapper indent(p); @@ -658,7 +658,9 @@ void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats) { } GpuDumpMemoryProps(p, gpu); GpuDumpFeatures(p, gpu); - GpuDumpToolingInfo(p, gpu); + if (show_tooling_info) { + GpuDumpToolingInfo(p, gpu); + } if (p.Type() != OutputType::text || show_formats) { GpuDevDump(p, gpu); @@ -831,6 +833,7 @@ void print_usage(const char *argv0) { std::cout << " Subset Schema for the GPU specified to standard output,\n"; std::cout << " where N is the GPU desired.\n"; #endif // defined(VK_ENABLE_BETA_EXTENSIONS) + std::cout << "--show-tool-props Show the active VkPhysicalDeviceToolPropertiesEXT that vulkaninfo finds.\n"; std::cout << "--show-formats Display the format properties of each physical device.\n"; std::cout << " Note: This option does not affect html or json output;\n"; std::cout << " they will always print format properties.\n\n"; @@ -854,6 +857,7 @@ int main(int argc, char **argv) { #endif uint32_t selected_gpu = 0; + bool show_tool_props = false; bool show_formats = false; char *output_path = nullptr; @@ -887,6 +891,8 @@ int main(int argc, char **argv) { } else if (strcmp(argv[i], "--html") == 0) { human_readable_output = false; html_output = true; + } else if (strcmp(argv[i], "--show-tool-props") == 0) { + show_tool_props = true; } else if (strcmp(argv[i], "--show-formats") == 0) { show_formats = true; } else if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) { @@ -1047,7 +1053,7 @@ int main(int argc, char **argv) { IndentWrapper indent(*p); for (auto &gpu : gpus) { - DumpGpu(*p.get(), *gpu.get(), show_formats); + DumpGpu(*p.get(), *gpu.get(), show_tool_props, show_formats); } } } |
