diff options
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index cec2e6c6..425172e9 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -220,7 +220,22 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf } void DumpSurface(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurface &surface, std::set<std::string> surface_types) { - ObjectWrapper obj(p, std::string("GPU id : ") + p.DecorateAsValue(std::to_string(gpu.id)) + " (" + gpu.props.deviceName + ")"); + std::string surface_type_list_str = ""; + if (surface_types.size() > 0) { + surface_type_list_str = " ["; + bool is_first = true; + for (auto &name : surface_types) { + if (!is_first) { + surface_type_list_str += ", "; + } else { + is_first = false; + } + surface_type_list_str += name; + } + surface_type_list_str += "]"; + } + ObjectWrapper obj(p, std::string("GPU id : ") + p.DecorateAsValue(std::to_string(gpu.id)) + " (" + gpu.props.deviceName + ")" + + surface_type_list_str); if (surface_types.size() == 0) { p.SetAsType().PrintKeyString("Surface type", "No type found"); |
