From 7efad3a101ea6e641e5948a4ed0d6e93b99b7bff Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Thu, 6 Mar 2025 09:41:56 -0600 Subject: vulkaninfo: Use Object for "Vulkan Profiles" array The "Video Profiles" element must be a JSON Object in order for the sub elements to have names. The outputprinter helper doesn't prevent mixing objects inside of arrays, so this wasn't caught during development. --- vulkaninfo/vulkaninfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vulkaninfo/vulkaninfo.cpp') diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 0641ab0f..eb30a7b7 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -634,7 +634,7 @@ void DumpVkVideoProfileInfoKHRCustom(Printer &p, std::string name, const VkVideo void GpuDumpVideoProfiles(Printer &p, AppGpu &gpu, bool show_video_props) { p.SetHeader(); - ArrayWrapper video_profiles_obj(p, "Video Profiles", gpu.video_profiles.size()); + ObjectWrapper video_profiles_obj(p, "Video Profiles", gpu.video_profiles.size()); IndentWrapper indent_outer(p); if (p.Type() != OutputType::text || show_video_props) { @@ -879,7 +879,9 @@ void PrintProfileBaseInfo(Printer &p, const std::string &device_name, uint32_t a p.PrintKeyString("api-version", APIVersion(apiVersion).str()); p.PrintKeyString("label", device_label); p.PrintKeyString("description", std::string("Exported from ") + APP_SHORT_NAME); - { ObjectWrapper contributors(p, "contributors"); } + { + ObjectWrapper contributors(p, "contributors"); + } { ArrayWrapper contributors(p, "history"); ObjectWrapper element(p, ""); -- cgit v1.2.3