From 59750fe4c72a9295a94e22474060d3a1635e92c8 Mon Sep 17 00:00:00 2001 From: Jon Leech Date: Sun, 25 Aug 2019 03:57:09 -0700 Subject: [PATCH] Change log for August 25, 2019 Vulkan 1.1.121 spec update: * Update release number to 121. Github Issues: * Add missing `structextends` attribute in `vk.xml` for slink:VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR (public issue 1018). * Change attributes of flink:vkCmdCopyAccelerationStructureNV, flink:vkCmdWriteAccelerationStructuresPropertiesNV, flink:vkCmdBuildAccelerationStructureNV, and flink:vkCmdTraceRaysNV to require that these commands execute outside renderpasses (public issue 1021). * Add an issue to the `<>` appendix discussing the introduction of new names and aliasing by equivalent old names (public pull request 1024). Internal Issues: * Protect the `VK_KHR_sampler_mirror_clamp_to_edge` extension with asciidoctor conditionals, and remove it from the core-only specification builds, where it had previously been force-included in the Makefile. It is now treated like any other extension (internal issue 1776). * Edit some asciidoctor anchor names starting with `features-features-` to just start with `features-`, since the old chapters was split into 3 pieces. There are still some mild naming inconsistencies with anchors which may be addressed in the future (internal issue 1792). * Add `KHR` alias for the non-suffixed extension token ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, for compatibility with naming rules for extensions (internal issue 1796). * Clarify requirements for external memory in NOTEs for sname:VkExternalMemoryBufferCreateInfo, and valid usage statements for flink:vkBindBufferMemory, slink:VkBindBufferMemoryInfo, flink:vkBindImageMemory, and slink:VkBindImageMemoryInfo (internal merge request 3301). * Make extension version numbers in `vk.xml` and extension appendices consistent. In a few cases, we could not recover history at this granularity, and left the summary of a version's change undefined (internal merge request 3323). * Fix invocation of `CodeInlineMacro` in the Ruby extension backing the `code:` macro, which was delegating to the wrong base class (internal merge request 3331). * Modify `reg.py` to do a better job of recognizing equivalent definitions. * Add a `sortorder` attribute to XML feature and extension tags. New Extensions * `<>` --- .gitlab/issue_templates/Release checklist.md | 11 +- ChangeLog.txt | 53 +++++++++ Makefile | 12 +- appendices/VK_AMD_device_coherent_memory.txt | 32 ++++++ ...xternal_memory_android_hardware_buffer.txt | 5 + .../VK_EXT_blend_operation_advanced.txt | 4 +- appendices/VK_EXT_buffer_device_address.txt | 12 +- appendices/VK_EXT_descriptor_indexing.txt | 2 + appendices/VK_EXT_hdr_metadata.txt | 3 +- appendices/VK_EXT_headless_surface.txt | 2 +- .../VK_EXT_image_drm_format_modifier.txt | 2 +- appendices/VK_KHR_device_group.txt | 2 +- appendices/VK_KHR_external_fence.txt | 5 + .../VK_KHR_external_fence_capabilities.txt | 5 + appendices/VK_KHR_external_fence_fd.txt | 5 + appendices/VK_KHR_external_fence_win32.txt | 5 + appendices/VK_KHR_external_memory.txt | 5 + .../VK_KHR_external_memory_capabilities.txt | 5 + appendices/VK_KHR_external_memory_fd.txt | 5 + appendices/VK_KHR_external_memory_win32.txt | 5 + appendices/VK_KHR_external_semaphore.txt | 5 + ...VK_KHR_external_semaphore_capabilities.txt | 5 + appendices/VK_KHR_external_semaphore_fd.txt | 5 + .../VK_KHR_external_semaphore_win32.txt | 5 + appendices/VK_KHR_image_format_list.txt | 5 + .../VK_KHR_sampler_mirror_clamp_to_edge.txt | 25 +++- .../VK_KHR_sampler_ycbcr_conversion.txt | 18 +-- appendices/VK_KHR_vulkan_memory_model.txt | 3 + appendices/VK_KHR_win32_keyed_mutex.txt | 5 + appendices/VK_NV_corner_sampled_image.txt | 2 + .../VK_NV_device_diagnostic_checkpoints.txt | 2 + .../VK_NV_external_memory_capabilities.txt | 5 + appendices/VK_NV_shading_rate_image.txt | 5 +- appendices/spirvenv.txt | 10 +- chapters/VK_EXT_debug_utils.txt | 22 ++-- chapters/features.txt | 105 ++++++++++------- chapters/fundamentals.txt | 8 +- chapters/limits.txt | 8 +- chapters/memory.txt | 107 +++++++++++++++++- chapters/pipelines.txt | 12 +- chapters/resources.txt | 88 ++++++++++---- chapters/samplers.txt | 3 +- chapters/shaders.txt | 7 +- config/spec-macros/extension.rb | 2 +- registry.txt | 10 ++ scripts/docgenerator.py | 18 +-- scripts/generator.py | 35 ++++-- scripts/reflow_count.py | 2 +- scripts/reg.py | 87 +++++++++----- xml/registry.rnc | 4 + xml/vk.xml | 58 ++++++---- 51 files changed, 646 insertions(+), 210 deletions(-) create mode 100644 appendices/VK_AMD_device_coherent_memory.txt diff --git a/.gitlab/issue_templates/Release checklist.md b/.gitlab/issue_templates/Release checklist.md index 17cce83c6e..274d55d0af 100644 --- a/.gitlab/issue_templates/Release checklist.md +++ b/.gitlab/issue_templates/Release checklist.md @@ -25,12 +25,12 @@ no MRs in flight that modify behavior defined by the extension and its dependencies. Delete any of the following preconditions that are not relevant to the extension in question_ - - [ ] VAP consulted to the extent the WG considers appropriate - - [ ] CTS tests approved with three passing implementations - - [ ] Vulkan API specification merged and stable in devel - - [ ] SPIR-V specification merged and stable - - [ ] GLSL specification merged and stable + - [ ] Vulkan API specification merged and stable in devel (_MR_) + - [ ] API spec naming review complete + - [ ] CTS tests approved with three passing implementations (_gerrit cl_) + - [ ] SPIR-V specification merged and stable (_MR_) + - [ ] GLSL specification merged and stable (_MR_) ## Preconditions for submission to Promoters @@ -47,7 +47,6 @@ where indicated. Note that these are targets and may slip._ - [ ] SPIR-V specification ratified by Promoters - [ ] GLSL specification ratified by Promoters - [ ] GLSLang implementation release schedule agreed: target _target-date_ - - [ ] Marketing summary written and approved by Vulkan WG and PR team - [ ] Validation layer implementation approved to merge - [ ] Loader support approved to merge (for instance extensions) - [ ] HLSL mapping defined diff --git a/ChangeLog.txt b/ChangeLog.txt index 0b3cb761dc..d01d76aff8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,59 @@ public pull requests that have been accepted. ----------------------------------------------------- +Change log for August 25, 2019 Vulkan 1.1.121 spec update: + + * Update release number to 121. + +Github Issues: + + * Add missing `structextends` attribute in `vk.xml` for + slink:VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR (public + issue 1018). + * Change attributes of flink:vkCmdCopyAccelerationStructureNV, + flink:vkCmdWriteAccelerationStructuresPropertiesNV, + flink:vkCmdBuildAccelerationStructureNV, and flink:vkCmdTraceRaysNV to + require that these commands execute outside renderpasses (public issue + 1021). + * Add an issue to the `<>` appendix + discussing the introduction of new names and aliasing by equivalent old + names (public pull request 1024). + +Internal Issues: + + * Protect the `VK_KHR_sampler_mirror_clamp_to_edge` extension with + asciidoctor conditionals, and remove it from the core-only specification + builds, where it had previously been force-included in the Makefile. It + is now treated like any other extension (internal issue 1776). + * Edit some asciidoctor anchor names starting with `features-features-` to + just start with `features-`, since the old chapters was split into 3 + pieces. There are still some mild naming inconsistencies with anchors + which may be addressed in the future (internal issue 1792). + * Add `KHR` alias for the non-suffixed extension token + ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, for compatibility + with naming rules for extensions (internal issue 1796). + * Clarify requirements for external memory in NOTEs for + sname:VkExternalMemoryBufferCreateInfo, and valid usage statements for + flink:vkBindBufferMemory, slink:VkBindBufferMemoryInfo, + flink:vkBindImageMemory, and slink:VkBindImageMemoryInfo (internal merge + request 3301). + * Make extension version numbers in `vk.xml` and extension appendices + consistent. In a few cases, we could not recover history at this + granularity, and left the summary of a version's change undefined + (internal merge request 3323). + * Fix invocation of `CodeInlineMacro` in the Ruby extension backing the + `code:` macro, which was delegating to the wrong base class (internal + merge request 3331). + * Modify `reg.py` to do a better job of recognizing equivalent + definitions. + * Add a `sortorder` attribute to XML feature and extension tags. + +New Extensions + + * `<>` + +----------------------------------------------------- + Change log for August 17, 2019 Vulkan 1.1.120 spec update: * Update release number to 120. diff --git a/Makefile b/Makefile index 7571612951..f72fc42a6b 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,9 @@ # # To build the specification and reference pages with optional # extensions included, set the $(EXTENSIONS) variable on the make -# command line to a space-separated list of extension names. The -# VK_KHR_sampler_mirror_clamp_to_edge extension which is a required part -# of Vulkan 1.0, is always included. $(EXTENSIONS) is converted into -# asciidoc and generator script arguments $(EXTATTRIBS) and -# $(EXTOPTIONS). +# command line to a space-separated list of extension names. +# $(EXTENSIONS) is converted into asciidoc and generator script +# arguments $(EXTATTRIBS) and $(EXTOPTIONS). # If a recipe fails, delete its target file. Without this cleanup, the leftover # file from the failed recipe can falsely satisfy dependencies on subsequent @@ -38,7 +36,7 @@ VERSIONS := VK_VERSION_1_0 VK_VERSION_1_1 VERSIONATTRIBS := $(foreach version,$(VERSIONS),-a $(version)) VERSIONOPTIONS := $(foreach version,$(VERSIONS),-feature $(version)) -EXTS := $(sort VK_KHR_sampler_mirror_clamp_to_edge $(EXTENSIONS) $(DIFFEXTENSIONS)) +EXTS := $(sort $(EXTENSIONS) $(DIFFEXTENSIONS)) EXTATTRIBS := $(foreach ext,$(EXTS),-a $(ext)) EXTOPTIONS := $(foreach ext,$(EXTS),-extension $(ext)) @@ -121,7 +119,7 @@ VERBOSE = # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 120 +PATCHVERSION = 121 ifneq (,$(findstring VK_VERSION_1_1,$(VERSIONS))) SPECREVISION = 1.1.$(PATCHVERSION) else diff --git a/appendices/VK_AMD_device_coherent_memory.txt b/appendices/VK_AMD_device_coherent_memory.txt new file mode 100644 index 0000000000..e625e9312c --- /dev/null +++ b/appendices/VK_AMD_device_coherent_memory.txt @@ -0,0 +1,32 @@ +include::meta/VK_AMD_device_coherent_memory.txt[] + +*Last Modified Date*:: + 2019-02-04 +*Contributors*:: + - Ping Fu, AMD + - Timothy Lottes, AMD + - Tobias Hector, AMD + +This extension adds the device coherent and device uncached memory types. +Any device accesses to device coherent memory are automatically made visible +to any other device access. +Device uncached memory indicates to applications that caches are disabled +for a particular memory type, which guarantees device coherence. + +Device coherent and uncached memory are expected to have lower performance +for general access than non-device coherent memory, but can be useful in +certain scenarios; particularly so for debugging. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD + + * Extending elink:VkMemoryPropertyFlagBits: + ** ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + ** ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD + +=== Version History + + * Revision 1, 2019-02-04 (Tobias Hector) + - Initial revision diff --git a/appendices/VK_ANDROID_external_memory_android_hardware_buffer.txt b/appendices/VK_ANDROID_external_memory_android_hardware_buffer.txt index 7a120c4f59..41326db84b 100644 --- a/appendices/VK_ANDROID_external_memory_android_hardware_buffer.txt +++ b/appendices/VK_ANDROID_external_memory_android_hardware_buffer.txt @@ -156,3 +156,8 @@ In essence, these are new features added to a new Android API level, rather than new Vulkan features. The extension will only document how existing Vulkan features map to that new Android feature. + +=== Version History + + * Revision 1, 2018-03-04 (Jesse Hall) + - Initial version diff --git a/appendices/VK_EXT_blend_operation_advanced.txt b/appendices/VK_EXT_blend_operation_advanced.txt index 6b315c3469..46458815eb 100644 --- a/appendices/VK_EXT_blend_operation_advanced.txt +++ b/appendices/VK_EXT_blend_operation_advanced.txt @@ -170,5 +170,7 @@ None. === Version History - * Revisions 1-2, 2017-06-12 (Jeff Bolz) + * Revision 1, 2017-06-12 (Jeff Bolz) + - Internal revisions + * Revision 2, 2017-06-12 (Jeff Bolz) - Internal revisions diff --git a/appendices/VK_EXT_buffer_device_address.txt b/appendices/VK_EXT_buffer_device_address.txt index 2351a130fd..514f94ec97 100644 --- a/appendices/VK_EXT_buffer_device_address.txt +++ b/appendices/VK_EXT_buffer_device_address.txt @@ -66,11 +66,19 @@ None === Issues -1) Where is VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT and VkPhysicalDeviceBufferAddressFeaturesEXT? +1) Where is VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT +and VkPhysicalDeviceBufferAddressFeaturesEXT? -*RESOLVED*: They were renamed as ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT and slink:VkPhysicalDeviceBufferDeviceAddressFeaturesEXT accordingly for consistency. Even though, the old names can still be found in the generated header files for compatibility. +*RESOLVED*: They were renamed as +ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT +and slink:VkPhysicalDeviceBufferDeviceAddressFeaturesEXT accordingly for +consistency. +Even though, the old names can still be found in the generated header files +for compatibility. === Version History * Revision 1, 2018-11-01 (Jeff Bolz) - Internal revisions + * Revision 2, 2019-01-06 (Jon Leech) + - Minor updates to appendix for publication diff --git a/appendices/VK_EXT_descriptor_indexing.txt b/appendices/VK_EXT_descriptor_indexing.txt index 5cdcd6d0bc..87e311ff6c 100644 --- a/appendices/VK_EXT_descriptor_indexing.txt +++ b/appendices/VK_EXT_descriptor_indexing.txt @@ -98,3 +98,5 @@ None. * Revision 1, 2017-07-26 (Jeff Bolz) - Internal revisions + * Revision 2, 2017-10-02 (Jeff Bolz) + - ??? diff --git a/appendices/VK_EXT_hdr_metadata.txt b/appendices/VK_EXT_hdr_metadata.txt index 59e3e97558..a381a47757 100644 --- a/appendices/VK_EXT_hdr_metadata.txt +++ b/appendices/VK_EXT_hdr_metadata.txt @@ -1,7 +1,7 @@ include::meta/VK_EXT_hdr_metadata.txt[] *Last Modified Date*:: - 2017-03-04 + 2018-12-19 *IP Status*:: No known IP claims. *Contributors*:: @@ -59,6 +59,5 @@ application can track on its own. * Revision 1, 2016-12-27 (Courtney Goeltzenleuchter) - Initial version - * Revision 2, 2018-12-19 (Courtney Goeltzenleuchter) - Correct implicit validity for VkHdrMetadataEXT structure diff --git a/appendices/VK_EXT_headless_surface.txt b/appendices/VK_EXT_headless_surface.txt index 0002708897..13f27d28a5 100644 --- a/appendices/VK_EXT_headless_surface.txt +++ b/appendices/VK_EXT_headless_surface.txt @@ -58,5 +58,5 @@ None === Version History - * Revision 1 + * Revision 1, 2019-03-21 (Ray Smith) - Initial draft diff --git a/appendices/VK_EXT_image_drm_format_modifier.txt b/appendices/VK_EXT_image_drm_format_modifier.txt index ce210452af..072d590424 100644 --- a/appendices/VK_EXT_image_drm_format_modifier.txt +++ b/appendices/VK_EXT_image_drm_format_modifier.txt @@ -456,5 +456,5 @@ _requires_ the application to set pname:size to 0. ==== Version History - * Revision 1.0, 2018-08-29 (Chad Versace) + * Revision 1, 2018-08-29 (Chad Versace) - First stable revision diff --git a/appendices/VK_KHR_device_group.txt b/appendices/VK_KHR_device_group.txt index e46eba11e7..5c80a25c8f 100644 --- a/appendices/VK_KHR_device_group.txt +++ b/appendices/VK_KHR_device_group.txt @@ -5,7 +5,7 @@ include::meta/VK_KHR_device_group.txt[] *Last Modified Date*:: - 2017-10-06 + 2017-10-10 *IP Status*:: No known IP claims. *Interactions and External Dependencies*:: diff --git a/appendices/VK_KHR_external_fence.txt b/appendices/VK_KHR_external_fence.txt index a1ecf2f123..edab9eb363 100644 --- a/appendices/VK_KHR_external_fence.txt +++ b/appendices/VK_KHR_external_fence.txt @@ -55,3 +55,8 @@ the core functionality. This extension borrows concepts, semantics, and language from `<>`. That extension's issues apply equally to this extension. + +=== Version History + + * Revision 1, 2017-05-08 (Jesse Hall) + - Initial revision diff --git a/appendices/VK_KHR_external_fence_capabilities.txt b/appendices/VK_KHR_external_fence_capabilities.txt index 99df48902f..b8115a9519 100644 --- a/appendices/VK_KHR_external_fence_capabilities.txt +++ b/appendices/VK_KHR_external_fence_capabilities.txt @@ -60,3 +60,8 @@ the core functionality. === Issues None. + +=== Version History + + * Revision 1, 2017-05-08 (Jesse Hall) + - Initial version diff --git a/appendices/VK_KHR_external_fence_fd.txt b/appendices/VK_KHR_external_fence_fd.txt index 0cf41abecd..49cea9b013 100644 --- a/appendices/VK_KHR_external_fence_fd.txt +++ b/appendices/VK_KHR_external_fence_fd.txt @@ -48,3 +48,8 @@ None. This extension borrows concepts, semantics, and language from `<>`. That extension's issues apply equally to this extension. + +=== Version History + + * Revision 1, 2017-05-08 (Jesse Hall) + - Initial revision diff --git a/appendices/VK_KHR_external_fence_win32.txt b/appendices/VK_KHR_external_fence_win32.txt index e333ce9191..300eb3d1f0 100644 --- a/appendices/VK_KHR_external_fence_win32.txt +++ b/appendices/VK_KHR_external_fence_win32.txt @@ -63,3 +63,8 @@ instead of a slink:VkFence, and applications can check status or wait on the D3D12 fence using non-Vulkan APIs. The convenience of being able to do these operations on sname:VkFence objects doesn't justify the extra API complexity. + +=== Version History + + * Revision 1, 2017-05-08 (Jesse Hall) + - Initial revision diff --git a/appendices/VK_KHR_external_memory.txt b/appendices/VK_KHR_external_memory.txt index 6b0ec9310b..8567dc6d98 100644 --- a/appendices/VK_KHR_external_memory.txt +++ b/appendices/VK_KHR_external_memory.txt @@ -260,3 +260,8 @@ provided memory handle cannot be used to complete the requested import operation. However, implementations need not validate handles are of the exact type specified by the application. + +=== Version History + + * Revision 1, 2016-10-20 (James Jones) + - Initial version diff --git a/appendices/VK_KHR_external_memory_capabilities.txt b/appendices/VK_KHR_external_memory_capabilities.txt index 64be592dc8..0dbec1899c 100644 --- a/appendices/VK_KHR_external_memory_capabilities.txt +++ b/appendices/VK_KHR_external_memory_capabilities.txt @@ -125,3 +125,8 @@ versions are not a currently supported configuration on the Windows OS. Should support for such configurations be introduced at the OS level, further Vulkan extensions would be needed to correlate userspace component builds. + +=== Version History + + * Revision 1, 2016-10-17 (James Jones) + - Initial version diff --git a/appendices/VK_KHR_external_memory_fd.txt b/appendices/VK_KHR_external_memory_fd.txt index 9f5d181413..420e904f71 100644 --- a/appendices/VK_KHR_external_memory_fd.txt +++ b/appendices/VK_KHR_external_memory_fd.txt @@ -71,3 +71,8 @@ memory handles created outside of Vulkan be specified? handle. The size will be specified by future extensions that introduce such external memory handle types. + +=== Version History + + * Revision 1, 2016-10-21 (James Jones) + - Initial revision diff --git a/appendices/VK_KHR_external_memory_win32.txt b/appendices/VK_KHR_external_memory_win32.txt index 942fd73d16..d08c987463 100644 --- a/appendices/VK_KHR_external_memory_win32.txt +++ b/appendices/VK_KHR_external_memory_win32.txt @@ -86,3 +86,8 @@ The size is determined by the associated image or buffer memory requirements for external handle types that require dedicated allocations, and by the size specified when creating the object from which the handle was exported for other external handle types. + +=== Version History + + * Revision 1, 2016-10-21 (James Jones) + - Initial revision diff --git a/appendices/VK_KHR_external_semaphore.txt b/appendices/VK_KHR_external_semaphore.txt index 2e3694a8f7..c9fc86f662 100644 --- a/appendices/VK_KHR_external_semaphore.txt +++ b/appendices/VK_KHR_external_semaphore.txt @@ -76,3 +76,8 @@ provided semaphore state handle cannot be used to complete the requested import operation. However, implementations need not validate handles are of the exact type specified by the application. + +=== Version History + + * Revision 1, 2016-10-21 (James Jones) + - Initial revision diff --git a/appendices/VK_KHR_external_semaphore_capabilities.txt b/appendices/VK_KHR_external_semaphore_capabilities.txt index cdefaf5de4..7122b70040 100644 --- a/appendices/VK_KHR_external_semaphore_capabilities.txt +++ b/appendices/VK_KHR_external_semaphore_capabilities.txt @@ -56,3 +56,8 @@ The original type, enum and command names are still available as aliases of the core functionality. === Issues + +=== Version History + + * Revision 1, 2016-10-20 (James Jones) + - Initial revision diff --git a/appendices/VK_KHR_external_semaphore_fd.txt b/appendices/VK_KHR_external_semaphore_fd.txt index 741f84627c..0e88790098 100644 --- a/appendices/VK_KHR_external_semaphore_fd.txt +++ b/appendices/VK_KHR_external_semaphore_fd.txt @@ -54,3 +54,8 @@ application, and a successful import transfers it back to the driver. Destroying the original semaphore object will not close the file descriptor or remove its reference to the underlying semaphore resource associated with it. + +=== Version History + + * Revision 1, 2016-10-21 (Jesse Hall) + - Initial revision diff --git a/appendices/VK_KHR_external_semaphore_win32.txt b/appendices/VK_KHR_external_semaphore_win32.txt index 57eb2ee11f..cc6b8352ab 100644 --- a/appendices/VK_KHR_external_semaphore_win32.txt +++ b/appendices/VK_KHR_external_semaphore_win32.txt @@ -86,3 +86,8 @@ the former is a much simpler API. Since Vulkan tends to favor flexibility and consistency over simplicity, a new structure specifying D3D12 fence acquire and release values is added to the flink:vkQueueSubmit function. + +=== Version History + + * Revision 1, 2016-10-21 (James Jones) + - Initial revision diff --git a/appendices/VK_KHR_image_format_list.txt b/appendices/VK_KHR_image_format_list.txt index f4580c8116..15a2e31ed1 100644 --- a/appendices/VK_KHR_image_format_list.txt +++ b/appendices/VK_KHR_image_format_list.txt @@ -46,3 +46,8 @@ None. None. === Issues + +=== Version History + + * Revision 1, 2017-03-20 (Jason Ekstrand) + - Initial revision diff --git a/appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt b/appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt index a5574176ae..d92f0c9615 100644 --- a/appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt +++ b/appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt @@ -5,9 +5,10 @@ include::meta/VK_KHR_sampler_mirror_clamp_to_edge.txt[] *Last Modified Date*:: - 2016-02-16 + 2019-08-17 *Contributors*:: - Tobias Hector, Imagination Technologies + - Jon Leech, Khronos `VK_KHR_sampler_mirror_clamp_to_edge` extends the set of sampler address modes to include an additional mode @@ -49,7 +50,29 @@ Creating a sampler with the new address mode in each dimension &sampler); ---------------------------------------- +=== Issues + +1) Why are both KHR and core versions of the +ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE token present? + +*RESOLVED*: This functionality was intended to be required in Vulkan 1.0. +We realized shortly before public release that not all implementations could +support it, and moved the functionality into an optional extension, but did +not apply the KHR extension suffix. +Adding a KHR-suffixed alias of the non-suffixed enum has been done to comply +with our own naming rules. + +In a related change, before spec revision 1.1.121 this extension was +hardwiring into the spec Makefile so it was always included with the +Specification, even in the core-only versions. +This has now been reverted, and it is treated as any other extension. + === Version History * Revision 1, 2016-02-16 (Tobias Hector) - Initial draft + * Revision 2, 2019-08-14 (Jon Leech) + - Add KHR-suffixed alias of non-suffixed enum. + * Revision 3, 2019-08-17 (Jon Leech) + - Add an issue explaining the reason for the extension API not being + suffixed with KHR. diff --git a/appendices/VK_KHR_sampler_ycbcr_conversion.txt b/appendices/VK_KHR_sampler_ycbcr_conversion.txt index dea74a5944..aaa248dd4d 100644 --- a/appendices/VK_KHR_sampler_ycbcr_conversion.txt +++ b/appendices/VK_KHR_sampler_ycbcr_conversion.txt @@ -135,22 +135,22 @@ the core functionality. - Added query function, formats as RGB, clarifications * Revision 5, 2017-04 (Andrew Garrard) - Simplified query and removed output conversions - * Version 6, 2017-4-24 (Andrew Garrard) + * Revision 6, 2017-4-24 (Andrew Garrard) - Tidying, incorporated new image query, restored transfer functions - * Version 7, 2017-04-25 (Andrew Garrard) + * Revision 7, 2017-04-25 (Andrew Garrard) - Added cosited option/midpoint requirement for formats, "bypassConversion" - * Version 8, 2017-04-25 (Andrew Garrard) + * Revision 8, 2017-04-25 (Andrew Garrard) - Simplified further - * Version 9, 2017-04-27 (Andrew Garrard) + * Revision 9, 2017-04-27 (Andrew Garrard) - Disjoint no more - * Version 10, 2017-04-28 (Andrew Garrard) + * Revision 10, 2017-04-28 (Andrew Garrard) - Restored disjoint - * Version 11, 2017-04-29 (Andrew Garrard) + * Revision 11, 2017-04-29 (Andrew Garrard) - Now Ycbcr conversion, and KHR - * Version 12, 2017-06-06 (Andrew Garrard) + * Revision 12, 2017-06-06 (Andrew Garrard) - Added conversion to image view creation - * Version 13, 2017-07-13 (Andrew Garrard) + * Revision 13, 2017-07-13 (Andrew Garrard) - Allowed cosited-only chroma samples for formats - * Version 14, 2017-08-11 (Andrew Garrard) + * Revision 14, 2017-08-11 (Andrew Garrard) - Reflected quantization changes in BT.2100-1 diff --git a/appendices/VK_KHR_vulkan_memory_model.txt b/appendices/VK_KHR_vulkan_memory_model.txt index a30bb09e02..5a56f0d9c6 100644 --- a/appendices/VK_KHR_vulkan_memory_model.txt +++ b/appendices/VK_KHR_vulkan_memory_model.txt @@ -52,3 +52,6 @@ change from version 2. * Revision 1, 2018-06-24 (Jeff Bolz) - Initial draft + * Revision 3, 2018-12-10 (Jeff Bolz) + - Add vulkanMemoryModelAvailabilityVisibilityChains member to the + VkPhysicalDeviceVulkanMemoryModelFeaturesKHR structure. diff --git a/appendices/VK_KHR_win32_keyed_mutex.txt b/appendices/VK_KHR_win32_keyed_mutex.txt index efc57fe287..09802fb280 100644 --- a/appendices/VK_KHR_win32_keyed_mutex.txt +++ b/appendices/VK_KHR_win32_keyed_mutex.txt @@ -43,3 +43,8 @@ None. === Issues None. + +=== Version History + + * Revision 1, 2016-10-21 (James Jones) + - Initial revision diff --git a/appendices/VK_NV_corner_sampled_image.txt b/appendices/VK_NV_corner_sampled_image.txt index 4de1096641..f3fc1570f7 100644 --- a/appendices/VK_NV_corner_sampled_image.txt +++ b/appendices/VK_NV_corner_sampled_image.txt @@ -113,3 +113,5 @@ UNRESOLVED: Probaby, but later. * Revision 1, 2018-08-14 (Daniel Koch) - Internal revisions + * Revision 2, 2018-08-14 (Daniel Koch) + - ??? diff --git a/appendices/VK_NV_device_diagnostic_checkpoints.txt b/appendices/VK_NV_device_diagnostic_checkpoints.txt index c272490809..2b4d279059 100644 --- a/appendices/VK_NV_device_diagnostic_checkpoints.txt +++ b/appendices/VK_NV_device_diagnostic_checkpoints.txt @@ -53,3 +53,5 @@ None yet! * Revision 1, 2018-07-16 (Nuno Subtil) - Internal revisions + * Revision 2, 2018-07-16 (Nuno Subtil) + - ??? diff --git a/appendices/VK_NV_external_memory_capabilities.txt b/appendices/VK_NV_external_memory_capabilities.txt index e01d94c1a4..9cfaa63772 100644 --- a/appendices/VK_NV_external_memory_capabilities.txt +++ b/appendices/VK_NV_external_memory_capabilities.txt @@ -69,3 +69,8 @@ bitmask values in a single extension for now. Presumably more handle types could be added by separate extensions though, and it would be midly weird to have some platform-specific ones defined in the core spec and some in extensions + +=== Version History + + * Revision 1, 2016-08-19 (James Jones) + - Initial version diff --git a/appendices/VK_NV_shading_rate_image.txt b/appendices/VK_NV_shading_rate_image.txt index 4f602ead38..058e3f13d7 100644 --- a/appendices/VK_NV_shading_rate_image.txt +++ b/appendices/VK_NV_shading_rate_image.txt @@ -1,7 +1,7 @@ include::meta/VK_NV_shading_rate_image.txt[] *Last Modified Date*:: - 2018-09-13 + 2019-07-18 *Contributors*:: - Pat Brown, NVIDIA - Carsten Rohde, NVIDIA @@ -192,8 +192,9 @@ don't have a similar problem. === Version History + * Revision 3, 2019-07-18 (Mathias Schott) + - Fully list extension interfaces in this appendix. * Revision 2, 2018-09-13 (Pat Brown) - Miscellaneous edits preparing the specification for publication. - * Revision 1, 2018-08-08 (Pat Brown) - Internal revisions diff --git a/appendices/spirvenv.txt b/appendices/spirvenv.txt index f3c3694238..733efc2229 100644 --- a/appendices/spirvenv.txt +++ b/appendices/spirvenv.txt @@ -280,19 +280,19 @@ ifdef::VK_INTEL_shader_integer_functions2[] endif::VK_INTEL_shader_integer_functions2[] ifdef::VK_NV_shader_sm_builtins[] [[spirvenv-capabilities-table-shadersmbuiltins]] -| code:ShaderSMBuiltinsNV | <> +| code:ShaderSMBuiltinsNV | <> endif::VK_NV_shader_sm_builtins[] ifdef::VK_EXT_fragment_shader_interlock[] [[spirvenv-capabilities-table-fragmentShaderInterlock]] -| code:FragmentShaderSampleInterlockEXT | <> -| code:FragmentShaderPixelInterlockEXT | <> +| code:FragmentShaderSampleInterlockEXT | <> +| code:FragmentShaderPixelInterlockEXT | <> ifdef::VK_NV_shading_rate_image[] -| code:FragmentShaderShadingRateInterlockEXT | <>, <> +| code:FragmentShaderShadingRateInterlockEXT | <>, <> endif::VK_NV_shading_rate_image[] endif::VK_EXT_fragment_shader_interlock[] ifdef::VK_EXT_shader_demote_to_helper_invocation[] [[spirvenv-capabilities-table-demote]] -| code:DemoteToHelperInvocationEXT | <> +| code:DemoteToHelperInvocationEXT | <> endif::VK_EXT_shader_demote_to_helper_invocation[] |==== diff --git a/chapters/VK_EXT_debug_utils.txt b/chapters/VK_EXT_debug_utils.txt index 82b6cfe561..e4433fb0b7 100644 --- a/chapters/VK_EXT_debug_utils.txt +++ b/chapters/VK_EXT_debug_utils.txt @@ -421,17 +421,17 @@ called. The process to determine if the user's pname:pfnUserCallback is triggered when an event occurs is as follows: - . The implementation will perform a bitwise AND of the event's - elink:VkDebugUtilsMessageSeverityFlagBitsEXT with the - pname:messageSeverity provided during creation of the - slink:VkDebugUtilsMessengerEXT object. - .. If the value is 0, the message is skipped. - . The implementation will perform bitwise AND of the event's - elink:VkDebugUtilsMessageTypeFlagBitsEXT with the pname:messageType - provided during the creation of the slink:VkDebugUtilsMessengerEXT - object. - .. If the value is 0, the message is skipped. - . The callback will trigger a debug message for the current event + . The implementation will perform a bitwise AND of the event's + elink:VkDebugUtilsMessageSeverityFlagBitsEXT with the + pname:messageSeverity provided during creation of the + slink:VkDebugUtilsMessengerEXT object. + .. If the value is 0, the message is skipped. + . The implementation will perform bitwise AND of the event's + elink:VkDebugUtilsMessageTypeFlagBitsEXT with the pname:messageType + provided during the creation of the slink:VkDebugUtilsMessengerEXT + object. + .. If the value is 0, the message is skipped. + . The callback will trigger a debug message for the current event The callback will come directly from the component that detected the event, unless some other layer intercepts the calls for its own purposes (filter diff --git a/chapters/features.txt b/chapters/features.txt index ae4f70b892..4fbe24c5ec 100755 --- a/chapters/features.txt +++ b/chapters/features.txt @@ -1068,8 +1068,8 @@ The sname:VkPhysicalDeviceProtectedMemoryFeatures structure is defined as: include::{generated}/api/structs/VkPhysicalDeviceProtectedMemoryFeatures.txt[] - * [[features-features-protectedMemory]] pname:protectedMemory specifies - whether protected memory is supported. + * [[features-protectedMemory]] pname:protectedMemory specifies whether + protected memory is supported. If the sname:VkPhysicalDeviceProtectedMemoryFeatures structure is included in the pname:pNext chain of slink:VkPhysicalDeviceFeatures2, it is filled @@ -2036,15 +2036,15 @@ include::{generated}/api/structs/VkPhysicalDeviceFragmentShaderInterlockFeatures The members of the sname:VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT structure describe the following features: - * [[features-features-fragmentShaderSampleInterlock]] + * [[features-fragmentShaderSampleInterlock]] pname:fragmentShaderSampleInterlock indicates that the implementation supports the code:FragmentShaderSampleInterlockEXT SPIR-V capability. - * [[features-features-fragmentShaderPixelInterlock]] + * [[features-fragmentShaderPixelInterlock]] pname:fragmentShaderPixelInterlock indicates that the implementation supports the code:FragmentShaderPixelInterlockEXT SPIR-V capability. - * [[features-features-fragmentShaderShadingRateInterlock]] + * [[features-fragmentShaderShadingRateInterlock]] pname:fragmentShaderShadingRateInterlock indicates that the implementation supports the code:FragmentShaderShadingRateInterlockEXT SPIR-V capability. @@ -2186,8 +2186,8 @@ include::{generated}/api/structs/VkPhysicalDeviceCoverageReductionModeFeaturesNV The members of the sname:VkPhysicalDeviceCoverageReductionModeFeaturesNV structure describe the following features: - * [[features-features-coverageReductionMode]] pname:coverageReductionMode - indicates whether the implementation supports coverage reduction modes. + * [[features-coverageReductionMode]] pname:coverageReductionMode indicates + whether the implementation supports coverage reduction modes. See <>. If the sname:VkPhysicalDeviceCoverageReductionModeFeaturesNV structure is @@ -2237,8 +2237,8 @@ include::{generated}/api/structs/VkPhysicalDeviceShaderSMBuiltinsFeaturesNV.txt[ The members of the sname:VkPhysicalDeviceShaderSMBuiltinsFeaturesNV structure describe the following features: - * [[features-features-shadersmbuiltins]] pname:shaderSMBuiltins indicates - whether the implementation supports the SPIR-V code:ShaderSMBuiltinsNV + * [[features-shadersmbuiltins]] pname:shaderSMBuiltins indicates whether + the implementation supports the SPIR-V code:ShaderSMBuiltinsNV capability. If the sname:VkPhysicalDeviceShaderSMBuiltinsFeaturesNV structure is @@ -2295,7 +2295,7 @@ The members of the sname:VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT structure describe the following features: - * [[features-features-shaderDemoteToHelperInvocation]] + * [[features-shaderDemoteToHelperInvocation]] pname:shaderDemoteToHelperInvocation indicates whether the implementation supports the SPIR-V code:DemoteToHelperInvocationEXT capability. @@ -2324,10 +2324,10 @@ include::{generated}/api/structs/VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT The members of the sname:VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT structure describe the following features: - * [[features-features-texelBufferAlignment]] pname:texelBufferAlignment - indicates whether the implementation uses more specific alignment - requirements advertised in - slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT rather than + * [[features-texelBufferAlignment]] pname:texelBufferAlignment indicates + whether the implementation uses more specific alignment requirements + advertised in slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT + rather than slink:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment. If the sname:VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT structure is @@ -2354,9 +2354,9 @@ The members of the sname:VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT structure describe the following features: - * [[features-features-textureCompressionASTC_HDR]] - pname:textureCompressionASTC_HDR indicates whether all of the ASTC HDR - compressed texture formats are supported. + * [[features-textureCompressionASTC_HDR]] pname:textureCompressionASTC_HDR + indicates whether all of the ASTC HDR compressed texture formats are + supported. If this feature is enabled, then the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT and @@ -2404,28 +2404,28 @@ include::{generated}/api/structs/VkPhysicalDeviceLineRasterizationFeaturesEXT.tx The members of the sname:VkPhysicalDeviceLineRasterizationFeaturesEXT structure describe the following features: - * [[features-features-rectangularLines]] pname:rectangularLines indicates - whether the implementation supports <>. + * [[features-bresenhamLines]] pname:bresenhamLines indicates whether the + implementation supports <>. - * [[features-features-bresenhamLines]] pname:bresenhamLines indicates - whether the implementation supports - <>. - * [[features-features-smoothLines]] pname:smoothLines indicates whether - the implementation supports <>. - * [[features-features-stippledRectangularLines]] - pname:stippledRectangularLines indicates whether the implementation - supports <> with + * [[features-stippledRectangularLines]] pname:stippledRectangularLines + indicates whether the implementation supports + <> with ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT lines, or with ename:VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT lines if slink:VkPhysicalDeviceLimits::pname:strictLines is ename:VK_TRUE. - * [[features-features-stippledBresenhamLines]] - pname:stippledBresenhamLines indicates whether the implementation - supports <> with - ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT lines. - * [[features-features-stippledSmoothLines]] pname:stippledSmoothLines + * [[features-stippledBresenhamLines]] pname:stippledBresenhamLines indicates whether the implementation supports <> with + ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT lines. + * [[features-stippledSmoothLines]] pname:stippledSmoothLines indicates + whether the implementation supports <> with ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT lines. If the sname:VkPhysicalDeviceLineRasterizationFeaturesEXT structure is @@ -2449,15 +2449,15 @@ include::{generated}/api/structs/VkPhysicalDeviceSubgroupSizeControlFeaturesEXT. The members of the sname:VkPhysicalDeviceSubgroupSizeControlFeaturesEXT structure describe the following features: - * [[features-features-subgroupSizeControl]] pname:subgroupSizeControl - indicates whether the implementation supports controlling shader - subgroup sizes via the + * [[features-subgroupSizeControl]] pname:subgroupSizeControl indicates + whether the implementation supports controlling shader subgroup sizes + via the ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT flag and the slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT structure. - * [[features-features-computeFullSubgroups]] pname:computeFullSubgroups - indicates whether the implementation supports requiring full subgroups - in compute shaders via the + * [[features-computeFullSubgroups]] pname:computeFullSubgroups indicates + whether the implementation supports requiring full subgroups in compute + shaders via the ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT flag. @@ -2489,6 +2489,27 @@ include::{generated}/validity/structs/VkPhysicalDeviceSubgroupSizeControlFeature endif::VK_EXT_subgroup_size_control[] +ifdef::VK_AMD_device_coherent_memory[] + +[open,refpage='VkPhysicalDeviceCoherentMemoryFeaturesAMD',desc='Structure describing whether device coherent memory can be supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceCoherentMemoryFeaturesAMD structure is defined as: + +include::{generated}/api/structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.txt[] + +The members of the sname:VkPhysicalDeviceCoherentMemoryFeaturesAMD structure +describe the following features: + + * [[features-deviceCoherentMemory]] pname:deviceCoherentMemory indicates + that the implementation supports <>. + +include::{generated}/validity/structs/VkPhysicalDeviceCoherentMemoryFeaturesAMD.txt[] +-- + +endif::VK_AMD_device_coherent_memory[] + + [[features-requirements]] == Feature Requirements @@ -2563,10 +2584,10 @@ ifdef::VK_EXT_scalar_block_layout[] `<>` extension is supported. endif::VK_EXT_scalar_block_layout[] ifdef::VK_EXT_subgroup_size_control[] - * <>, if - the `<>` extension is supported. - * <>, - if the `<>` extension is supported. + * <>, if the + `<>` extension is supported. + * <>, if the + `<>` extension is supported. endif::VK_EXT_subgroup_size_control[] All other features defined in the Specification are optional:. diff --git a/chapters/fundamentals.txt b/chapters/fundamentals.txt index 9afbcf12ba..ded371d098 100644 --- a/chapters/fundamentals.txt +++ b/chapters/fundamentals.txt @@ -722,10 +722,10 @@ device memory. ==== ifdef::VK_VERSION_1_1[] -If the <> feature is -supported, the implementation provides additional guarantees when invalid -usage occurs to prevent values in protected memory from being accessed or -inferred outside of protected operations, as described in +If the <> feature is supported, +the implementation provides additional guarantees when invalid usage occurs +to prevent values in protected memory from being accessed or inferred +outside of protected operations, as described in <>. endif::VK_VERSION_1_1[] diff --git a/chapters/limits.txt b/chapters/limits.txt index d43b78e30c..6263c18056 100644 --- a/chapters/limits.txt +++ b/chapters/limits.txt @@ -560,8 +560,8 @@ range. in bytes, for the pname:offset member of the sname:VkBufferViewCreateInfo structure for texel buffers. ifdef::VK_EXT_texel_buffer_alignment[] - If <> is - enabled, this limit is equivalent to the maximum of the + If <> is enabled, + this limit is equivalent to the maximum of the <> and <> and <>. - If <> is - not enabled, + If <> is not + enabled, endif::VK_EXT_texel_buffer_alignment[] slink:VkBufferViewCreateInfo::pname:offset must: be a multiple of this value. diff --git a/chapters/memory.txt b/chapters/memory.txt index 4b8c4857a1..f381874238 100644 --- a/chapters/memory.txt +++ b/chapters/memory.txt @@ -556,6 +556,49 @@ ifdef::VK_VERSION_1_1[] * ename:VK_MEMORY_PROPERTY_PROTECTED_BIT | ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT endif::VK_VERSION_1_1[] +ifdef::VK_AMD_device_coherent_memory[] + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | + + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | + + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD | + + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD +endif::VK_AMD_device_coherent_memory[] There must: be at least one memory type with both the ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT and @@ -564,16 +607,28 @@ pname:propertyFlags. There must: be at least one memory type with the ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set in its pname:propertyFlags. +ifdef::VK_AMD_device_coherent_memory[] +If the <> feature +is enabled, there must: be at least one memory type with the +ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD bit set in its +pname:propertyFlags. +endif::VK_AMD_device_coherent_memory[] For each pair of elements *X* and *Y* returned in pname:memoryTypes, *X* must: be placed at a lower index position than *Y* if: * either the set of bit flags returned in the pname:propertyFlags member of *X* is a strict subset of the set of bit flags returned in the - pname:propertyFlags member of *Y*. - * or the pname:propertyFlags members of *X* and *Y* are equal, and *X* + pname:propertyFlags member of *Y*; or + * the pname:propertyFlags members of *X* and *Y* are equal, and *X* belongs to a memory heap with greater performance (as determined in an - implementation-specific manner). + implementation-specific manner) +ifdef::VK_AMD_device_coherent_memory[] + ; or + * or the pname:propertyFlags members of *X* includes + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD or + ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD and *Y* does not +endif::VK_AMD_device_coherent_memory[] [NOTE] .Note @@ -588,6 +643,13 @@ But if instead ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT was before ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, the list would still be in a valid order. +ifdef::VK_AMD_device_coherent_memory[] + +There may be a performance penalty for using device coherent or uncached +device memory types, and using these accidentally is undesirable. +In order to avoid this, memory types with these properties always appear at +the end of the list; but are subject to the same rules otherwise. +endif::VK_AMD_device_coherent_memory[] ==== This ordering requirement enables applications to use a simple search loop @@ -790,9 +852,41 @@ ifdef::VK_VERSION_1_1[] ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, or ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT set. endif::VK_VERSION_1_1[] +ifdef::VK_AMD_device_coherent_memory[] + * ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD bit specifies that + device accesses to allocations of this memory type are automatically + made available and visible. + * ename:VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD bit specifies that + memory allocated with this type is not cached on the device. + Uncached device memory is always device coherent. +endif::VK_AMD_device_coherent_memory[] + +ifdef::VK_AMD_device_coherent_memory[] +For any memory allocated with both the +ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT and the +ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, host or device accesses +also perform automatic memory domain transfer operations, such that writes +are always automatically available and visible to both host and device +memory domains. +[NOTE] +.Note +==== +Device coherence is a useful property for certain debugging use cases (e.g. +crash analysis, where performing separate coherence actions could mean +values are not reported correctly). +However, device coherent accesses may be slower than equivalent accesses +without device coherence, particularly if they are also device uncached. +For device uncached memory in particular, repeated accesses to the same or +neighbouring memory locations over a short time period (e.g. within a frame) +may be slower than it would be for the equivalent cached memory type. +As such, it's generally inadvisable to use device coherent or device +uncached memory except when really needed. +==== +endif::VK_AMD_device_coherent_memory[] -- + [open,refpage='VkMemoryPropertyFlags',desc='Bitmask of VkMemoryPropertyFlagBits',type='flags'] -- include::{generated}/api/flags/VkMemoryPropertyFlags.txt[] @@ -945,6 +1039,13 @@ endif::VK_AMD_memory_overallocation_behavior[] slink:VkPhysicalDeviceMemoryProperties::pname:memoryTypeCount as returned by flink:vkGetPhysicalDeviceMemoryProperties for the slink:VkPhysicalDevice that pname:device was created from. +ifdef::VK_AMD_device_coherent_memory[] + * [[VUID-vkAllocateMemory-deviceCoherentMemory-02790]] + If the <> + feature is not enabled, pname:pAllocateInfo\->pname:memoryTypeIndex + must: not identify a memory type supporting + ename:VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD +endif::VK_AMD_device_coherent_memory[] **** include::{generated}/validity/protos/vkAllocateMemory.txt[] diff --git a/chapters/pipelines.txt b/chapters/pipelines.txt index b72cff210a..683941c8b3 100644 --- a/chapters/pipelines.txt +++ b/chapters/pipelines.txt @@ -387,12 +387,12 @@ ifdef::VK_EXT_subgroup_size_control[] * [[VUID-VkPipelineShaderStageCreateInfo-flags-02784]] If pname:flags has the ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT - flag set, the <> feature must: be enabled. * [[VUID-VkPipelineShaderStageCreateInfo-flags-02785]] If pname:flags has the ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT - flag set, the <> feature must: be enabled. * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02754]] If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT @@ -401,10 +401,10 @@ ifdef::VK_EXT_subgroup_size_control[] flag set. * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02755]] If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT - structure is chained to pname:pNext, the - <> - feature must: be enabled, and pname:stage must: be a valid bit specified - in <> feature must: be enabled, and pname:stage + must: be a valid bit specified in + <>. * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02756]] If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT diff --git a/chapters/resources.txt b/chapters/resources.txt index 0021c3546c..e04b286c99 100644 --- a/chapters/resources.txt +++ b/chapters/resources.txt @@ -359,6 +359,14 @@ or the equivalent include::{generated}/api/structs/VkExternalMemoryBufferCreateInfoKHR.txt[] endif::VK_KHR_external_memory[] +[NOTE] +.Note +==== +An instance of sname:VkExternalMemoryBufferCreateInfo must be included in +the creation parameters for a buffer that will be bound to memory that is +either exported or imported. +==== + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:handleTypes is a bitmask of @@ -521,8 +529,8 @@ include::{generated}/api/structs/VkBufferViewCreateInfo.txt[] * [[VUID-VkBufferViewCreateInfo-offset-00925]] pname:offset must: be less than the size of pname:buffer * [[VUID-VkBufferViewCreateInfo-offset-02749]] - If the <> - feature is not enabled, pname:offset must: be a multiple of + If the <> feature is + not enabled, pname:offset must: be a multiple of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment * [[VUID-VkBufferViewCreateInfo-range-00928]] If pname:range is not equal to ename:VK_WHOLE_SIZE, pname:range must: be @@ -563,10 +571,10 @@ include::{generated}/api/structs/VkBufferViewCreateInfo.txt[] contiguously to a single sname:VkDeviceMemory object ifdef::VK_EXT_texel_buffer_alignment[] * [[VUID-VkBufferViewCreateInfo-buffer-02750]] - If the <> - feature is enabled and if pname:buffer was created with pname:usage - containing ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:offset - must: be a multiple of the lesser of + If the <> feature is + enabled and if pname:buffer was created with pname:usage containing + ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:offset must: be a + multiple of the lesser of slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::pname:storageTexelBufferOffsetAlignmentBytes or, if slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::pname:storageTexelBufferOffsetSingleTexelAlignment @@ -574,10 +582,10 @@ ifdef::VK_EXT_texel_buffer_alignment[] If the size of a texel is a multiple of three bytes, then the size of a single component of pname:format is used instead * [[VUID-VkBufferViewCreateInfo-buffer-02751]] - If the <> - feature is enabled and if pname:buffer was created with pname:usage - containing ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:offset - must: be a multiple of the lesser of + If the <> feature is + enabled and if pname:buffer was created with pname:usage containing + ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:offset must: be a + multiple of the lesser of slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::pname:uniformTexelBufferOffsetAlignmentBytes or, if slink:VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::pname:uniformTexelBufferOffsetSingleTexelAlignment @@ -1570,6 +1578,14 @@ or the equivalent include::{generated}/api/structs/VkExternalMemoryImageCreateInfoKHR.txt[] endif::VK_KHR_external_memory[] +[NOTE] +.Note +==== +An instance of sname:VkExternalMemoryImageCreateInfo must be included in the +creation parameters for an image that will be bound to memory that is either +exported or imported. +==== + * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:handleTypes is a bitmask of @@ -4646,16 +4662,16 @@ endif::VK_VERSION_1_1,VK_KHR_dedicated_allocation[] endif::VK_NV_dedicated_allocation[] ifdef::VK_VERSION_1_1,VK_KHR_external_memory[] * [[VUID-vkBindBufferMemory-memory-02726]] - If pname:memory was allocated with - slink:VkExportMemoryAllocateInfo::pname:handleTypes not equal to `0`, at - least one handle type it contained must also have been set in + If the value of slink:VkExportMemoryAllocateInfo::pname:handleTypes used + to allocate pname:memory is not `0`, it must: include at least one of + the handles set in slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes when - pname:buffer was created. + pname:buffer was created * [[VUID-vkBindBufferMemory-memory-02727]] If pname:memory was created by a memory import operation, the external - handle type of the imported memory must also have been set in + handle type of the imported memory must: also have been set in slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes when - pname:buffer was created. + pname:buffer was created endif::VK_VERSION_1_1,VK_KHR_external_memory[] **** @@ -4780,6 +4796,19 @@ ifdef::VK_VERSION_1_1,VK_KHR_device_group[] slink:VkBindBufferMemoryDeviceGroupInfo::pname:pDeviceIndices must: have been allocated endif::VK_VERSION_1_1,VK_KHR_device_group[] +ifdef::VK_VERSION_1_1,VK_KHR_external_memory[] + * [[VUID-VkBindBufferMemoryInfo-handleTypes-02791]] + If the value of slink:VkExportMemoryAllocateInfo::pname:handleTypes used + to allocate pname:memory is not `0`, it must: include at least one of + the handles set in + slink:VkExternalMemoryImageCreateInfo::pname:handleTypes when + pname:image was created + * [[VUID-VkBindBufferMemoryInfo-memory-02792]] + If pname:memory was created by a memory import operation, the external + handle type of the imported memory must: also have been set in + slink:VkExternalMemoryBufferCreateInfo::pname:handleTypes when + pname:buffer was created +endif::VK_VERSION_1_1,VK_KHR_external_memory[] **** include::{generated}/validity/structs/VkBindBufferMemoryInfo.txt[] @@ -4918,7 +4947,7 @@ ifndef::VK_NV_dedicated_allocation_image_aliasing[] slink:VkMemoryDedicatedAllocateInfo::pname:image was not dlink:VK_NULL_HANDLE, then pname:image must: equal slink:VkMemoryDedicatedAllocateInfo::pname:image and pname:memoryOffset - must: be zero. + must: be zero endif::VK_NV_dedicated_allocation_image_aliasing[] ifdef::VK_NV_dedicated_allocation_image_aliasing[] * [[VUID-vkBindImageMemory-memory-02628]] @@ -4976,16 +5005,16 @@ endif::VK_VERSION_1_1,VK_KHR_dedicated_allocation[] endif::VK_NV_dedicated_allocation[] ifdef::VK_VERSION_1_1,VK_KHR_external_memory[] * [[VUID-vkBindImageMemory-memory-02728]] - If pname:memory was allocated with - slink:VkExportMemoryAllocateInfo::pname:handleTypes not equal to `0`, at - least one handle type it contained must also have been set in + If the value of slink:VkExportMemoryAllocateInfo::pname:handleTypes used + to allocate pname:memory is not `0`, it must: include at least one of + the handles set in slink:VkExternalMemoryImageCreateInfo::pname:handleTypes when - pname:image was created. + pname:image was created * [[VUID-vkBindImageMemory-memory-02729]] If pname:memory was created by a memory import operation, the external - handle type of the imported memory must also have been set in + handle type of the imported memory must: also have been set in slink:VkExternalMemoryImageCreateInfo::pname:handleTypes when - pname:image was created. + pname:image was created endif::VK_VERSION_1_1,VK_KHR_external_memory[] **** @@ -5233,6 +5262,19 @@ ifdef::VK_KHR_swapchain[] slink:VkDeviceMemory handle endif::VK_KHR_swapchain[] endif::VK_VERSION_1_1,VK_KHR_device_group[] +ifdef::VK_VERSION_1_1,VK_KHR_external_memory[] + * [[VUID-VkBindImageMemoryInfo-handleTypes-02793]] + If the value of slink:VkExportMemoryAllocateInfo::pname:handleTypes used + to allocate pname:memory is not `0`, it must: include at least one of + the handles set in + slink:VkExternalMemoryImageCreateInfo::pname:handleTypes when + pname:image was created + * [[VUID-VkBindImageMemoryInfo-memory-02794]] + If pname:memory was created by a memory import operation, the external + handle type of the imported memory must: also have been set in + slink:VkExternalMemoryImageCreateInfo::pname:handleTypes when + pname:image was created +endif::VK_VERSION_1_1,VK_KHR_external_memory[] **** include::{generated}/validity/structs/VkBindImageMemoryInfo.txt[] diff --git a/chapters/samplers.txt b/chapters/samplers.txt index bf349d19f2..7fb66a00e4 100644 --- a/chapters/samplers.txt +++ b/chapters/samplers.txt @@ -404,11 +404,12 @@ include::{generated}/api/enums/VkSamplerAddressMode.txt[] edge wrap mode will be used. * ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER specifies that the clamp to border wrap mode will be used. +ifdef::VK_KHR_sampler_mirror_clamp_to_edge[] * ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE specifies that the mirror clamp to edge wrap mode will be used. This is only valid if the `<>` extension is enabled. - +endif::VK_KHR_sampler_mirror_clamp_to_edge[] -- [open,refpage='VkBorderColor',desc='Specify border color used for texture lookups',type='enums'] diff --git a/chapters/shaders.txt b/chapters/shaders.txt index 61a59eae01..c3137f0090 100644 --- a/chapters/shaders.txt +++ b/chapters/shaders.txt @@ -668,11 +668,10 @@ ifdef::VK_EXT_fragment_shader_interlock[] In normal operation, it is possible for more than one fragment shader invocation to be executed simultaneously for the same pixel if there are overlapping primitives. -If the <>, -<>, <>, or -<> features are enabled, it is possible to define a critical section within the fragment shader that is guaranteed to not run simultaneously with another fragment shader invocation for the same diff --git a/config/spec-macros/extension.rb b/config/spec-macros/extension.rb index 15fb9bf24a..7f713c8caa 100644 --- a/config/spec-macros/extension.rb +++ b/config/spec-macros/extension.rb @@ -207,7 +207,7 @@ class BasetypeInlineMacro < CodeInlineMacroBase match /basetype:(\w+)/ end -class CodeInlineMacro < StrongInlineMacroBase +class CodeInlineMacro < CodeInlineMacroBase named :code match /code:(\w+(\.\w+)*)/ end diff --git a/registry.txt b/registry.txt index aa51cc157e..66b084272b 100644 --- a/registry.txt +++ b/registry.txt @@ -988,6 +988,10 @@ version. inclusion. Example: `"VK_VERSION_1_0"`. * attr:number - required. Feature version number, usually a string interpreted as `majorNumber.minorNumber`. Example: `4.2`. + * attr:sortorder - optional. A decimal number which specifies an order + relative to other tag:feature tags when calling output generators. + Defaults to `0`. Rarely used, for when ordering by attr:name is + insufficient. * attr:protect - optional. An additional preprocessor token used to protect a feature definition. Usually another feature or extension attr:name. Rarely used, for odd circumstances where the definition @@ -1082,6 +1086,10 @@ be implemented against. the Vulkan Specification. Example: `name="VK_VERSION_1_0"`. * attr:number - required. A decimal number which is the registered, unique extension number for attr:name. + * attr:sortorder - optional. A decimal number which specifies an order + relative to other tag:extension tags when calling output generators. + Defaults to `0`. Rarely used, for when ordering by attr:number is + insufficient. * attr:author - optional. The author name, such as a full company name. If not present, this can be taken from the corresponding tag:tag attribute. However, `EXT` and other multi-vendor extensions @@ -2021,6 +2029,8 @@ files and Python scripts are logged in Github history. [[changelog]] = Change Log + * 2019-08-25 - Add attr:sortorder attribute to tag:feature and + tag:extension tags. * 2018-12-06 - Specify that command aliases are not guaranteed to resolve to the same entry point in the underlying layer stack, matching a related clarification in the Vulkan Specification. diff --git a/scripts/docgenerator.py b/scripts/docgenerator.py index 6bb8c3fb0c..8aea9b533e 100644 --- a/scripts/docgenerator.py +++ b/scripts/docgenerator.py @@ -121,14 +121,16 @@ def endFile(self): def beginFeature(self, interface, emit): # Start processing in superclass OutputGenerator.beginFeature(self, interface, emit) - # Verify that each extension has a unique number during doc generation - extension_number = interface.get('number') - if extension_number is not None and extension_number != "0": - if extension_number in self.extension_numbers: - self.logMsg('error', 'Duplicate extension number ', extension_number, ' detected in feature ', interface.get('name'), '\n') - exit(1) - else: - self.extension_numbers.add(extension_number) + # Verify that each has a unique number during doc + # generation + if interface.tag == 'extension': + extension_number = interface.get('number') + if extension_number is not None and extension_number != "0": + if extension_number in self.extension_numbers: + self.logMsg('error', 'Duplicate extension number ', extension_number, ' detected in feature ', interface.get('name'), '\n') + exit(1) + else: + self.extension_numbers.add(extension_number) def endFeature(self): # Finish processing in superclass diff --git a/scripts/generator.py b/scripts/generator.py index 8573655491..1e4be14d38 100644 --- a/scripts/generator.py +++ b/scripts/generator.py @@ -43,6 +43,17 @@ def noneStr(s): return s return "" +# noneInt - returns string argument as an integer, or default if argument is +# None. +# Used in converting etree Elements into integers. +# s - string to convert +# default - default value +def noneInt(s, default = 0): + if s: + return int(s) + else: + return default + # enquote - returns string argument with surrounding quotes, # for serialization into Python code. def enquote(s): @@ -50,7 +61,7 @@ def enquote(s): return "'{}'".format(s) return None -# Primary sort key for regSortFeatures. +# 1st sort key for regSortFeatures. # Sorts by category of the feature name string: # Core API features (those defined with a tag) # ARB/KHR/OES (Khronos extensions) @@ -66,31 +77,32 @@ def regSortCategoryKey(feature): return 2 -# Secondary sort key for regSortFeatures. -# Sorts by extension name. -def regSortNameKey(feature): - return feature.name +# 2nd sort key for regSortFeatures. +# Sorts by sortorder attribute +def regSortOrderKey(feature): + return feature.sortorder -# Second sort key for regSortFeatures. +# 3rd sort key for regSortFeatures. # Sorts by feature version. elements all have version number "0" def regSortFeatureVersionKey(feature): return float(feature.versionNumber) -# Tertiary sort key for regSortFeatures. +# 4th sort key for regSortFeatures. # Sorts by extension number. elements all have extension number 0. def regSortExtensionNumberKey(feature): return int(feature.number) # regSortFeatures - default sort procedure for features. -# Sorts by primary key of feature category ('feature' or 'extension') +# Sorts by primary key of feature category ('feature', or extension tag) +# then by sort order within the category # then by version number (for features) # then by extension number (for extensions) def regSortFeatures(featureList): featureList.sort(key=regSortExtensionNumberKey) featureList.sort(key=regSortFeatureVersionKey) + featureList.sort(key=regSortOrderKey) featureList.sort(key=regSortCategoryKey) - # GeneratorOptions - base class for options used during header production # These options are target language independent, and used by # Registry.apiGen() and by base OutputGenerator objects. @@ -121,8 +133,9 @@ def regSortFeatures(featureList): # deciding which interfaces to generate). # sortProcedure - takes a list of FeatureInfo objects and sorts # them in place to a preferred order in the generated output. -# Default is core API versions, ARB/KHR/OES extensions, all -# other extensions, alphabetically within each group. +# Default is core API versions, ARB/KHR/OES extensions, all other +# extensions, by core API version number or extension number in +# each group. # The regex patterns can be None or empty, in which case they match # nothing. class GeneratorOptions: diff --git a/scripts/reflow_count.py b/scripts/reflow_count.py index 5af99ec87c..19ed12e10d 100644 --- a/scripts/reflow_count.py +++ b/scripts/reflow_count.py @@ -1,2 +1,2 @@ # The value to start tagging VU statements at, unless overridden by -nextvu -startVUID = 2790 +startVUID = 2795 diff --git a/scripts/reg.py b/scripts/reg.py index fb30ed8616..27164c8f8a 100755 --- a/scripts/reg.py +++ b/scripts/reg.py @@ -19,7 +19,8 @@ import sys import xml.etree.ElementTree as etree from collections import defaultdict, namedtuple -from generator import OutputGenerator, write +from generator import OutputGenerator, write, noneInt +import pdb # matchAPIProfile - returns whether an API and profile # being generated matches an element's profile @@ -70,6 +71,12 @@ def matchAPIProfile(api, profile, elem): return False return True +# Print all the keys in an Element - only for diagnostics +# def printKeys(msg, elem): +# print('printKeys:', msg, file=sys.stderr) +# for key in elem.keys(): +# print(' {} -> {}'.format(key, elem.get(key)), file=sys.stderr) + # BaseInfo - base class for information about a registry feature # (type/group/enum/command/API/extension). # required - should this feature be defined during header generation @@ -89,26 +96,41 @@ def __init__(self, elem): def resetState(self): self.required = False self.declared = False - def compareElem(self, info): - # Just compares the tag and attributes. - # @@ This should be virtualized. In particular, comparing - # tags requires special-casing on the attributes, as 'extnumber' is - # only relevant when 'offset' is present. - selfKeys = sorted(self.elem.keys()) - infoKeys = sorted(info.elem.keys()) - - if selfKeys != infoKeys: + def compareKeys(self, info, key, required = False): + # Return True if self.elem and info.elem have the same attribute + # value for key. + # If 'required' is not True, also returns True if neither element + # has an attribute value for key. + if required and key not in self.elem.keys(): return False - - # Ignore value of 'extname' and 'extnumber', as these will inherently - # be different when redefining the same interface in different feature - # and/or extension blocks. - for key in selfKeys: - if key not in ('extname', 'extnumber') and \ - (self.elem.get(key) != info.elem.get(key)): + return self.elem.get(key) == info.elem.get(key) + def compareElem(self, info, infoName): + # Return True if self.elem and info.elem have the same definition + # info - the other object + # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' + + if infoName == 'enum': + if self.compareKeys(info, 'extends'): + # Either both extend the same type, or no type + if (self.compareKeys(info, 'value', required = True) or + self.compareKeys(info, 'bitpos', required = True)): + # If both specify the same value or bit position, + # they're equal + return True + elif (self.compareKeys(info, 'extends') and + self.compareKeys(info, 'extnumber') and + self.compareKeys(info, 'offset') and + self.compareKeys(info, 'dir')): + # If both specify the same relative offset, they're equal + return True + else: + return False + else: + # The same enum can't extend two different types return False - - return True + else: + # Non-s should never be redefined + return False # TypeInfo - registry information about a type. No additional state # beyond BaseInfo is required. @@ -164,29 +186,34 @@ def resetState(self): # FeatureInfo - registry information about an API # or # name - feature name string (e.g. 'VK_KHR_surface') -# version - feature version number (e.g. 1.2). +# category - category, e.g. VERSION or khr/vendor tag +# version - feature name string # features are unversioned and assigned version number 0. # ** This is confusingly taken from the 'number' attribute of . # Needs fixing. +# versionNumber - API version number, taken from the 'number' attribute +# of . Extensions do not have API version numbers and are +# assigned number 0. # number - extension number, used for ordering and for # assigning enumerant offsets. features do # not have extension numbers and are assigned number 0. -# category - category, e.g. VERSION or khr/vendor tag # emit - has this feature been defined already? class FeatureInfo(BaseInfo): """Represents the state of an API feature (version/extension)""" def __init__(self, elem): BaseInfo.__init__(self, elem) self.name = elem.get('name') - # Determine element category (vendor). Only works - # for elements. + self.sortorder = noneInt(elem.get('sortorder'), 0) + if elem.tag == 'feature': + # Element category (vendor) is meaningless for self.category = 'VERSION' self.version = elem.get('name') self.versionNumber = elem.get('number') self.number = "0" self.supported = None else: + # Extract vendor portion of VK__ self.category = self.name.split('_', 2)[1] self.version = "0" self.versionNumber = "0" @@ -295,12 +322,14 @@ def addElementInfo(self, elem, info, infoName, dictionary): else: key = elem.get('name') if key in dictionary: - if not dictionary[key].compareElem(info): + if not dictionary[key].compareElem(info, infoName): self.gen.logMsg('warn', 'Attempt to redefine', key, - 'with different value (this may be benign)') - #else: - # self.gen.logMsg('warn', 'Benign redefinition of', key, - # 'with identical value') + '(this should not happen)') + # printKeys('old element', dictionary[key].elem) + # printKeys('new element', info.elem) + else: + # Benign redefinition - intentional cases exist. + True else: dictionary[key] = info @@ -1053,7 +1082,7 @@ def apiGen(self, genOpts): self.gen.logMsg('diag', 'NOT including extension', extName, '(does not match api attribute or explicitly requested extensions)') - # Sort the extension features list, if a sort procedure is defined + # Sort the features list, if a sort procedure is defined if self.genOpts.sortProcedure: self.genOpts.sortProcedure(features) diff --git a/xml/registry.rnc b/xml/registry.rnc index 4b6379966a..da33dff6ac 100644 --- a/xml/registry.rnc +++ b/xml/registry.rnc @@ -349,6 +349,7 @@ Command = element command { # name - version name (C preprocessor name, e.g. GL_VERSION_4_2) # number - version number, e.g. 4.2 # protect - additional #ifdef symbol to place around the feature +# sortorder - order relative to other features, default 0 # / contains features to require or remove in # this version # profile - only require/remove when generated profile matches @@ -358,6 +359,7 @@ Feature = element feature { Name , attribute number { xsd:float } , attribute protect { text } ? , + attribute sortorder { xsd:integer } ?, Comment ? , ( element require { @@ -393,6 +395,7 @@ Extensions = element extensions { # exactly match an API being generated (implicit ^$ surrounding). # name - extension name string # number - extension number (positive integer, should be unique) +# sortorder - order relative to other extensions, default 0 # protect - C preprocessor symbol to conditionally define the interface # platform - should be one of the platform names defined in the # tag. Currently unused. @@ -421,6 +424,7 @@ Extensions = element extensions { Extension = element extension { Name , attribute number { Integer } ? , + attribute sortorder { xsd:integer } ?, attribute protect { text } ? , attribute platform { text } ? , attribute author { text } ? , diff --git a/xml/vk.xml b/xml/vk.xml index bc1c63de37..60d035a222 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -154,7 +154,7 @@ server. // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 120 +#define VK_HEADER_VERSION 121 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -4036,7 +4036,7 @@ typedef void CAMetalLayer; VkBool32 fragmentShaderPixelInterlock VkBool32 fragmentShaderShadingRateInterlock - + VkStructureType sType void* pNext VkBool32 pipelineExecutableInfo @@ -4148,6 +4148,11 @@ typedef void CAMetalLayer; const void* pNext VkPipelineCompilerControlFlagsAMD compilerControlFlags + + VkStructureType sType + void* pNext + VkBool32 deviceCoherentMemory + Vulkan enumerant (token) definitions @@ -7562,14 +7567,14 @@ typedef void CAMetalLayer; uint32_t bindInfoCount const VkBindAccelerationStructureMemoryInfoNV* pBindInfos - + void vkCmdCopyAccelerationStructureNV VkCommandBuffer commandBuffer VkAccelerationStructureNV dst VkAccelerationStructureNV src VkCopyAccelerationStructureModeNV mode - + void vkCmdWriteAccelerationStructuresPropertiesNV VkCommandBuffer commandBuffer uint32_t accelerationStructureCount @@ -7578,7 +7583,7 @@ typedef void CAMetalLayer; VkQueryPool queryPool uint32_t firstQuery - + void vkCmdBuildAccelerationStructureNV VkCommandBuffer commandBuffer const VkAccelerationStructureInfoNV* pInfo @@ -7590,7 +7595,7 @@ typedef void CAMetalLayer; VkBuffer scratch VkDeviceSize scratchOffset - + void vkCmdTraceRaysNV VkCommandBuffer commandBuffer VkBuffer raygenShaderBindingTableBuffer @@ -8383,7 +8388,7 @@ typedef void CAMetalLayer; - + @@ -8409,7 +8414,7 @@ typedef void CAMetalLayer; - + @@ -8535,9 +8540,10 @@ typedef void CAMetalLayer; - + + @@ -8727,7 +8733,7 @@ typedef void CAMetalLayer; - + @@ -8924,7 +8930,7 @@ typedef void CAMetalLayer; - + @@ -8932,7 +8938,7 @@ typedef void CAMetalLayer; - + @@ -8963,7 +8969,7 @@ typedef void CAMetalLayer; - + @@ -9285,7 +9291,7 @@ typedef void CAMetalLayer; - + @@ -9592,7 +9598,7 @@ typedef void CAMetalLayer; - + @@ -9903,7 +9909,7 @@ typedef void CAMetalLayer; - + @@ -10168,7 +10174,7 @@ typedef void CAMetalLayer; - + @@ -10451,7 +10457,7 @@ typedef void CAMetalLayer; - + @@ -10613,7 +10619,7 @@ typedef void CAMetalLayer; - + @@ -10778,7 +10784,7 @@ typedef void CAMetalLayer; - + @@ -11021,10 +11027,14 @@ typedef void CAMetalLayer; - + - - + + + + + + @@ -11229,7 +11239,7 @@ typedef void CAMetalLayer; - +