vulkaninfo: new vkconfig_output backdend
authorCharles Giessen <charles@lunarg.com>
Thu, 17 Oct 2019 22:21:45 +0000 (16:21 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Wed, 12 Feb 2020 23:00:18 +0000 (16:00 -0700)
commitdb0a1553991d3d00ee58a7c0de3510ca1415eb75
tree1a8dce2be39faf43be853a28c89ce3537701a988
parent45b9d01815d916a61c66c0c178aad132e19ada47
vulkaninfo: new vkconfig_output backdend

This commit adds a new backend, vkconfig_output, that prints the same information
as the text & html versions in a json format. This output will only be used in
vkconfig. Therefore it does not have a documented flag, but it is accesible with
'--vkconfig_output'.

Many parts of the code needed refactoring to handle the vkconfig_output output.
Replacing PrintElement with PrintString, requiring StartObject instead of
StartArray, and removing many branches to make the code simpler to read.

vkconfig_output does not nest json objects within json arrays, thus keeping every
non-leaf node of a json object named.

files modified
 - scripts/vulkaninfo_generator.py
 - vulkaninfo/generated/vulkaninfo.hpp
 - vulkaninfo/outputprinter.h
 - vulkaninfo/vulkaninfo.cpp
 - vulkaninfo/vulkaninfo.h

Change-Id: I33d036a75b65942db1ad62b2a1e0c341a2b5e36c
scripts/vulkaninfo_generator.py
vulkaninfo/generated/vulkaninfo.hpp
vulkaninfo/outputprinter.h
vulkaninfo/vulkaninfo.cpp
vulkaninfo/vulkaninfo.h