Update for Vulkan-Docs 1.4.316

This commit is contained in:
Jon Leech 2025-05-30 16:29:15 +01:00 committed by Jon Leech
parent 75ad707a58
commit b11eecd68f
21 changed files with 130348 additions and 165722 deletions

View file

@ -29,14 +29,17 @@ class Extension:
specialUse: list[str]
# These are here to allow for easy reverse lookups
# To prevent infinite recursion, other classes reference a string back to the Extension class
# Quotes allow us to forward declare the dataclass
handles: list['Handle'] = field(default_factory=list, init=False)
commands: list['Command'] = field(default_factory=list, init=False)
enums: list['Enum'] = field(default_factory=list, init=False)
bitmasks: list['Bitmask'] = field(default_factory=list, init=False)
flags: dict[str, list['Flags']] = field(default_factory=dict, init=False)
# Use the Enum name to see what fields are extended
enumFields: dict[str, list['EnumField']] = field(default_factory=dict, init=False)
# Use the Bitmaks name to see what flags are extended
flags: dict[str, list['Flag']] = field(default_factory=dict, init=False)
# Use the Bitmask name to see what flag bits are added to it
flagBits: dict[str, list['Flag']] = field(default_factory=dict, init=False)
@dataclass
class Version:
@ -65,6 +68,8 @@ class Handle:
dispatchable: bool
extensions: list[str] # All extensions that enable the handle
def __lt__(self, other):
return self.name < other.name
@ -133,7 +138,7 @@ class Command:
alias: (str | None) # Because commands are interfaces into layers/drivers, we need all command alias
protect: (str | None) # ex) 'VK_ENABLE_BETA_EXTENSIONS'
extensions: list[Extension] # All extensions that enable the struct
extensions: list[str] # All extensions that enable the struct
version: (Version | None) # None if Version 1.0
returnType: str # ex) void, VkResult, etc
@ -219,7 +224,7 @@ class Struct:
name: str # ex) VkImageSubresource2
aliases: list[str] # ex) ['VkImageSubresource2KHR', 'VkImageSubresource2EXT']
extensions: list[Extension] # All extensions that enable the struct
extensions: list[str] # All extensions that enable the struct
version: (Version | None) # None if Version 1.0
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
@ -242,7 +247,9 @@ class Struct:
@dataclass
class EnumField:
"""<enum> of type enum"""
name: str # ex) VK_DYNAMIC_STATE_SCISSOR
name: str # ex) VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT
aliases: list[str] # ex) ['VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT']
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
negative: bool # True if negative values are allowed (ex. VkResult)
@ -250,7 +257,7 @@ class EnumField:
valueStr: str # value as shown in spec (ex. "0", "2", "1000267000", "0x00000004")
# some fields are enabled from 2 extensions (ex) VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR)
extensions: list[Extension] # None if part of 1.0 core
extensions: list[str] # None if part of 1.0 core
def __lt__(self, other):
return self.name < other.name
@ -268,9 +275,9 @@ class Enum:
fields: list[EnumField]
extensions: list[Extension] # None if part of 1.0 core
extensions: list[str] # None if part of 1.0 core
# Unique list of all extension that are involved in 'fields' (superset of 'extensions')
fieldExtensions: list[Extension]
fieldExtensions: list[str]
def __lt__(self, other):
return self.name < other.name
@ -279,6 +286,8 @@ class Enum:
class Flag:
"""<enum> of type bitmask"""
name: str # ex) VK_ACCESS_2_SHADER_READ_BIT
aliases: str # ex) ['VK_ACCESS_2_SHADER_READ_BIT_KHR']
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
value: int
@ -287,7 +296,7 @@ class Flag:
zero: bool # if true, the value is zero (ex) VK_PIPELINE_STAGE_NONE)
# some fields are enabled from 2 extensions (ex) VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT)
extensions: list[Extension] # None if part of 1.0 core
extensions: list[str] # None if part of 1.0 core
def __lt__(self, other):
return self.name < other.name
@ -306,9 +315,27 @@ class Bitmask:
flags: list[Flag]
extensions: list[Extension] # None if part of 1.0 core
extensions: list[str] # None if part of 1.0 core
# Unique list of all extension that are involved in 'flag' (superset of 'extensions')
flagExtensions: list[Extension]
flagExtensions: list[str]
def __lt__(self, other):
return self.name < other.name
@dataclass
class Flags:
"""<type> defining flags types"""
name: str # ex) VkAccessFlags2
aliases: list[str] # ex) [`VkAccessFlags2KHR`]
bitmaskName: (str | None) # ex) VkAccessFlagBits2
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
baseFlagsType: str # ex) VkFlags
bitWidth: int # 32 or 64
returnedOnly: bool
extensions: list[str] # None if part of 1.0 core
def __lt__(self, other):
return self.name < other.name
@ -422,6 +449,7 @@ class VulkanObject():
structs: dict[str, Struct] = field(default_factory=dict, init=False)
enums: dict[str, Enum] = field(default_factory=dict, init=False)
bitmasks: dict[str, Bitmask] = field(default_factory=dict, init=False)
flags: dict[str, Flags] = field(default_factory=dict, init=False)
formats: dict[str, Format] = field(default_factory=dict, init=False)
syncStage: list[SyncStage] = field(default_factory=list, init=False)