diff options
| author | Charles Giessen <charles@lunarg.com> | 2024-02-09 09:46:57 -0600 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2024-02-12 13:22:34 -0600 |
| commit | d7db171ca5e201d931a3fa94626f3d8d6bc099fe (patch) | |
| tree | 5b2ad86afb5679ec1de94c8ec264677aae170e48 /scripts | |
| parent | f24bab1ea1c521cd77991260cad1b11384eec5f0 (diff) | |
| download | usermoji-d7db171ca5e201d931a3fa94626f3d8d6bc099fe.tar.xz | |
vulkaninfo: Fix text output for HostImageCopyPropertiesEXT
Was missing a new line & underline of the title. Also forgot to check if
the extension was supported.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index d5008d10..6da95966 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -655,8 +655,10 @@ def PrintStructure(struct, types_to_gen): out += f' for (uint32_t i = 0; i < {v.arrayLength}; i++) {{ p.PrintElement(obj.{v.name}[i]); }}\n' out += ' }\n' else: # dynamic array length based on other member - out += ' {\n' - out += f' ArrayWrapper arr(p,"{v.name}", obj.' + v.arrayLength + ');\n' + out += f' if (obj.{v.arrayLength} == 0) {{\n' + out += f' p.PrintKeyValue("{v.name}", "NULL");\n' + out += ' } else {\n' + out += f' ArrayWrapper arr(p,"{v.name}", obj.{v.arrayLength});\n' out += f' for (uint32_t i = 0; i < obj.{v.arrayLength}; i++) {{\n' if v.typeID in types_to_gen: out += f' if (obj.{v.name} != nullptr) {{\n' |
