diff options
author | Jon Leech <[email protected]> | 2023-11-26 21:52:30 -0800 |
---|---|---|
committer | Jon Leech <[email protected]> | 2023-11-26 21:54:32 -0800 |
commit | 9d27c893cdfc8d96bc8ad5f6f4d88743f958305e (patch) | |
tree | 4c64138e76f1149bd484cfaccf9f7e9d21cdae48 /registry/vkconventions.py | |
parent | 7d92fe7b687eb92dafb5d344d1f4c817780cd3ce (diff) | |
download | Vulkan-Headers-9d27c893cdfc8d96bc8ad5f6f4d88743f958305e.tar.gz Vulkan-Headers-9d27c893cdfc8d96bc8ad5f6f4d88743f958305e.zip |
Update for Vulkan-Docs 1.3.271v1.3.271
Diffstat (limited to 'registry/vkconventions.py')
-rwxr-xr-x | registry/vkconventions.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/registry/vkconventions.py b/registry/vkconventions.py index b4e7966..6f0edd7 100755 --- a/registry/vkconventions.py +++ b/registry/vkconventions.py @@ -50,9 +50,21 @@ class VulkanConventions(ConventionsBase): """Preferred spelling of NULL.""" return '`NULL`' + def formatVersion(self, name, apivariant, major, minor): + """Mark up an API version name as a link in the spec.""" + version = f'{major}.{minor}' + if apivariant == 'VKSC': + # Vulkan SC has a different anchor pattern for version appendices + if version == '1.0': + return 'Vulkan SC 1.0' + else: + return f'<<versions-sc-{version}, Version SC {version}>>' + else: + return f'<<versions-{version}, Version {version}>>' + def formatExtension(self, name): - """Mark up an extension name as a link the spec.""" - return '`apiext:{}`'.format(name) + """Mark up an extension name as a link in the spec.""" + return f'apiext:{name}' @property def struct_macro(self): |