Update for Vulkan-Docs 1.2.175

This commit is contained in:
Jon Leech
2021-04-13 02:38:07 -07:00
committed by Jon Leech
parent e1d8c4931d
commit e01b006576
8 changed files with 69031 additions and 36569 deletions

View File

@@ -410,6 +410,23 @@ class COutputGenerator(OutputGenerator):
strVal += "static_cast<" + typeStr + ">(" + number + ")"
body = 'static constexpr ' + typeStr.ljust(9) + name.ljust(33) + ' {' + strVal + '};'
self.appendSection('enum', body)
elif enuminfo.elem.get('type') and not alias:
# Generate e.g.: #define x (~0ULL)
typeStr = enuminfo.elem.get('type');
invert = '~' in strVal
paren = '(' in strVal
number = strVal.strip("()~UL")
if typeStr != "float":
if typeStr == "uint64_t":
number += 'ULL'
else:
number += 'U'
strVal = "~" if invert else ""
strVal += number
if paren:
strVal = "(" + strVal + ")";
body = '#define ' + name.ljust(33) + ' ' + strVal;
self.appendSection('enum', body)
else:
body = '#define ' + name.ljust(33) + ' ' + strVal
self.appendSection('enum', body)