2019-03-17 06:05:46 -07:00
|
|
|
#!/usr/bin/python3 -i
|
|
|
|
#
|
|
|
|
# Copyright (c) 2013-2019 The Khronos Group Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# Base class for working-group-specific style conventions,
|
|
|
|
# used in generation.
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
from enum import Enum
|
2019-03-17 06:05:46 -07:00
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
# Type categories that respond "False" to isStructAlwaysValid
|
|
|
|
# basetype is home to typedefs like ..Bool32
|
|
|
|
CATEGORIES_REQUIRING_VALIDATION = set(('handle',
|
|
|
|
'enum',
|
|
|
|
'bitmask',
|
|
|
|
'basetype',
|
|
|
|
None))
|
2019-03-17 06:05:46 -07:00
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
# These are basic C types pulled in via openxr_platform_defines.h
|
|
|
|
TYPES_KNOWN_ALWAYS_VALID = set(('char',
|
|
|
|
'float',
|
|
|
|
'int8_t', 'uint8_t',
|
|
|
|
'int32_t', 'uint32_t',
|
|
|
|
'int64_t', 'uint64_t',
|
|
|
|
'size_t',
|
|
|
|
'uintptr_t',
|
|
|
|
'int',
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
class ProseListFormats(Enum):
|
|
|
|
"""A connective, possibly with a quantifier."""
|
|
|
|
AND = 0
|
|
|
|
EACH_AND = 1
|
|
|
|
OR = 2
|
|
|
|
ANY_OR = 3
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def from_string(cls, s):
|
|
|
|
if s == 'or':
|
|
|
|
return cls.OR
|
|
|
|
if s == 'and':
|
|
|
|
return cls.AND
|
|
|
|
return None
|
|
|
|
|
|
|
|
@property
|
|
|
|
def connective(self):
|
|
|
|
if self in (ProseListFormats.OR, ProseListFormats.ANY_OR):
|
|
|
|
return 'or'
|
|
|
|
return 'and'
|
|
|
|
|
|
|
|
def quantifier(self, n):
|
|
|
|
"""Return the desired quantifier for a list of a given length."""
|
|
|
|
if self == ProseListFormats.ANY_OR:
|
|
|
|
if n > 1:
|
|
|
|
return 'any of '
|
|
|
|
elif self == ProseListFormats.EACH_AND:
|
|
|
|
if n > 2:
|
|
|
|
return 'each of '
|
|
|
|
if n == 2:
|
|
|
|
return 'both of '
|
|
|
|
return ''
|
|
|
|
|
|
|
|
|
|
|
|
class ConventionsBase:
|
2019-03-17 06:05:46 -07:00
|
|
|
"""WG-specific conventions."""
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
def __init__(self):
|
|
|
|
self._command_prefix = None
|
|
|
|
self._type_prefix = None
|
|
|
|
|
2019-03-17 06:05:46 -07:00
|
|
|
def formatExtension(self, name):
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
"""Mark up a name as an extension for the spec.
|
|
|
|
|
|
|
|
Must implement."""
|
2019-03-17 06:05:46 -07:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
@property
|
|
|
|
def null(self):
|
|
|
|
"""Preferred spelling of NULL."""
|
|
|
|
raise NotImplementedError
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
def makeProseList(self, elements, fmt=ProseListFormats.AND, with_verb=False, *args, **kwargs):
|
2019-03-17 06:05:46 -07:00
|
|
|
"""Make a (comma-separated) list for use in prose.
|
|
|
|
|
|
|
|
Adds a connective (by default, 'and')
|
|
|
|
before the last element if there are more than 1.
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
Adds the right one of "is" or "are" to the end if with_verb is true.
|
|
|
|
|
|
|
|
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
|
|
|
if specified by fmt.
|
|
|
|
|
2019-03-17 06:05:46 -07:00
|
|
|
Override with a different method or different call to
|
|
|
|
_implMakeProseList if you want to add a comma for two elements,
|
|
|
|
or not use a serial comma.
|
|
|
|
"""
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
return self._implMakeProseList(elements, fmt, with_verb, *args, **kwargs)
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
@property
|
|
|
|
def struct_macro(self):
|
|
|
|
"""Get the appropriate format macro for a structure.
|
|
|
|
|
|
|
|
May override.
|
|
|
|
"""
|
|
|
|
return 'sname:'
|
|
|
|
|
|
|
|
@property
|
|
|
|
def external_macro(self):
|
|
|
|
"""Get the appropriate format macro for an external type like uint32_t.
|
|
|
|
|
|
|
|
May override.
|
|
|
|
"""
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
return 'code:'
|
|
|
|
|
|
|
|
def makeStructName(self, name):
|
|
|
|
"""Prepend the appropriate format macro for a structure to a structure type name.
|
|
|
|
|
|
|
|
Uses struct_macro, so just override that if you want to change behavior.
|
|
|
|
"""
|
|
|
|
return self.struct_macro + name
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
def makeExternalTypeName(self, name):
|
|
|
|
"""Prepend the appropriate format macro for an external type like uint32_t to a type name.
|
|
|
|
|
|
|
|
Uses external_macro, so just override that if you want to change behavior.
|
|
|
|
"""
|
|
|
|
return self.external_macro + name
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
def _implMakeProseList(self, elements, fmt, with_verb, comma_for_two_elts=False, serial_comma=True):
|
2019-03-17 06:05:46 -07:00
|
|
|
"""Internal-use implementation to make a (comma-separated) list for use in prose.
|
|
|
|
|
|
|
|
Adds a connective (by default, 'and')
|
|
|
|
before the last element if there are more than 1,
|
|
|
|
and only includes commas if there are more than 2
|
|
|
|
(if comma_for_two_elts is False).
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
Adds the right one of "is" or "are" to the end if with_verb is true.
|
|
|
|
|
|
|
|
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
|
|
|
if specified by fmt.
|
|
|
|
|
2019-03-17 06:05:46 -07:00
|
|
|
Don't edit these defaults, override self.makeProseList().
|
|
|
|
"""
|
|
|
|
assert(serial_comma) # didn't implement what we didn't need
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
if isinstance(fmt, str):
|
|
|
|
fmt = ProseListFormats.from_string(fmt)
|
|
|
|
|
2019-03-17 06:05:46 -07:00
|
|
|
my_elts = list(elements)
|
|
|
|
if len(my_elts) > 1:
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
my_elts[-1] = '{} {}'.format(fmt.connective, my_elts[-1])
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
if not comma_for_two_elts and len(my_elts) <= 2:
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
prose = ' '.join(my_elts)
|
|
|
|
else:
|
|
|
|
prose = ', '.join(my_elts)
|
|
|
|
|
|
|
|
quantifier = fmt.quantifier(len(my_elts))
|
|
|
|
|
|
|
|
parts = [quantifier, prose]
|
|
|
|
|
|
|
|
if with_verb:
|
|
|
|
if len(my_elts) > 1:
|
|
|
|
parts.append(' are')
|
|
|
|
else:
|
|
|
|
parts.append(' is')
|
|
|
|
return ''.join(parts)
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
@property
|
|
|
|
def file_suffix(self):
|
|
|
|
"""Return suffix of generated Asciidoctor files"""
|
|
|
|
raise NotImplementedError
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
def api_name(self, spectype=None):
|
|
|
|
"""Return API or specification name for citations in ref pages.
|
|
|
|
|
|
|
|
spectype is the spec this refpage is for.
|
|
|
|
'api' (the default value) is the main API Specification.
|
|
|
|
If an unrecognized spectype is given, returns None.
|
|
|
|
|
|
|
|
Must implement."""
|
2019-03-17 06:05:46 -07:00
|
|
|
raise NotImplementedError
|
|
|
|
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
def should_insert_may_alias_macro(self, genOpts):
|
|
|
|
"""Return true if we should insert a "may alias" macro in this file.
|
|
|
|
|
|
|
|
Only used by OpenXR right now."""
|
|
|
|
return False
|
|
|
|
|
|
|
|
@property
|
|
|
|
def command_prefix(self):
|
|
|
|
"""Return the expected prefix of commands/functions.
|
|
|
|
|
|
|
|
Implemented in terms of api_prefix."""
|
|
|
|
if not self._command_prefix:
|
|
|
|
self._command_prefix = self.api_prefix[:].replace('_', '').lower()
|
|
|
|
return self._command_prefix
|
|
|
|
|
|
|
|
@property
|
|
|
|
def type_prefix(self):
|
|
|
|
"""Return the expected prefix of type names.
|
|
|
|
|
|
|
|
Implemented in terms of command_prefix (and in turn, api_prefix)."""
|
|
|
|
if not self._type_prefix:
|
|
|
|
self._type_prefix = ''.join(
|
|
|
|
(self.command_prefix[0:1].upper(), self.command_prefix[1:]))
|
|
|
|
return self._type_prefix
|
|
|
|
|
2019-03-17 06:05:46 -07:00
|
|
|
@property
|
|
|
|
def api_prefix(self):
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
"""Return API token prefix.
|
|
|
|
|
|
|
|
Typically two uppercase letters followed by an underscore.
|
|
|
|
|
|
|
|
Must implement."""
|
2019-03-17 06:05:46 -07:00
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
@property
|
|
|
|
def api_version_prefix(self):
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
"""Return API core version token prefix.
|
|
|
|
|
|
|
|
Implemented in terms of api_prefix.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return self.api_prefix + 'VERSION_'
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
@property
|
|
|
|
def KHR_prefix(self):
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
"""Return extension name prefix for KHR extensions.
|
|
|
|
|
|
|
|
Implemented in terms of api_prefix.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return self.api_prefix + 'KHR_'
|
2019-03-17 06:05:46 -07:00
|
|
|
|
|
|
|
@property
|
|
|
|
def EXT_prefix(self):
|
Change log for August 17, 2019 Vulkan 1.1.120 spec update:
* Update release number to 120.
Github Issues:
* Add slink:VkAccelerationStructureTypeNV explicitly to extension XML for
`<<VK_NV_ray_tracing>>` (public issue 848).
* Add missing valid usage statements for feature flags in
slink:VkCommandBufferInheritanceInfo (public pull request 1017).
Internal Issues:
* Clarify behavior of non-premultiplied destination colors for
`<<VK_EXT_blend_operation_advanced>>` prior to the definition of
slink:VkBlendOverlapEXT (internal issue 1766).
* Fix the confusing phrasing "`no other queue must: be (doing something)`"
for flink:vkQueuePresentKHR, flink:vkQueueSubmit, and
flink:vkQueueBindSparse (internal issue 1774).
* Add `<<VK_EXT_validation_features>>` flag to enable best practices
checks, which will soon be available in the validation layer (internal
issue 1779).
* Specify allowed characters for VUID tag name components in the style
guide (internal issue 1788).
* Update links to SPIR-V extension specifications, and parameterize their
markup in case the URLs change in the future (internal issue 1797).
* Fix an off-by-one error in the valid usage statement for
slink:VkPipelineExecutableInfoKHR (internal merge request 3303).
* Clean up markup indentation not matching the style guide (internal merge
request 3314).
* Minor script updates to allow refpage aliases, generate a dynamic TOC
for refpages, generate Apache rewrite rules for aliases, open external
links from refpages in a new window, and synchronize with the OpenCL
scripts. This will shortly enable a paned navigation setup for refpages,
similar to the OpenCL 2.2 refpages (internal merge request 3322).
* Script updates to add tests to the checker, refactor and reformat code,
generate better text for some valid usage statements, use more Pythonic
idioms, and synchronize with the OpenXR scripts (internal merge request
3239).
* Script updates and minor fixes in spec language to not raise checker
errors for refpage markup of pages not existing in the API, such as
VKAPI_NO_STDINT_H. Remove corresponding suppression of some
check_spec_links.py tests from .gitlab-ci.yml and 'allchecks' target
(internal merge request 3315).
2019-08-17 15:33:21 -07:00
|
|
|
"""Return extension name prefix for EXT extensions.
|
|
|
|
|
|
|
|
Implemented in terms of api_prefix.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return self.api_prefix + 'EXT_'
|
|
|
|
|
|
|
|
def writeFeature(self, featureExtraProtect, filename):
|
|
|
|
"""Return True if OutputGenerator.endFeature should write this feature.
|
|
|
|
|
|
|
|
Defaults to always True.
|
|
|
|
Used in COutputGenerator.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return True
|
|
|
|
|
|
|
|
def requires_error_validation(self, return_type):
|
|
|
|
"""Return True if the return_type element is an API result code
|
|
|
|
requiring error validation.
|
|
|
|
|
|
|
|
Defaults to always False.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return False
|
|
|
|
|
|
|
|
@property
|
|
|
|
def required_errors(self):
|
|
|
|
"""Return a list of required error codes for validation.
|
|
|
|
|
|
|
|
Defaults to an empty list.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return []
|
|
|
|
|
|
|
|
def is_voidpointer_alias(self, tag, text, tail):
|
|
|
|
"""Return True if the declaration components (tag,text,tail) of an
|
|
|
|
element represents a void * type.
|
|
|
|
|
|
|
|
Defaults to a reasonable implementation.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return tag == 'type' and text == 'void' and tail.startswith('*')
|
|
|
|
|
|
|
|
def make_voidpointer_alias(self, tail):
|
|
|
|
"""Reformat a void * declaration to include the API alias macro.
|
|
|
|
|
|
|
|
Defaults to a no-op.
|
|
|
|
|
|
|
|
Must override if you actually want to use this feature in your project."""
|
|
|
|
return tail
|
|
|
|
|
|
|
|
def category_requires_validation(self, category):
|
|
|
|
"""Return True if the given type 'category' always requires validation.
|
|
|
|
|
|
|
|
Defaults to a reasonable implementation.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return category in CATEGORIES_REQUIRING_VALIDATION
|
|
|
|
|
|
|
|
def type_always_valid(self, typename):
|
|
|
|
"""Return True if the given type name is always valid (never requires validation).
|
|
|
|
|
|
|
|
This is for things like integers.
|
|
|
|
|
|
|
|
Defaults to a reasonable implementation.
|
|
|
|
|
|
|
|
May override."""
|
|
|
|
return typename in TYPES_KNOWN_ALWAYS_VALID
|
Change log for September 8, 2019 Vulkan 1.1.122 spec update:
* Update release number to 122.
Internal Issues:
* Add style guide language on not using standalone `+` signs (internal
issue 736); not using leading whitespace for markup (internal issue
747); and on keeping descriptions of a single API in a contiguous block
of markup (internal issue 949), and apply them to the specification.
* Add a glossary definition of "`constant integral expression`", pointing
to the SPIR-V "`constant instruction`" definition (internal issue 1225).
* Many minor edits to improve writing style consistency and capture
additional style guidelines (internal issue 1553).
* Clarify that <<fragops-depth-write, depth writes are not performed>> if
there is no depth framebuffer attachment (internal issue 1771).
* Allow implementations to use rectangular line style of interpolation for
<<primsrast-lines-bresenham, wide Bresenham lines>>, though replicating
attributes is still preferred. Clarify that code:FragCoord is not
replicated (internal issue 1772).
* Resolve a contradiction in valid usage statements for
slink:VkImageCreateInfo and slink:VkImageStencilUsageCreateInfoEXT
(internal issue 1773).
* Add style guide discussion of markup for indented equations, and use
markup workaround for asciidoctor 2 compatibility (internal issue 1793).
* Deprecate the `<<VK_EXT_validation_flags>>` extension in `vk.xml` and
the extension appendix (internal issue 1801).
* Add a new checker script `scripts/xml_consistency.py`. This is not
currently run as part of internal CI (internal merge request 3285).
* Correct "`an`" -> "`a`" prepositions where needed (internal merge
request 3334).
* Clarify that the <<features-uniformBufferStandardLayout,
pname:uniformBufferStandardLayout>> feature is only required when the
extension defining it is supported (internal merge request 3341).
* Bring scripts into closer sync with OpenXR, mainly through conversion of
comments to docstrings where appropriate, and add gen-scripts-docs.sh
(internal merge request 3324).
* Correct pname:maxDrawMeshTasksCount to 2^16^-1 in the <<limits-required,
Required Limits>> table (internal merge requests 3361).
New Extensions
* `<<VK_IMG_format_pvrtc>>` (public issue 512).
2019-09-08 20:41:02 -07:00
|
|
|
|
|
|
|
@property
|
|
|
|
def should_skip_checking_codes(self):
|
|
|
|
"""Return True if more than the basic validation of return codes should
|
|
|
|
be skipped for a command."""
|
|
|
|
|
|
|
|
return False
|