| 20 | |
| 21 | @dataclass |
| 22 | class Extension: |
| 23 | """<extension>""" |
| 24 | name: str # ex) VK_KHR_SURFACE |
| 25 | nameString: str # macro with string, ex) VK_KHR_SURFACE_EXTENSION_NAME |
| 26 | specVersion: str # macro with string, ex) VK_KHR_SURFACE_SPEC_VERSION |
| 27 | specVersionValue: int # value of specVersion macro, ex) 25 for VK_KHR_surface |
| 28 | |
| 29 | # Only one will be True, the other is False |
| 30 | instance: bool |
| 31 | device: bool |
| 32 | |
| 33 | depends: (str | None) |
| 34 | vendorTag: (str | None) # ex) EXT, KHR, etc |
| 35 | platform: (str | None) # ex) android |
| 36 | protect: (str | None) # ex) VK_USE_PLATFORM_ANDROID_KHR |
| 37 | provisional: bool |
| 38 | promotedTo: (str | None) # ex) VK_VERSION_1_1 |
| 39 | deprecatedBy: (str | None) |
| 40 | obsoletedBy: (str | None) |
| 41 | specialUse: list[str] |
| 42 | featureRequirement: list[FeatureRequirement] |
| 43 | ratified: bool |
| 44 | |
| 45 | # These are here to allow for easy reverse lookups |
| 46 | # To prevent infinite recursion, other classes reference a string back to the Extension class |
| 47 | # Quotes allow us to forward declare the dataclass |
| 48 | handles: list['Handle'] = field(default_factory=list, init=False) |
| 49 | commands: list['Command'] = field(default_factory=list, init=False) |
| 50 | structs: list['Struct'] = field(default_factory=list, init=False) |
| 51 | enums: list['Enum'] = field(default_factory=list, init=False) |
| 52 | bitmasks: list['Bitmask'] = field(default_factory=list, init=False) |
| 53 | flags: list['Flags'] = field(default_factory=list, init=False) |
| 54 | # Use the Enum name to see what fields are extended |
| 55 | enumFields: dict[str, list['EnumField']] = field(default_factory=dict, init=False) |
| 56 | # Use the Bitmask name to see what flag bits are added to it |
| 57 | flagBits: dict[str, list['Flag']] = field(default_factory=dict, init=False) |
| 58 | |
| 59 | @dataclass |
| 60 | class Version: |