diff options
| author | Charles Giessen <charles@lunarg.com> | 2025-06-20 17:16:36 -0500 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-06-30 11:21:10 -0500 |
| commit | 68441fe74bdc2b0722a630e5b357546728696a0f (patch) | |
| tree | 3fc2265d803cdf145dcf67502cb60c90950e40e5 | |
| parent | 778f40980928dec4f38f4f9b5360a09ac32df95e (diff) | |
| download | usermoji-68441fe74bdc2b0722a630e5b357546728696a0f.tar.xz | |
vulkaninfo: Pretty print vendorID and deviceID in codegen
| -rw-r--r-- | scripts/vulkaninfo_generator.py | 2 | ||||
| -rw-r--r-- | vulkaninfo/generated/vulkaninfo.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index 221d15c5..4879c2e8 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -1145,7 +1145,7 @@ def PrintStructure(struct): out += f' p.PrintKeyBool("{v.name}", static_cast<bool>(obj.{v.name}));\n' elif v.typeID == 'uint8_t': out += f' p.PrintKeyValue("{v.name}", static_cast<uint32_t>(obj.{v.name}));\n' - elif v.typeID == 'VkDeviceSize': + elif v.typeID == 'VkDeviceSize' or (v.typeID == 'uint32_t' and v.name in ['vendorID', 'deviceID']): out += f' p.PrintKeyValue("{v.name}", to_hex_str(p, obj.{v.name}));\n' elif v.typeID in PREDEFINED_TYPES: out += f' p.PrintKeyValue("{v.name}", obj.{v.name});\n' diff --git a/vulkaninfo/generated/vulkaninfo.hpp b/vulkaninfo/generated/vulkaninfo.hpp index 0fbf74b5..516ef5c4 100644 --- a/vulkaninfo/generated/vulkaninfo.hpp +++ b/vulkaninfo/generated/vulkaninfo.hpp @@ -3685,8 +3685,8 @@ void DumpVkPhysicalDeviceInlineUniformBlockProperties(Printer &p, std::string na void DumpVkPhysicalDeviceLayeredApiPropertiesKHR(Printer &p, std::string name, const VkPhysicalDeviceLayeredApiPropertiesKHR &obj) { ObjectWrapper object{p, name}; p.SetMinKeyWidth(15); - p.PrintKeyValue("vendorID", obj.vendorID); - p.PrintKeyValue("deviceID", obj.deviceID); + p.PrintKeyValue("vendorID", to_hex_str(p, obj.vendorID)); + p.PrintKeyValue("deviceID", to_hex_str(p, obj.deviceID)); DumpVkPhysicalDeviceLayeredApiKHR(p, "layeredAPI", obj.layeredAPI); p.PrintKeyString("deviceName", obj.deviceName); } |
