Skip to content

Commit 7efad3a

Browse files
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.
1 parent dd0c2e4 commit 7efad3a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vulkaninfo/vulkaninfo.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ void DumpVkVideoProfileInfoKHRCustom(Printer &p, std::string name, const VkVideo
634634

635635
void GpuDumpVideoProfiles(Printer &p, AppGpu &gpu, bool show_video_props) {
636636
p.SetHeader();
637-
ArrayWrapper video_profiles_obj(p, "Video Profiles", gpu.video_profiles.size());
637+
ObjectWrapper video_profiles_obj(p, "Video Profiles", gpu.video_profiles.size());
638638
IndentWrapper indent_outer(p);
639639

640640
if (p.Type() != OutputType::text || show_video_props) {
@@ -879,7 +879,9 @@ void PrintProfileBaseInfo(Printer &p, const std::string &device_name, uint32_t a
879879
p.PrintKeyString("api-version", APIVersion(apiVersion).str());
880880
p.PrintKeyString("label", device_label);
881881
p.PrintKeyString("description", std::string("Exported from ") + APP_SHORT_NAME);
882-
{ ObjectWrapper contributors(p, "contributors"); }
882+
{
883+
ObjectWrapper contributors(p, "contributors");
884+
}
883885
{
884886
ArrayWrapper contributors(p, "history");
885887
ObjectWrapper element(p, "");

0 commit comments

Comments
 (0)