aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2021-11-29 15:06:59 -0700
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2022-02-02 16:22:12 -0700
commitce6a1491d6317d5311a939be50d854865018eee7 (patch)
tree9d5bc4befd562b31cf29c48cdf4c6361f7aa0601 /vulkaninfo/vulkaninfo.cpp
parenta535700b830b570146b7aa4f82c01373330629cd (diff)
downloadusermoji-ce6a1491d6317d5311a939be50d854865018eee7.tar.xz
vulkaninfo: Refactor printer to use stack for data
The output printer kept track of variables that should of been per object or array in a single variable for the entire output. This commit refactors the code to store data in a new StackNode struct such that pushing and poping the stack is how to save and restore the top node's properties, such as the indent, min_width, and if it is an array or object. It allows behavior such as a parent object ignoring the width output but its children respecting it.
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
-rw-r--r--vulkaninfo/vulkaninfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp
index a2e8e77d..6007687f 100644
--- a/vulkaninfo/vulkaninfo.cpp
+++ b/vulkaninfo/vulkaninfo.cpp
@@ -142,9 +142,8 @@ void DumpPresentModes(Printer &p, AppSurface &surface) {
void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurface &surface) {
auto &surf_cap = surface.surface_capabilities;
- p.SetSubHeader().SetIgnoreMinWidth();
+ p.SetSubHeader().SetIgnoreMinWidthInChild();
DumpVkSurfaceCapabilitiesKHR(p, "VkSurfaceCapabilitiesKHR", surf_cap);
- p.UnsetIgnoreMinWidth();
if (inst.CheckExtensionEnabled(VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME)) {
p.SetSubHeader();