From ec76459d6fdf587ea97f2be6dc7f76a96bcbb03b Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 14 Jun 2021 15:30:37 -0600 Subject: vulkaninfo: Dont print None in vkconfig output vkconfig prints arrays as it finds them, even if there is only a "None" element in it. This commit prevents this element from being printed, removing confusing results where there is a `count = 1` but contains "None". Change-Id: I1ef8c63458728a9fd3dc531dc9983f309c851034 --- scripts/vulkaninfo_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/vulkaninfo_generator.py') diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index dfa2e0e7..4bec23f3 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -456,7 +456,8 @@ def PrintFlags(bitmask, name): out += " if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; }\n" out += " if (static_cast<" + bitmask.name + ">(value) == 0) {\n" out += " ArrayWrapper arr(p, name, 0);\n" - out += " p.SetAsType().PrintString(\"None\");\n" + out += " if (p.Type() != OutputType::vkconfig_output)\n" + out += " p.SetAsType().PrintString(\"None\");\n" out += " return;\n" out += " }\n" out += " auto strings = " + bitmask.name + \ -- cgit v1.2.3