From 0a7a04f32bd473bc7428efdbbbe132f33afad68c Mon Sep 17 00:00:00 2001 From: Jon Leech Date: Sat, 13 Oct 2018 03:23:03 -0700 Subject: [PATCH] Change log for October 13, 2018 Vulkan 1.1.88 spec update: * Update release number to 88. Public Issues: * Make clear that tname:PFN_vkDebugUtilsMessengerCallbackEXT::pname:messageTypes is a bitmask, and correct a typo in the spelling of slink:VkDebugUtilsMessengerCreateInfoEXT.txt::pname:messageType (public pull request 800). * Make an ABI-compatible change of the type of slink:VkPhysicalDeviceDriverPropertiesKHR::pname:driverID to use the new elink:VkDriverIdKHR type (public issue 811). Internal Issues: * Clarify for the <> feature and in the <> that the feature means that all of the formats are supported, and that otherwise the features can be queried per-format (internal issue 1273). * Clarified interactions of `VK_EXT_external_memory_host` with host cache management commands and structures flink:vkMapMemory, flink:vkFlushMappedMemoryRanges, slink:VkMappedMemoryRange, and flink:vkUnmapMemory using the new glossary term "`Host Mapped Device Memory`" (internal issue 1385). * Update the language for flink:vkCreateViSurfaceNN.txt describing the pname:currentExtent of a VI surface to more accurately reflect current capabilities, replacing "`undefined`" with more explicit behavior (internal issue 1410). New Extensions: * `VK_EXT_calibrated_timestamps` * `VK_EXT_image_drm_format_modifier` (this extension was previously disabled in vk.xml, and has now been enabled after some changes to fix performance issues). * `VK_EXT_pci_bus_info` * `VK_EXT_transform_feedback` * `VK_GOOGLE_hlsl_functionality1`, exposing support for `SPV_GOOGLE_hlsl_functionality1`. * `VK_GOOGLE_decorate_string`, exposing support for `SPV_GOOGLE_decorate_string`. --- ChangeLog.txt | 46 +++ Makefile | 2 +- appendices/VK_EXT_calibrated_timestamps.txt | 114 +++++++ appendices/VK_EXT_debug_marker.txt | 4 +- appendices/VK_EXT_debug_utils.txt | 6 +- .../VK_EXT_image_drm_format_modifier.txt | 1 + appendices/VK_EXT_pci_bus_info.txt | 57 ++++ appendices/VK_EXT_transform_feedback.txt | 141 ++++++++ appendices/VK_GOOGLE_decorate_string.txt | 35 ++ appendices/VK_GOOGLE_hlsl_functionality1.txt | 35 ++ appendices/VK_NV_glsl_shader.txt | 2 +- appendices/glossary.txt | 25 ++ appendices/spirvenv.txt | 75 ++++- chapters/VK_EXT_debug_report.txt | 10 +- chapters/VK_KHR_display/display.txt | 2 +- chapters/VK_KHR_swapchain/wsi.txt | 4 +- .../platformCreateSurface_vi.txt | 11 +- chapters/cmdbuffers.txt | 5 + chapters/devsandqueues.txt | 26 +- chapters/drawing.txt | 210 ++++++++++++ chapters/features.txt | 226 ++++++++++++- chapters/interfaces.txt | 4 + chapters/memory.txt | 56 +++- chapters/pipelines.txt | 38 +++ chapters/primsrast.txt | 115 ++++++- chapters/queries.txt | 211 ++++++++++++ chapters/renderpass.txt | 32 +- chapters/resources.txt | 151 +++++---- chapters/synchronization.txt | 131 +++++++- chapters/vertexpostproc.txt | 314 ++++++++++++++++++ include/vulkan/vulkan_core.h | 243 +++++++++++++- reflow_count.py | 2 +- xml/vk.xml | 206 ++++++++++-- 33 files changed, 2396 insertions(+), 144 deletions(-) create mode 100644 appendices/VK_EXT_calibrated_timestamps.txt create mode 100644 appendices/VK_EXT_pci_bus_info.txt create mode 100644 appendices/VK_EXT_transform_feedback.txt create mode 100644 appendices/VK_GOOGLE_decorate_string.txt create mode 100644 appendices/VK_GOOGLE_hlsl_functionality1.txt mode change 100755 => 100644 appendices/spirvenv.txt mode change 100755 => 100644 chapters/features.txt diff --git a/ChangeLog.txt b/ChangeLog.txt index d65e614d..3582eb29 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,52 @@ public pull requests that have been accepted. ----------------------------------------------------- +Change log for October 13, 2018 Vulkan 1.1.88 spec update: + + * Update release number to 88. + +Public Issues: + + * Make clear that + tname:PFN_vkDebugUtilsMessengerCallbackEXT::pname:messageTypes is a + bitmask, and correct a typo in the spelling of + slink:VkDebugUtilsMessengerCreateInfoEXT.txt::pname:messageType (public + pull request 800). + * Make an ABI-compatible change of the type of + slink:VkPhysicalDeviceDriverPropertiesKHR::pname:driverID to use the new + elink:VkDriverIdKHR type (public issue 811). + +Internal Issues: + + * Clarify for the <> + feature and in the <> that the feature + means that all of the formats are supported, and that otherwise the + features can be queried per-format (internal issue 1273). + * Clarified interactions of `VK_EXT_external_memory_host` with host cache + management commands and structures flink:vkMapMemory, + flink:vkFlushMappedMemoryRanges, slink:VkMappedMemoryRange, and + flink:vkUnmapMemory using the new glossary term "`Host Mapped Device + Memory`" (internal issue 1385). + * Update the language for flink:vkCreateViSurfaceNN.txt describing the + pname:currentExtent of a VI surface to more accurately reflect current + capabilities, replacing "`undefined`" with more explicit behavior + (internal issue 1410). + +New Extensions: + + * `VK_EXT_calibrated_timestamps` + * `VK_EXT_image_drm_format_modifier` (this extension was previously + disabled in vk.xml, and has now been enabled after some changes to fix + performance issues). + * `VK_EXT_pci_bus_info` + * `VK_EXT_transform_feedback` + * `VK_GOOGLE_hlsl_functionality1`, exposing support for + `SPV_GOOGLE_hlsl_functionality1`. + * `VK_GOOGLE_decorate_string`, exposing support for + `SPV_GOOGLE_decorate_string`. + +----------------------------------------------------- + Change log for October 7, 2018 Vulkan 1.1.87 spec update: * Update release number to 87. diff --git a/Makefile b/Makefile index 9f7fe771..25d5a124 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ VERBOSE = # EXTRAATTRIBS sets additional attributes, if passed to make # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 87 +PATCHVERSION = 88 ifneq (,$(findstring VK_VERSION_1_1,$(VERSIONS))) SPECREVISION = 1.1.$(PATCHVERSION) else diff --git a/appendices/VK_EXT_calibrated_timestamps.txt b/appendices/VK_EXT_calibrated_timestamps.txt new file mode 100644 index 00000000..6ec8955b --- /dev/null +++ b/appendices/VK_EXT_calibrated_timestamps.txt @@ -0,0 +1,114 @@ +include::meta//VK_EXT_calibrated_timestamps.txt[] + +*Last Modified Date*:: + 2018-10-04 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Matthaeus G. Chajdas, AMD + - Alan Harrison, AMD + - Derrick Owens, AMD + - Daniel Rakos, AMD + - Keith Packard, Valve + +This extension provides an interface to query calibrated timestamps obtained +quasi simultaneously from two time domains. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT + +=== New Enums + + * elink:VkTimeDomainEXT + +=== New Structures + + * slink:VkCalibratedTimestampInfoEXT + +=== New Functions + + * flink:vkGetPhysicalDeviceCalibrateableTimeDomainsEXT + * flink:vkGetCalibratedTimestampsEXT + +=== Issues + +1) Is the device timestamp value returned in the same time domain as the +timestamp values written by flink:vkCmdWriteTimestamp? + +*RESOLVED*: Yes. + +2) What time domain is the host timestamp returned in? + +*RESOLVED*: A query is provided to determine the calibrateable time domains. +The expected host time domain used on Windows is that of +QueryPerformanceCounter, and on Linux that of CLOCK_MONOTONIC. + +3) Should we support other time domain combinations than just one host and +the device time domain? + +*RESOLVED*: Supporting that would need the application to query the set of +supported time domains, while supporting only one host and the device time +domain would only need a query for the host time domain type. +The proposed API chooses the general approach for the sake of extensibility. + +4) Shouldn't we use CLOCK_MONOTONIC_RAW instead of CLOCK_MONOTONIC? + +*RESOLVED*: CLOCK_MONOTONIC is usable in a wider set of situations, however, +it is subject to NTP adjustments so some use cases may prefer +CLOCK_MONOTONIC_RAW. +Thus this extension allows both to be exposed. + +5) How can the application extrapolate future device timestamp values from +the calibrated timestamp value? + +*RESOLVED*: slink:VkPhysicalDeviceLimits::pname:timestampPeriod makes it +possible to calculate future device timestamps as follows: + +[source,c] +--------------------------------------------------- +futureTimestamp = calibratedTimestamp + deltaNanoseconds / timestampPeriod +--------------------------------------------------- + +6) Can the host and device timestamp values drift apart over longer periods +of time? + +*RESOLVED*: Yes, especially as some time domains by definition allow for +that to happen (e.g. CLOCK_MONOTONIC is subject to NTP adjustments). +Thus it's recommended that applications re-calibrate from time to time. + +7) Should we add a query for reporting the maximum deviation of the +timestamp values returned by calibrated timestamp queries? + +*RESOLVED*: A global query seems inappropriate and difficult to enforce. +However, it's possible to return the maximum deviation any single calibrated +timestamp query can have by sampling one of the time domains twice as +follows: + +[source,c] +--------------------------------------------------- +timestampX = timestampX_before = SampleTimeDomain(X) +for each time domain Y != X + timestampY = SampleTimeDomain(Y) +timestampX_after = SampleTimeDomain(X) +maxDeviation = timestampX_after - timestampX_before +--------------------------------------------------- + +8) Can the maximum deviation reported ever be zero? + +*RESOLVED*: Unless the tick of each clock corresponding to the set of time +domains coincides and all clocks can literally be sampled simutaneously, +there isn't really a possibility for the maximum deviation to be zero, so by +convention the maximum deviation is always at least the maximum of the +length of the ticks of the set of time domains calibrated and thus can never +be zero. + +=== Version History + + * Revision 1, 2018-10-04 (Daniel Rakos) + - Internal revisions. diff --git a/appendices/VK_EXT_debug_marker.txt b/appendices/VK_EXT_debug_marker.txt index 9115ab86..ef0b5753 100644 --- a/appendices/VK_EXT_debug_marker.txt +++ b/appendices/VK_EXT_debug_marker.txt @@ -47,7 +47,7 @@ None === Examples -**Example 1** +*Example 1* Associate a name with an image, for easier debugging in external tools or with validation layers that can print a friendly name when referring to @@ -78,7 +78,7 @@ objects in error messages. // command buffer with no memory bound to it. ---------------------------------------- -**Example 2** +*Example 2* Annotating regions of a workload with naming information so that offline analysis tools can display a more usable visualisation of the commands diff --git a/appendices/VK_EXT_debug_utils.txt b/appendices/VK_EXT_debug_utils.txt index dc22c1bb..25a42ce1 100644 --- a/appendices/VK_EXT_debug_utils.txt +++ b/appendices/VK_EXT_debug_utils.txt @@ -107,7 +107,7 @@ VkCommandBuffer the message occurred. === Examples -**Example 1** +*Example 1* `VK_EXT_debug_utils` allows an application to register multiple callbacks with any Vulkan component wishing to report debug information. @@ -188,7 +188,7 @@ happens and the third will log warnings to stdout. pfnDestroyDebugUtilsMessengerEXT(instance, cb3, NULL); ------------------------------------------------------------------------------ -**Example 2** +*Example 2* Associate a name with an image, for easier debugging in external tools or with validation layers that can print a friendly name when referring to @@ -219,7 +219,7 @@ objects in error messages. // command buffer with no memory bound to it. ---------------------------------------- -**Example 3** +*Example 3* Annotating regions of a workload with naming information so that offline analysis tools can display a more usable visualization of the commands diff --git a/appendices/VK_EXT_image_drm_format_modifier.txt b/appendices/VK_EXT_image_drm_format_modifier.txt index 179d0ed5..1814b186 100644 --- a/appendices/VK_EXT_image_drm_format_modifier.txt +++ b/appendices/VK_EXT_image_drm_format_modifier.txt @@ -10,6 +10,7 @@ include::meta/VK_EXT_image_drm_format_modifier.txt[] No known IP claims. *Contributors*:: - Antoine Labour, Google + - Bas Nieuwenhuizen, Google - Chad Versace, Google - James Jones, NVIDIA - Jason Ekstrand, Intel diff --git a/appendices/VK_EXT_pci_bus_info.txt b/appendices/VK_EXT_pci_bus_info.txt new file mode 100644 index 00000000..577c95d4 --- /dev/null +++ b/appendices/VK_EXT_pci_bus_info.txt @@ -0,0 +1,57 @@ +include::meta/VK_EXT_pci_bus_info.txt[] + +*Last Modified Date*:: + 2018-10-11 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Matthaeus G. Chajdas, AMD + - Daniel Rakos, AMD + +This extension adds a new query to obtain PCI bus information about a +physical device. + +Not all physical devices have PCI bus information, either due to the device +not being connected to the system through a PCI interface or due to platform +specific restrictions and policies. +Thus this extension is only expected to be supported by physical devices +which can provide the information. + +As a consequence, applications should always check for the presence of the +extension string for each individual physical device for which they intend +to issue the new query for and should not have any assumptions about the +availability of the extension on any given platform. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT + +=== New Enums + +None. + +=== New Structures + + * slink:VkPhysicalDevicePCIBusInfoPropertiesEXT + +=== New Functions + +None. + +=== Issues + +None. + +=== Examples + +None. + +=== Version History + + * Revision 1, 2018-10-11 (Daniel Rakos) + - Initial revision diff --git a/appendices/VK_EXT_transform_feedback.txt b/appendices/VK_EXT_transform_feedback.txt new file mode 100644 index 00000000..af77728f --- /dev/null +++ b/appendices/VK_EXT_transform_feedback.txt @@ -0,0 +1,141 @@ +include::meta/VK_EXT_transform_feedback.txt[] + +*Last Modified Data*:: + 2018-10-09 +*Contributors*:: + - Baldur Karlsson, Valve + - Boris Zanin, Mobica + - Daniel Rakos, AMD + - Donald Scorgie, Imagination + - Henri Verbeet, CodeWeavers + - Jan-Harald Fredriksen, Arm + - Jason Ekstrand, Intel + - Jeff Bolz, NVIDIA + - Jesse Barker, Unity + - Jesse Hall, Google + - Pierre-Loup Griffais, Valve + - Philip Rebohle, DXVK + - Ruihao Zhang, Qualcomm + - Samuel Pitoiset, Valve + - Slawomir Grajewski, Intel + - Stu Smith, Imagination Technologies + + +This extension adds transform feedback to the Vulkan API by exposing the +SPIR-V code:TransformFeedback and code:GeometryStreams capabilities to +capture vertex, tessellation or geometry shader outputs to one or more +buffers. +It adds API functionality to bind transform feedback buffers to capture the +primitives emitted by the graphics pipeline from SPIR-V outputs decorated +for transform feedback. +The transform feedback capture can be paused and resumed by way of storing +and retrieving a byte counter. +The captured data can be drawn again where the vertex count is derived from +the byte counter without CPU intervention. +If the implementation is capable, a vertex stream other than zero can be +rasterized. + +All these features are designed to match the full capabilities of OpenGL +core transform feedback functionality and beyond. +Many of the features are optional to allow base OpenGL ES GPUs to also +implement this extension. + +The primary purpose of the functionality exposed by this extension is to +support translation layers from other 3D APIs. +This functionality is not considered forward looking, and is not expected to +be promoted to a KHR extension or to core Vulkan. +Unless this is needed for translation, it is recommended that developers use +alternative techniques of using the GPU to process and capture vertex data. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT + ** ename:VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT + + * Extending elink:VkQueryType: + + ** ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT + + * Extending elink:VkBufferUsageFlagBits: + + ** ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT + ** ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT + + * Extending elink:VkAccessFlagBits: + + ** ename:VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT + ** ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT + ** ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT + + * Extending elink:VkPipelineStageFlagBits: + + ** ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT + +=== New Enums + + * elink:VkPipelineRasterizationStateStreamCreateFlagsEXT + +=== New Structures + + * Extending slink:VkPhysicalDeviceFeatures2: + ** slink:VkPhysicalDeviceTransformFeedbackFeaturesEXT + * Extending slink:VkPhysicalDeviceProperties2: + ** slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT + * Extending slink:VkPipelineRasterizationStateCreateInfo + ** slink:VkPipelineRasterizationStateStreamCreateInfoEXT + +=== New Functions + + * flink:vkCmdBindTransformFeedbackBuffersEXT + * flink:vkCmdBeginTransformFeedbackEXT + * flink:vkCmdEndTransformFeedbackEXT + * flink:vkCmdBeginQueryIndexedEXT + * flink:vkCmdEndQueryIndexedEXT + * flink:vkCmdDrawIndirectByteCountEXT + +=== Issues + +1) Should we include pause/resume functionality? + +*RESOLVED*: Yes, this is needed to ease layering other APIs which have this +functionality. +To pause use fname:vkCmdEndTransformFeedbackEXT and provide valid buffer +handles in the pname:pCounterBuffers array and offsets in the +pname:pCounterBufferOffsets array for the implementation to save the resume +points. +Then to resume use fname:vkCmdBeginTransformFeedbackEXT with the previous +pname:pCounterBuffers and pname:pCounterBufferOffsets values. +Between the pause and resume there needs to be a memory barrier for the +counter buffers with a source access of +ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT at pipeline stage +ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT to a destination access +of ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT at pipeline stage +ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT. + +2) How does this interact with multiview? + +*RESOLVED*: Transform feedback cannot be made active in a render pass with +multiview enabled. + +3) How should queries be done? + +*RESOLVED*: There is a new query type +ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT. + query pool created with this type will capture 2 integers - +numPrimitivesWritten and numPrimitivesNeeded - for the specified vertex +stream output from the last vertex processing stage. +The vertex stream output queried is zero by default, but can be specified +with the new fname:vkCmdBeginQueryIndexedEXT and +fname:vkCmdEndQueryIndexedEXT commands. + +=== Version History + + * Revision 1, 2018-10-09 (Piers Daniell) + - Internal revisions diff --git a/appendices/VK_GOOGLE_decorate_string.txt b/appendices/VK_GOOGLE_decorate_string.txt new file mode 100644 index 00000000..75e39422 --- /dev/null +++ b/appendices/VK_GOOGLE_decorate_string.txt @@ -0,0 +1,35 @@ +include::meta/VK_GOOGLE_decorate_string.txt[] + +*Last Modified Date*:: + 2018-07-09 +*IP Status*:: + No known IP claims. +*Interactions and External Dependencies*:: + - Requires the + https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/GOOGLE/SPV_GOOGLE_decorate_string.asciidoc[+SPV_GOOGLE_decorate_string+] + SPIR-V extension. +*Contributors*:: + - Hai Nguyen, Google + - Neil Henning, AMD + +The `VK_GOOGLE_decorate_string` extension allows use of the +`SPV_GOOGLE_decorate_string` extension in SPIR-V shader modules. + +=== New Enum Constants + +None. + +=== New Structures + +None. + +=== New SPIR-V Capabilities + +None. + +=== Issues + +=== Version History + + * Revision 1, 2018-07-09 (Neil Henning) + - Initial draft diff --git a/appendices/VK_GOOGLE_hlsl_functionality1.txt b/appendices/VK_GOOGLE_hlsl_functionality1.txt new file mode 100644 index 00000000..597d3d70 --- /dev/null +++ b/appendices/VK_GOOGLE_hlsl_functionality1.txt @@ -0,0 +1,35 @@ +include::meta/VK_GOOGLE_hlsl_functionality1.txt[] + +*Last Modified Date*:: + 2018-07-09 +*IP Status*:: + No known IP claims. +*Interactions and External Dependencies*:: + - Requires the + https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/GOOGLE/SPV_GOOGLE_hlsl_functionality1.asciidoc[+SPV_GOOGLE_hlsl_functionality1+] + SPIR-V extension. +*Contributors*:: + - Hai Nguyen, Google + - Neil Henning, AMD + +The `VK_GOOGLE_hlsl_functionality1` extension allows use of the +`SPV_GOOGLE_hlsl_functionality1` extension in SPIR-V shader modules. + +=== New Enum Constants + +None. + +=== New Structures + +None. + +=== New SPIR-V Capabilities + +None. + +=== Issues + +=== Version History + + * Revision 1, 2018-07-09 (Neil Henning) + - Initial draft diff --git a/appendices/VK_NV_glsl_shader.txt b/appendices/VK_NV_glsl_shader.txt index 747fc82d..8bf30ba7 100644 --- a/appendices/VK_NV_glsl_shader.txt +++ b/appendices/VK_NV_glsl_shader.txt @@ -29,7 +29,7 @@ GLSL, and compile it appropriately. === Examples -**Example 1** +*Example 1* Passing in GLSL code diff --git a/appendices/glossary.txt b/appendices/glossary.txt index 9fdbdd5e..a024834a 100644 --- a/appendices/glossary.txt +++ b/appendices/glossary.txt @@ -23,6 +23,17 @@ Acquire Operation (Resource):: An operation that acquires ownership of an image subresource or buffer range. +ifdef::VK_EXT_transform_feedback[] +Active (Transform Feedback):: + Transform feedback is made active after + flink:vkCmdBeginTransformFeedbackEXT executes and remains active until + flink:vkCmdEndTransformFeedbackEXT executes. + While transform feedback is active, data written to variables in the + output interface of the last vertex processing stage of the graphics + pipeline are captured to the bound transform feedback buffers if those + variables are decorated for transform feedback. +endif::VK_EXT_transform_feedback[] + Adjacent Vertex:: A vertex in an adjacency primitive topology that is not part of a given primitive, but is accessible in geometry shaders. @@ -582,6 +593,9 @@ Host:: The processor(s) and execution environment that the application runs on, and that the Vulkan API is exposed on. +Host Mapped Device Memory:: + Device memory that is mapped for host access using flink:vkMapMemory. + ifdef::VK_EXT_external_memory_host[] Host Mapped Foreign Memory:: Memory owned by a foreign device that is mapped for host access. @@ -1429,6 +1443,17 @@ Vertex Input Attribute:: shader by reading data from a vertex input binding and converting it to the attribute's format. +ifdef::VK_EXT_transform_feedback[] +Vertex Stream:: + A vertex stream is where the last vertex processing stage outputs vertex + data, which then goes to the rasterizer, is captured to a transform + feedback buffer, or both. + Geometry shaders can: emit primitives to multiple independent vertex + streams. + Each vertex emitted by the geometry shader is directed at one of the + vertex streams. +endif::VK_EXT_transform_feedback[] + ifdef::VK_EXT_validation_cache[] Validation Cache:: An object that can: be used to collect and retrieve validation results diff --git a/appendices/spirvenv.txt b/appendices/spirvenv.txt old mode 100755 new mode 100644 index 3d030aec..256daaef --- a/appendices/spirvenv.txt +++ b/appendices/spirvenv.txt @@ -81,7 +81,7 @@ endif::VK_KHR_shader_atomic_int64[] | code:MinLod | <> | code:SampledCubeArray | <> | code:ImageMSArray | <> -| code:StorageImageExtendedFormats | <> +| code:StorageImageExtendedFormats | | code:InterpolationFunction | <> | code:StorageImageReadWithoutFormat | <> | code:StorageImageWriteWithoutFormat | <> @@ -240,6 +240,10 @@ ifdef::VK_NVX_raytracing[] [[spirvenv-capabilities-table-raytracing]] | code:RaytracingNVX | `<>` endif::VK_NVX_raytracing[] +ifdef::VK_EXT_transform_feedback[] +| code:TransformFeedback | <> +| code:GeometryStreams | <> +endif::VK_EXT_transform_feedback[] |==== ifdef::VK_VERSION_1_1,VK_KHR_variable_pointers[] @@ -401,6 +405,16 @@ The application can: pass a SPIR-V module to flink:vkCreateShaderModule that uses the `SPV_NVX_raytracing` SPIR-V extension. endif::VK_NVX_raytracing[] +ifdef::VK_GOOGLE_hlsl_functionality1[] +The application can: pass a SPIR-V module to flink:vkCreateShaderModule that +uses the `SPV_GOOGLE_hlsl_functionality1` SPIR-V extension. +endif::VK_GOOGLE_hlsl_functionality1[] + +ifdef::VK_GOOGLE_decorate_string[] +The application can: pass a SPIR-V module to flink:vkCreateShaderModule that +uses the `SPV_GOOGLE_decorate_string` SPIR-V extension. +endif::VK_GOOGLE_decorate_string[] + The application must: not pass a SPIR-V module containing any of the following to flink:vkCreateShaderModule: @@ -625,7 +639,64 @@ ifdef::VK_EXT_descriptor_indexing[] (e.g. the pointer or sampled image operand) must: be decorated with code:NonUniformEXT. endif::VK_EXT_descriptor_indexing[] - +ifdef::VK_EXT_transform_feedback[] + * The code:Offset plus size of the type of each variable, in the output + interface of the entry point being compiled, decorated with + code:XfbBuffer must: not be greater than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferDataSize + * For any given code:XfbBuffer value, define the buffer data size to be + smallest number of bytes such that, for all outputs decorated with the + same code:XfbBuffer value, the size of the output interface variable + plus the code:Offset is less than or equal to the buffer data size. + For a given code:Stream, the sum of all the buffer data sizes for all + buffers writing to that stream the must: not exceed + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreamDataSize + * Output variables or block members decorated with code:Offset that have a + 64-bit type, or a composite type containing a 64-bit type, must: specify + an code:Offset value aligned to a 8 byte boundary + * Any output block or block member decorated with code:XfbOffset + containing a 64-bit type consumes a multiple of 8 bytes + * The size of any output block, that contains any member decorated with + code:Offset that is a 64-bit type, must: be a multiple of 8 + * The first member of an output block that specifies a code:Offset + decoration must: specify a code:Offset value that is aligned to an 8 + byte boundary if that block contains any member decorated with + code:Offset and is a 64-bit type + * Output variables or block members decorated with code:Offset that have a + 32-bit type, or a composite type contains a 32-bit type, must: specify + an code:Offset value aligned to a 4 byte boundary + * Output variables, blocks or block members decorated with code:Offset + must: only contain base types that have components that are either + 32-bit or 64-bit in size + * The Stream value to code:OpEmitStreamVertex and + code:OpEndStreamPrimitive must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams + * If the geometry shader emits to more than one vertex stream and + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackStreamsLinesTriangles + is ename:VK_FALSE, then execution mode must: be code:OutputPoints + * Only variables or block members in the output interface decorated with + code:Offset can: be captured for transform feedback, and those variables + or block memebers must: also be decorated with code:XfbBuffer and + code:XfbStride, or inherit code:XfbBuffer and code:XfbStride decorations + from a block that contains them + * All variables or block members in the output interface of the entry + point being compiled decorated with a specific code:XfbBuffer value + must: all be decorated with identical code:XfbStride values + * If any variables or block members in the output interface of the entry + point being compiled are decorated with code:Stream, then all variables + belonging to the same code:XfbBuffer must specify the same code:Stream + value + * Output variables, blocks or block members that are not decorated with + code:Stream default to vertex stream zero + * For any two variables or block members in the output interface of the + entry point being compiled with the same code:XfbBuffer value, the + ranges determined by the code:Offset decoration and the size of the type + must: not overlap + * The stream number value to code:Stream must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams + * The XFB Stride value to code:XfbStride must be less than or equal to + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferDataStride +endif::VK_EXT_transform_feedback[] [[spirvenv-precision-operation]] == Precision and Operation of SPIR-V Instructions diff --git a/chapters/VK_EXT_debug_report.txt b/chapters/VK_EXT_debug_report.txt index ca264f6e..aa15aaa8 100644 --- a/chapters/VK_EXT_debug_report.txt +++ b/chapters/VK_EXT_debug_report.txt @@ -156,9 +156,9 @@ layer-specified manner. The application should: always return ename:VK_FALSE. The ename:VK_TRUE value is reserved for use in layer development. -pname:object must: be a Vulkan object or ename:VK_NULL_HANDLE. +pname:object must: be a Vulkan object or dlink:VK_NULL_HANDLE. If pname:objectType is not ename:VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT and -pname:object is not ename:VK_NULL_HANDLE, pname:object must: be a Vulkan +pname:object is not dlink:VK_NULL_HANDLE, pname:object must: be a Vulkan object of the corresponding type associated with pname:objectType as defined in <>. -- @@ -254,7 +254,7 @@ include::../api/protos/vkDebugReportMessageEXT.txt[] type of object being used or created at the time the event was triggered. * pname:object this is the object where the issue was detected. - pname:object can: be ename:VK_NULL_HANDLE if there is no object + pname:object can: be dlink:VK_NULL_HANDLE if there is no object associated with the event. * pname:location is an application defined value. * pname:messageCode is an application defined value. @@ -272,10 +272,10 @@ registered. .Valid Usage **** * [[VUID-vkDebugReportMessageEXT-object-01241]] - pname:object must: be a Vulkan object or ename:VK_NULL_HANDLE + pname:object must: be a Vulkan object or dlink:VK_NULL_HANDLE * [[VUID-vkDebugReportMessageEXT-objectType-01498]] If pname:objectType is not ename:VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT - and pname:object is not ename:VK_NULL_HANDLE, pname:object must: be a + and pname:object is not dlink:VK_NULL_HANDLE, pname:object must: be a Vulkan object of the corresponding type associated with pname:objectType as defined in <>. **** diff --git a/chapters/VK_KHR_display/display.txt b/chapters/VK_KHR_display/display.txt index 579f0934..8906a93d 100644 --- a/chapters/VK_KHR_display/display.txt +++ b/chapters/VK_KHR_display/display.txt @@ -199,7 +199,7 @@ include::../../api/structs/VkDisplayPlanePropertiesKHR.txt[] * pname:currentDisplay is the handle of the display the plane is currently associated with. If the plane is not currently attached to any displays, this will be - sname:VK_NULL_HANDLE. + dlink:VK_NULL_HANDLE. * pname:currentStackIndex is the current z-order of the plane. This will be between 0 and the value returned by fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR in diff --git a/chapters/VK_KHR_swapchain/wsi.txt b/chapters/VK_KHR_swapchain/wsi.txt index 0fa8a962..4b57c1c4 100644 --- a/chapters/VK_KHR_swapchain/wsi.txt +++ b/chapters/VK_KHR_swapchain/wsi.txt @@ -873,8 +873,8 @@ include::../../api/structs/VkAcquireNextImageInfoKHR.txt[] acquired. * pname:timeout specifies how long the function waits, in nanoseconds, if no image is available. - * pname:semaphore is code:VK_NULL_HANDLE or a semaphore to signal. - * pname:fence is code:VK_NULL_HANDLE or a fence to signal. + * pname:semaphore is dlink:VK_NULL_HANDLE or a semaphore to signal. + * pname:fence is dlink:VK_NULL_HANDLE or a fence to signal. * pname:deviceMask is a mask of physical devices for which the swapchain image will be ready to use when the semaphore or fence is signaled. diff --git a/chapters/VK_NN_vi_surface/platformCreateSurface_vi.txt b/chapters/VK_NN_vi_surface/platformCreateSurface_vi.txt index a8689891..787adb18 100644 --- a/chapters/VK_NN_vi_surface/platformCreateSurface_vi.txt +++ b/chapters/VK_NN_vi_surface/platformCreateSurface_vi.txt @@ -27,9 +27,14 @@ surface for the same code:nn::code:vi::code:Layer and any attempts to connect to the same code:nn::code:vi::code:Layer through other platform mechanisms will have undefined: results. -The pname:currentExtent of a VI surface is always undefined:. -Applications are expected to choose an appropriate size for the swapchain's -pname:imageExtent (e.g., by matching the result of a call to +If the native window is created with a specified size, pname:currentExtent +will reflect that size. +In this case, applications should use the same size for the swapchain's +pname:imageExtent. +Otherwise, the pname:currentExtent will have the special value +[eq]#(0xFFFFFFFF, 0xFFFFFFFF), indicating that applications are expected to +choose an appropriate size for the swapchain's pname:imageExtent (e.g., by +matching the result of a call to code:nn::code:vi::code:GetDisplayResolution). include::../../validity/protos/vkCreateViSurfaceNN.txt[] diff --git a/chapters/cmdbuffers.txt b/chapters/cmdbuffers.txt index 752c3f0d..cadf2151 100644 --- a/chapters/cmdbuffers.txt +++ b/chapters/cmdbuffers.txt @@ -1476,6 +1476,11 @@ ifdef::VK_VERSION_1_1[] If pname:commandBuffer is an unprotected command buffer, then each element of pname:pCommandBuffers must: be an unprotected command buffer. endif::VK_VERSION_1_1[] +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdExecuteCommands-None-02286]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] + **** include::../validity/protos/vkCmdExecuteCommands.txt[] diff --git a/chapters/devsandqueues.txt b/chapters/devsandqueues.txt index 51921479..e65270e1 100644 --- a/chapters/devsandqueues.txt +++ b/chapters/devsandqueues.txt @@ -464,6 +464,30 @@ include::../validity/structs/VkConformanceVersionKHR.txt[] endif::VK_KHR_driver_properties[] +ifdef::VK_EXT_pci_bus_info[] + +[open,refpage='VkPhysicalDevicePCIBusInfoPropertiesEXT',desc='Structure containing PCI bus information of a physical device',type='structs'] +-- + +To query the PCI bus information of a physical device, add +slink:VkPhysicalDevicePCIBusInfoPropertiesEXT to the pname:pNext chain of +the slink:VkPhysicalDeviceProperties2 structure. +The sname:VkPhysicalDevicePCIBusInfoPropertiesEXT structure is defined as: + +include::../api/structs/VkPhysicalDevicePCIBusInfoPropertiesEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:pciDomain is the PCI bus domain. + * pname:pciBus is the PCI bus identifier. + * pname:pciDevice is the PCI device identifier. + * pname:pciFunction is the PCI device function identifier. + +include::../validity/structs/VkPhysicalDevicePCIBusInfoPropertiesEXT.txt[] +-- + +endif::VK_EXT_pci_bus_info[] + endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[] [open,refpage='vkGetPhysicalDeviceQueueFamilyProperties',desc='Reports properties of the queues of the specified physical device',type='protos'] @@ -1504,7 +1528,7 @@ The queue returned by fname:vkGetDeviceQueue2 must: have the same pname:flags value from this structure as that used at device creation time in a sname:VkDeviceQueueCreateInfo instance. If no matching pname:flags were specified at device creation time then -pname:pQueue will return code:VK_NULL_HANDLE. +pname:pQueue will return dlink:VK_NULL_HANDLE. .Valid Usage **** diff --git a/chapters/drawing.txt b/chapters/drawing.txt index bafb1cf7..3ece6e91 100644 --- a/chapters/drawing.txt +++ b/chapters/drawing.txt @@ -2210,6 +2210,216 @@ include::../validity/protos/vkCmdDrawIndexedIndirectCountAMD.txt[] -- endif::VK_AMD_draw_indirect_count[] +ifdef::VK_EXT_transform_feedback[] +[[drawing-transform-feedback]] +=== Drawing Transform Feedback + +It is possible to draw vertex data that was previously captured during +active <> by binding +one or more of the transform feedback buffers as vertex buffers. +A pipeline barrier is required between using the buffers as transform +feedback buffers and vertex buffers to ensure all writes to the transform +feedback buffers are visible when the data is read as vertex attributes. +The source access is ename:VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT and +the destination access is ename:VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT for the +pipeline stages ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT and +ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT respectively. +The value written to the counter buffer by +flink:vkCmdEndTransformFeedbackEXT can: be used to determine the vertex +count for the draw. +A pipeline barrier is required between using the counter buffer for +fname:vkCmdEndTransformFeedbackEXT and fname:vkCmdDrawIndirectByteCountEXT +where the source access is +ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT and the destination +access is ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT for the pipeline stages +ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT and +ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT respectively. + +[open,refpage='vkCmdDrawIndirectByteCountEXT',desc='Draw primitives where the vertex count is derived from the counter byte value in the counter buffer',type='protos'] +-- + +To record a non-indexed draw call, where the vertex count is based on a byte +count read from a buffer and the passed in vertex stride parameter, call: + +include::../api/protos/vkCmdDrawIndirectByteCountEXT.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:instanceCount is the number of instances to draw. + * pname:firstInstance is the instance ID of the first instance to draw. + * pname:counterBuffer is the buffer handle from where the byte count is + read. + * pname:counterBufferOffset is the offset into the buffer used to read the + byte count, which is used to calculate the vertex count for this draw + call. + * pname:counterOffset is subtracted from the byte count read from the + pname:counterBuffer at the pname:counterBufferOffset + * pname:vertexStride is the stride in bytes between each element of the + vertex data that is used to calculate the vertex count from the counter + value. + This value is typically the same value that was used in the graphics + pipeline state when the transform feedback was captured as the + code:XfbStride. + +When the command is executed, primitives are assembled in the same way as +done with flink:vkCmdDraw except the pname:vertexCount is calculated based +on the byte count read from pname:counterBuffer at offset +pname:counterBufferOffset. +The assembled primitives execute the bound graphics pipeline. + +The effective pname:vertexCount is calculated as follows: + +[source,c] +--------------------------------------------------- +const uint32_t * counterBufferPtr = (const uint8_t *)counterBuffer.address + counterBufferOffset; +vertexCount = floor(max(0, (*counterBufferPtr - counterOffset)) / vertexStride); +--------------------------------------------------- + +The effective pname:firstVertex is zero. + +.Valid Usage +**** + * [[VUID-vkCmdDrawIndirectByteCountEXT-transformFeedback-02287]] + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:transformFeedback + must: be enabled + * [[VUID-vkCmdDrawIndirectByteCountEXT-transformFeedbackDraw-02288]] + The implementation must: support + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackDraw + * [[VUID-vkCmdDrawIndirectByteCountEXT-vertexStride-02289]] + pname:vertexStride must be less than or equal to + slink:VkPhysicalDeviceLimits::pname:maxVertexInputBindingStride + * [[VUID-vkCmdDrawIndirectByteCountEXT-counterBuffer-02290]] + pname:counterBuffer must: have been created with the + ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + * [[VUID-vkCmdDrawIndirectByteCountEXT-renderPass-02291]] + The current render pass must: be <> + with the pname:renderPass member of the + sname:VkGraphicsPipelineCreateInfo structure specified when creating the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-vkCmdDrawIndirectByteCountEXT-subpass-02292]] + The subpass index of the current render pass must: be equal to the + pname:subpass member of the sname:VkGraphicsPipelineCreateInfo structure + specified when creating the sname:VkPipeline bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02293]] + For each set _n_ that is statically used by the sname:VkPipeline bound + to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have + been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for set _n_, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02294]] + For each push constant that is statically used by the sname:VkPipeline + bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value + must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a + sname:VkPipelineLayout that is compatible for push constants, with the + sname:VkPipelineLayout used to create the current sname:VkPipeline, as + described in <> + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02295]] + Descriptors in each bound descriptor set, specified via + fname:vkCmdBindDescriptorSets, must: be valid if they are statically + used by the bound sname:VkPipeline object, specified via + fname:vkCmdBindPipeline + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02296]] + All vertex input bindings accessed via vertex input variables declared + in the vertex shader entry point's interface must: have valid buffers + bound + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02297]] + For a given vertex buffer binding, any attribute data fetched must: be + entirely contained within the corresponding vertex buffer binding, as + described in <> + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02298]] + A valid graphics pipeline must: be bound to the current command buffer + with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02299]] + If the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that + state must: have been set on the current command buffer + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02300]] + Every input attachment used by the current subpass must: be bound to the + pipeline via a descriptor set + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02301]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used to sample from any + sname:VkImage with a sname:VkImageView of the type + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, + ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02302]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions with + code:ImplicitLod, code:Dref or code:Proj in their name, in any shader + stage + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02303]] + If any sname:VkSampler object that is accessed from a shader by the + sname:VkPipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses + unnormalized coordinates, it must: not be used with any of the SPIR-V + `OpImageSample*` or `OpImageSparseSample*` instructions that includes a + LOD bias or any offset values, in any shader stage + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02304]] + Image subresources used as attachments in the current render pass must: + not be accessed in any way other than as an attachment by this command + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02305]] + If a sname:VkImageView is sampled with with ename:VK_FILTER_LINEAR as a + result of this command, then the image view's + <> must: contain + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT +ifdef::VK_IMG_filter_cubic[] + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02306]] + If a sname:VkImageView is sampled with with ename:VK_FILTER_CUBIC_IMG as + a result of this command, then the image view's + <> must: contain + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG + * [[VUID-vkCmdDrawIndirectByteCountEXT-None-02307]] + Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_IMG as a + result of this command must: not have a elink:VkImageViewType of + ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, or + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY +endif::VK_IMG_filter_cubic[] +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdDrawIndirectByteCountEXT-maxMultiviewInstanceIndex-02308]] + If the draw is recorded in a render pass instance with multiview + enabled, the maximum instance index must: be less than or equal to + slink:VkPhysicalDeviceMultiviewProperties::pname:maxMultiviewInstanceIndex +endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_VERSION_1_1[] + * [[VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02309]] + If pname:commandBuffer is an unprotected command buffer, and any + pipeline stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS reads from or writes to any image + or buffer, that image or buffer must: not be a protected image or + protected buffer + * [[VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02310]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage in the sname:VkPipeline object bound to + ename:VK_PIPELINE_BIND_POINT_GRAPHICS writes to any image or buffer, + that image or buffer must: not be an unprotected image or unprotected + buffer + * [[VUID-vkCmdDrawIndirectByteCountEXT-commandBuffer-02311]] + If pname:commandBuffer is a protected command buffer, and any pipeline + stage other than the framebuffer-space pipeline stages in the + sname:VkPipeline object bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS + reads from or writes to any image or buffer, the image or buffer must: + not be a protected image or protected buffer +endif::VK_VERSION_1_1[] +ifdef::VK_EXT_sample_locations[] + * [[VUID-vkCmdDrawIndirectByteCountEXT-sampleLocationsEnable-02312]] + If the bound graphics pipeline was created with + slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable + set to ename:VK_TRUE and the current subpass has a depth/stencil + attachment, then that attachment must: have been created with the + ename:VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit set +endif::VK_EXT_sample_locations[] +**** + +include::../validity/protos/vkCmdDrawIndirectByteCountEXT.txt[] +-- + +endif::VK_EXT_transform_feedback[] + ifdef::VK_EXT_conditional_rendering[] [[drawing-conditional-rendering]] diff --git a/chapters/features.txt b/chapters/features.txt old mode 100755 new mode 100644 index cd28bb29..447cf3f2 --- a/chapters/features.txt +++ b/chapters/features.txt @@ -564,13 +564,15 @@ supported properties of individual formats as normal. This also specifies whether shader modules can: declare the code:ImageGatherExtended capability. * [[features-features-shaderStorageImageExtendedFormats]] - pname:shaderStorageImageExtendedFormats specifies whether the extended - storage image formats are available in shader code. - If this feature is not enabled, the formats requiring the - code:StorageImageExtendedFormats capability are not supported for - storage images. - This also specifies whether shader modules can: declare the - code:StorageImageExtendedFormats capability. + pname:shaderStorageImageExtendedFormats specifies whether all the + extended storage image formats are available in shader code. + If this feature is enabled then the + ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT feature must: be supported in + pname:optimalTilingFeatures for all of the extended formats. + To query for additional properties, or if the feature is not enabled, + flink:vkGetPhysicalDeviceFormatProperties and + flink:vkGetPhysicalDeviceImageFormatProperties can: be used to check for + supported properties of individual formats as normal. * [[features-features-shaderStorageImageMultisample]] pname:shaderStorageImageMultisample specifies whether multisampled storage images are supported. @@ -1437,6 +1439,36 @@ include::../validity/structs/VkPhysicalDeviceASTCDecodeFeaturesEXT.txt[] endif::VK_EXT_astc_decode_mode[] +ifdef::VK_EXT_transform_feedback[] + +[open,refpage='VkPhysicalDeviceTransformFeedbackFeaturesEXT',desc='Structure describing transform feedback features that can be supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT structure is defined +as: + +include::../api/structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.txt[] + +The members of the sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT +structure describe the following features: + + * [[features-features-transformFeedback]] pname:transformFeedback + indicates whether the implementation supports transform feedback and + shader modules can: declare the code:TransformFeedback capability. + + * [[features-features-geometryStreams]] pname:geometryStreams indicates + whether the implementation supports the code:GeometryStreams SPIR-V + capability. + +If the sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT structure is +included in the pname:pNext chain of slink:VkPhysicalDeviceFeatures2KHR, it +is filled with values indicating whether each feature is supported. +sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT can: also be used in the +pname:pNext chain of slink:VkDeviceCreateInfo to enable features. + +include::../validity/structs/VkPhysicalDeviceTransformFeedbackFeaturesEXT.txt[] +-- + +endif::VK_EXT_transform_feedback[] ifdef::VK_KHR_vulkan_memory_model[] [open,refpage='VkPhysicalDeviceVulkanMemoryModelFeaturesKHR',desc='Structure describing features supported by VK_KHR_vulkan_memory_model',type='structs'] @@ -3691,6 +3723,90 @@ is filled with the implementation-dependent limits. endif::VK_NV_shading_rate_image[] +ifdef::VK_EXT_transform_feedback[] + +[open,refpage='VkPhysicalDeviceTransformFeedbackPropertiesEXT',desc='Structure describing transform feedback properties that can be supported by an implementation',type='structs'] +-- + +The sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT structure is +defined as: + +include::../api/structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.txt[] + +The members of the sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT +structure describe the following implementation-dependent limits: + + * [[features-limits-maxTransformFeedbackStreams]] + pname:maxTransformFeedbackStreams is the maximum number of vertex + streams that can be output from geometry shaders declared with the + code:GeometryStreams capability. + If the implementation does not support + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:geometryStreams + then pname:maxTransformFeedbackStreams must: be set to `1`. + + * [[features-limits-maxTransformFeedbackBuffers]] + pname:maxTransformFeedbackBuffers is the maximum number of transform + feedback buffers that can be bound for capturing shader outputs from the + last vertex processing stage. + + * [[features-limits-maxTransformFeedbackBufferSize]] + pname:maxTransformFeedbackBufferSize is the maximum size that can be + specified when binding a buffer for transform feedback in + flink:vkCmdBindTransformFeedbackBuffersEXT. + + * [[features-limits-maxTransformFeedbackStreamDataSize]] + pname:maxTransformFeedbackStreamDataSize is the maximum amount of data + in bytes for each vertex that captured to one or more transform feedback + buffers associated with a specific vertex stream. + + * [[features-limits-maxTransformFeedbackBufferDataSize]] + pname:maxTransformFeedbackBufferDataSize is the maximum amount of data + in bytes for each vertex that can be captured to a specific transform + feedback buffer. + + * [[features-limits-maxTransformFeedbackBufferDataStride]] + pname:maxTransformFeedbackBufferDataStride is the maximum stride between + each capture of vertex data to the buffer. + + * [[features-limits-transformFeedbackQueries]] + pname:transformFeedbackQueries is true if the implementation supports + the ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT query type. + pname:transformFeedbackQueries is false if queries of this type cannot: + be created. + + * [[features-limits-transformFeedbackStreamsLinesTriangles]] + pname:transformFeedbackStreamsLinesTriangles is true if the + implementation supports the geometry shader code:OpExecutionMode of + code:OutputLineStrip and code:OutputTriangleStrip in addition to + code:OutputPoints when more than one vertex stream is output. + If pname:transformFeedbackStreamsLinesTriangles is false the + implementation only supports an code:OpExecutionMode of + code:OutputPoints when more than one vertex stream is output from the + geometry shader. + + * [[features-limits-transformFeedbackRasterizationStreamSelect]] + pname:transformFeedbackRasterizationStreamSelect is true if the + implementation supports the code:GeometryStreams SPIR-V capability and + the application can use + slink:VkPipelineRasterizationStateStreamCreateInfoEXT to modify which + vertex stream output is used for rasterization. + Otherwise vertex stream `0` must: always be used for rasterization. + + * [[features-limits-transformFeedbackDraw]] pname:transformFeedbackDraw is + true if the implementation supports the + flink:vkCmdDrawIndirectByteCountEXT function otherwise the function + must: not be called. + +include::../validity/structs/VkPhysicalDeviceTransformFeedbackPropertiesEXT.txt[] + +If the sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT structure is +included in the pname:pNext chain of slink:VkPhysicalDeviceProperties2KHR, +it is filled with the implementation-dependent limits and properties. + +-- + +endif::VK_EXT_transform_feedback[] + [[features-limits-minmax]] === Limit Requirements @@ -3847,6 +3963,18 @@ ifdef::VK_NV_mesh_shader[] | code:uint32_t | pname:meshOutputPerVertexGranularity | `<>` | code:uint32_t | pname:meshOutputPerPrimitiveGranularity | `<>` endif::VK_NV_mesh_shader[] +ifdef::VK_EXT_transform_feedback[] +| code:uint32_t | pname:maxTransformFeedbackStreams | `<>` +| code:uint32_t | pname:maxTransformFeedbackBuffers | `<>` +| basetype:VkDeviceSize | pname:maxTransformFeedbackBufferSize | `<>` +| code:uint32_t | pname:maxTransformFeedbackStreamDataSize | `<>` +| code:uint32_t | pname:maxTransformFeedbackBufferDataSize | `<>` +| code:uint32_t | pname:maxTransformFeedbackBufferDataStride | `<>` +| code:VkBool32 | pname:transformFeedbackQueries | `<>` +| code:VkBool32 | pname:transformFeedbackStreamsLinesTriangles | `<>` +| code:VkBool32 | pname:transformFeedbackRasterizationStreamSelect | `<>` +| code:VkBool32 | pname:transformFeedbackDraw | `<>` +endif::VK_EXT_transform_feedback[] |==== [[features-limits-required]] @@ -4058,6 +4186,18 @@ ifdef::VK_NV_mesh_shader[] | pname:meshOutputPerVertexGranularity | - | - | implementation dependent | pname:meshOutputPerPrimitiveGranularity | - | - | implementation dependent endif::VK_NV_mesh_shader[] +ifdef::VK_EXT_transform_feedback[] +| pname:maxTransformFeedbackStreams | - | 1 | min +| pname:maxTransformFeedbackBuffers | - | 1 | min +| pname:maxTransformFeedbackBufferSize | - | 2^27^ | min +| pname:maxTransformFeedbackStreamDataSize | - | 512 | min +| pname:maxTransformFeedbackBufferDataSize | - | 512 | min +| pname:maxTransformFeedbackBufferDataStride | - | 512 | min +| pname:transformFeedbackQueries | - | false | implementation dependent +| pname:transformFeedbackStreamsLinesTriangles | - | false | implementation dependent +| pname:transformFeedbackRasterizationStreamSelect | - | false | implementation dependent +| pname:transformFeedbackDraw | - | false | implementation dependent +endif::VK_EXT_transform_feedback[] |==== 1:: @@ -7254,10 +7394,15 @@ pname:sType and pname:pNext added for extensibility. ifdef::VK_EXT_image_drm_format_modifier[] .Valid Usage **** - * [[VUID-VkPhysicalDeviceImageFormatInfo2KHR-tiling-02249]] + * [[VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02249]] pname:tiling must: be ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT if and only if the pname:pNext chain contains slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT. + * [[VUID-VkPhysicalDeviceImageFormatInfo2-tiling-02313]] + If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and + pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the + pname:pNext chain must: contain slink:VkImageFormatListCreateInfoKHR + with non-zero pname:viewFormatCount. **** endif::VK_EXT_image_drm_format_modifier[] @@ -7667,6 +7812,13 @@ include::../api/structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.txt[] corresponding to slink:VkImageDrmFormatModifierExplicitCreateInfoEXT::pname:modifier or to slink:VkImageDrmFormatModifierListCreateInfoEXT::pname:pModifiers. + * pname:sharingMode specifies how the image will be accessed by multiple + queue families. + * pname:queueFamilyIndexCount is the number of entries in the + pname:pQueueFamilyIndices array. + * pname:pQueueFamilyIndices is a list of queue families that will access + the image (ignored if pname:sharingMode is not + ename:VK_SHARING_MODE_CONCURRENT). If the pname:drmFormatModifier is incompatible with the parameters specified in slink:VkPhysicalDeviceImageFormatInfo2 and its pname:pNext chain, then @@ -7675,6 +7827,23 @@ ename:VK_ERROR_FORMAT_NOT_SUPPORTED. The implementation must: support the query of any pname:drmFormatModifier, including unknown and invalid modifier values. +.Valid Usage +**** + * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02314]] + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then + pname:pQueueFamilyIndices must: be a valid pointer to an array of + pname:queueFamilyIndexCount basetype:uint32_t values. + * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02315]] + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then + pname:queueFamilyIndexCount must: be greater than `1`. + * [[VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-02316]] + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, each element + of pname:pQueueFamilyIndices must: be unique and must: be less than the + pname:pQueueFamilyPropertyCount returned by + flink:vkGetPhysicalDeviceQueueFamilyProperties2 for the + pname:physicalDevice that was used to create pname:device. +**** + include::../validity/structs/VkPhysicalDeviceImageDrmFormatModifierInfoEXT.txt[] -- endif::VK_EXT_image_drm_format_modifier[] @@ -8410,3 +8579,44 @@ zero or more slink:VkExternalFenceFeatureFlagBits. -- endif::VK_VERSION_1_1,VK_KHR_external_fence_capabilities[] + +ifdef::VK_EXT_calibrated_timestamps[] + +[[features-timestamp-calibration]] +== Timestamp Calibration Capabilities + +[open,refpage='vkGetPhysicalDeviceCalibrateableTimeDomainsEXT',desc='Query calibrateable time domains',type='protos'] +-- + +To query the set of time domains for which a physical device supports +timestamp calibration, call: + +include::../api/protos/vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.txt[] + + * pname:physicalDevice is the physical device from which to query the set + of calibrateable time domains. + * pname:pTimeDomainCount is a pointer to an integer related to the number + of calibrateable time domains available or queried, as described below. + * pname:pTimeDomains is either `NULL` or a pointer to an array of + elink:VkTimeDomainEXT values, indicating the supported calibrateable + time domains. + +If pname:pTimeDomains is `NULL`, then the number of calibrateable time +domains supported for the given pname:physicalDevice is returned in +pname:pTimeDomainCount. +Otherwise, pname:pTimeDomainCount must: point to a variable set by the user +to the number of elements in the pname:pTimeDomains array, and on return the +variable is overwritten with the number of values actually written to +pname:pTimeDomains. +If the value of pname:pTimeDomainCount is less than the number of +calibrateable time domains supported, at most pname:pTimeDomainCount values +will be written to pname:pTimeDomains. +If pname:pTimeDomainCount is smaller than the number of calibrateable time +domains supported for the given pname:physicalDevice, ename:VK_INCOMPLETE +will be returned instead of ename:VK_SUCCESS to indicate that not all the +available values were returned. + +include::../validity/protos/vkGetPhysicalDeviceCalibrateableTimeDomainsEXT.txt[] +-- + +endif::VK_EXT_calibrated_timestamps[] diff --git a/chapters/interfaces.txt b/chapters/interfaces.txt index bd0a11d3..55729ae7 100755 --- a/chapters/interfaces.txt +++ b/chapters/interfaces.txt @@ -103,6 +103,10 @@ the subsequent stage if the two variables are declared with the same code:Location and code:Component decoration and match in type and decoration, except that <> are not required: to match. +ifdef::VK_EXT_transform_feedback +code:XfbBuffer, code:XfbStride, code:Offset, and code:Stream are also not +required to match for the purposes of interface matching. +endif::VK_EXT_transform_feedback For the purposes of interface matching, variables declared without a code:Component decoration are considered to have a code:Component decoration of zero. diff --git a/chapters/memory.txt b/chapters/memory.txt index eeb8e74b..3afe713f 100644 --- a/chapters/memory.txt +++ b/chapters/memory.txt @@ -987,7 +987,7 @@ ifdef::VK_NV_dedicated_allocation[or] endif::VK_KHR_dedicated_allocation[] ifdef::VK_NV_dedicated_allocation[slink:VkDedicatedAllocationMemoryAllocateInfoNV] with either its pname:image or pname:buffer field set to a value other - than ename:VK_NULL_HANDLE. + than dlink:VK_NULL_HANDLE. endif::VK_KHR_dedicated_allocation,VK_NV_dedicated_allocation[] endif::VK_KHR_external_memory[] ifdef::VK_KHR_external_memory[] @@ -1180,7 +1180,7 @@ endif::VK_KHR_dedicated_allocation[] slink:VkBufferCreateInfo::pname:flags ifdef::VK_KHR_external_memory_win32[] * [[VUID-VkMemoryDedicatedAllocateInfo-image-01876]] - If pname:image is not sname:VK_NULL_HANDLE and + If pname:image is not dlink:VK_NULL_HANDLE and slink:VkMemoryAllocateInfo defines a memory import operation with handle type ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, @@ -1206,14 +1206,14 @@ ifdef::VK_KHR_external_memory_win32[] endif::VK_KHR_external_memory_win32[] ifdef::VK_KHR_external_memory_fd[] * [[VUID-VkMemoryDedicatedAllocateInfo-image-01878]] - If pname:image is not sname:VK_NULL_HANDLE and + If pname:image is not dlink:VK_NULL_HANDLE and slink:VkMemoryAllocateInfo defines a memory import operation with handle type ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, the memory being imported must: also be a dedicated image allocation and pname:image must be identical to the image associated with the imported memory. * [[VUID-VkMemoryDedicatedAllocateInfo-buffer-01879]] - If pname:buffer is not sname:VK_NULL_HANDLE and + If pname:buffer is not dlink:VK_NULL_HANDLE and slink:VkMemoryAllocateInfo defines a memory import operation with handle type ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, the memory being imported must: also be a dedicated buffer allocation and @@ -2327,8 +2327,10 @@ include::../api/protos/vkMapMemory.txt[] This pointer minus pname:offset must: be aligned to at least slink:VkPhysicalDeviceLimits::pname:minMemoryMapAlignment. +After a successful call to fname:vkMapMemory the memory object pname:memory +is considered to be currently _host mapped_. It is an application error to call fname:vkMapMemory on a memory object that -is already mapped. +is already host mapped. [NOTE] .Note @@ -2360,7 +2362,7 @@ slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, and round the end of the range up to the nearest multiple of slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize. -While a range of device memory is mapped for host access, the application is +While a range of device memory is host mapped, the application is responsible for synchronizing both device and host access to that memory range. @@ -2376,7 +2378,7 @@ to maintaining memory access ordering. .Valid Usage **** * [[VUID-vkMapMemory-memory-00678]] - pname:memory must: not be currently mapped + pname:memory must: not be currently host mapped * [[VUID-vkMapMemory-offset-00679]] pname:offset must: be less than the size of pname:memory * [[VUID-vkMapMemory-size-00680]] @@ -2422,6 +2424,28 @@ See the description of <> for more information. ==== +ifdef::VK_EXT_external_memory_host[] +[NOTE] +.Note +==== +While memory objects imported from a handle type of +ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or +ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT are +inherently mapped to host address space, they are not considered to be host +mapped device memory unless they are explicitly host mapped using +flink:vkMapMemory. +That means flushing or invalidating host caches with respect to host +accesses performed on such memory through the original host pointer +specified at import time is the responsibility of the application and must: +be performed with appropriate synchronization primitives provided by the +platform which are outside the scope of Vulkan. +fname:vkFlushMappedMemoryRanges and fname:vkInvalidateMappedMemoryRanges, +however, can: still be used on such memory objects to synchronize host +accesses performed through the host pointer of the host mapped device memory +range returned by flink:vkMapMemory. +==== +endif::VK_EXT_external_memory_host[] + [open,refpage='vkFlushMappedMemoryRanges',desc='Flush mapped memory ranges',type='protos'] -- @@ -2444,16 +2468,16 @@ domain operations>> using the ename:VK_ACCESS_HOST_WRITE_BIT Within each range described by pname:pMemoryRanges, each set of pname:nonCoherentAtomSize bytes in that range is flushed if any byte in that -set has been written by the host since it was first mapped, or the last time -it was flushed. +set has been written by the host since it was first host mapped, or the last +time it was flushed. If pname:pMemoryRanges includes sets of pname:nonCoherentAtomSize bytes where no bytes have been written by the host, those bytes must: not be flushed. [[memory-device-unmap-does-not-flush]] -Unmapping non-coherent memory does not implicitly flush the mapped memory, -and host writes that have not been flushed may: not ever be visible to the -device. +Unmapping non-coherent memory does not implicitly flush the host mapped +memory, and host writes that have not been flushed may: not ever be visible +to the device. However, implementations must: ensure that writes that have not been flushed do not become visible to any other memory. @@ -2492,8 +2516,8 @@ invalidated without first being flushed, its contents are undefined:. Within each range described by pname:pMemoryRanges, each set of pname:nonCoherentAtomSize bytes in that range is invalidated if any byte in -that set has been written by the device since it was first mapped, or the -last time it was invalidated. +that set has been written by the device since it was first host mapped, or +the last time it was invalidated. [NOTE] .Note @@ -2525,7 +2549,7 @@ include::../api/structs/VkMappedMemoryRange.txt[] .Valid Usage **** * [[VUID-VkMappedMemoryRange-memory-00684]] - pname:memory must: be currently mapped + pname:memory must: be currently host mapped * [[VUID-VkMappedMemoryRange-size-00685]] If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:offset and pname:size must: specify a range contained within the currently mapped @@ -2566,7 +2590,7 @@ include::../api/protos/vkUnmapMemory.txt[] .Valid Usage **** * [[VUID-vkUnmapMemory-memory-00689]] - pname:memory must: be currently mapped + pname:memory must: be currently host mapped **** include::../validity/protos/vkUnmapMemory.txt[] diff --git a/chapters/pipelines.txt b/chapters/pipelines.txt index a1a116f1..5865ce68 100644 --- a/chapters/pipelines.txt +++ b/chapters/pipelines.txt @@ -929,6 +929,40 @@ endif::VK_NV_clip_space_w_scaling[] If pname:pStages includes a vertex shader stage, pname:pInputAssemblyState must: be a valid pointer to a valid slink:VkPipelineInputAssemblyStateCreateInfo structure +ifdef::VK_EXT_transform_feedback[] + * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02317]] + The code:Xfb execution mode can: be specified by only one shader stage + in pname:pStages + * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02318]] + If any shader stage in pname:pStages specifies code:Xfb execution mode + it must: be the last vertex processing stage + * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02319]] + If a + sname:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream + value other than zero is specified, all variables in the output + interface of the entry point being compiled decorated with + code:Position, code:PointSize, code:ClipDistance, or code:CullDistance + must: all be decorated with identical code:Stream values that match the + pname:rasterizationStream + * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02320]] + If + sname:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream + is zero, or not specified, all variables in the output interface of the + entry point being compiled decorated with code:Position, code:PointSize, + code:ClipDistance, or code:CullDistance must: all be decorated with a + code:Stream value of zero, or must: not specify the code:Stream + decoration + * [[VUID-VkGraphicsPipelineCreateInfo-geometryStreams-02321]] + If the last vertex processing stage is a geometry shader, and that + geometry shader uses the code:GeometryStreams capability, then + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:geometryStreams + feature must: be enabled +ifdef::VK_NV_mesh_shader[] + * [[VUID-VkGraphicsPipelineCreateInfo-None-02322]] + If there are any mesh shader stages in the pipeline there must: not be + any shader stage in the pipeline with a code:Xfb execution mode. +endif::VK_NV_mesh_shader[] +endif::VK_EXT_transform_feedback[] **** include::../validity/structs/VkGraphicsPipelineCreateInfo.txt[] @@ -1836,6 +1870,10 @@ ifdef::VK_EXT_sample_locations[] slink:VkPipelineSampleLocationsStateCreateInfoEXT when the pipeline was created endif::VK_EXT_sample_locations[] +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdBindPipeline-None-02323]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] **** include::../validity/protos/vkCmdBindPipeline.txt[] diff --git a/chapters/primsrast.txt b/chapters/primsrast.txt index 08550fc3..9415e8ff 100644 --- a/chapters/primsrast.txt +++ b/chapters/primsrast.txt @@ -205,7 +205,6 @@ If the subpass for which this pipeline is being created does not use color or depth/stencil attachments, pname:rasterizationSamples must: follow the rules for a <>. - [[primsrast-discard]] == Discarding Primitives Before Rasterization @@ -215,6 +214,104 @@ slink:VkPipelineRasterizationStateCreateInfo is enabled. When enabled, primitives are discarded after they are processed by the last active shader stage in the pipeline before rasterization. +ifdef::VK_EXT_transform_feedback[] + +[[primsrast-stream]] +== Controlling the Vertex Stream Used for Rasterization + +By default vertex data output from the last vertex processing stage are +directed to vertex stream zero. +Geometry shaders can: emit primitives to multiple independent vertex +streams. +Each vertex emitted by the geometry shader is directed at one of the vertex +streams. +As vertices are received on each vertex stream, they are arranged into +primitives of the type specified by the geometry shader output primitive +type. +The shading language instructions code:OpEndPrimitive and +code:OpEndStreamPrimitive can: be used to end the primitive being assembled +on a given vertex stream and start a new empty primitive of the same type. +An implementation supports up to +sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams +streams, which is at least 1. +The individual streams are numbered 0 through +pname:maxTransformFeedbackStreams minus 1. +There is no requirement on the order of the streams to which vertices are +emitted, and the number of vertices emitted to each vertex stream can: be +completely independent, subject only to the +sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreamDataSize +and +sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferDataSize +limits. +The primitives output from all vertex streams are passed to the transform +feedback stage to be captured to transform feedback buffers in the manner +specified by the last vertex processing stage shader's code:XfbBuffer, +code:XfbStride, and code:Offsets decorations on the output interface +variables in the graphics pipeline. +To use a vertex stream other than zero, or to use multiple streams, the +code:GeometryStreams capability must: be specified. + +By default, the primitives output from vertex stream zero are rasterized. +If the implementation supports the +slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackRasterizationStreamSelect +property it is possible to rasterize a vertex stream other than zero. + +By default, geometry shaders that emit vertices to multiple vertex streams +are limited to using only the code:OutputPoints output primitive type. +If the implementation supports the +slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackStreamsLinesTriangles +property it is possible to emit code:OutputLineStrip or +code:OutputTriangleStrip in addition to code:OutputPoints. + + +[open,refpage='VkPipelineRasterizationStateStreamCreateInfoEXT',desc='Structure defining the geometry stream used for rasterization',type='structs'] +-- + +The vertex stream used for rasterization is specified by adding a +sname:VkPipelineRasterizationStateStreamCreateInfoEXT structure to the +pname:pNext chain of a slink:VkPipelineRasterizationStateCreateInfo +structure. + +The sname:VkPipelineRasterizationStateStreamCreateInfoEXT structure is +defined as: + +include::../api/structs/VkPipelineRasterizationStateStreamCreateInfoEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:rasterizationStream is the vertex stream selected for + rasterization. + +If this structure is not present, pname:rasterizationStream is assumed to be +zero. + +.Valid Usage +**** + * [[VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-geometryStreams-02324]] + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:geometryStreams + must: be enabled + * [[VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-rasterizationStream-02325]] + pname:rasterizationStream must: be less than + slink:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams + * [[VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-rasterizationStream-02326]] + pname:rasterizationStream must: be zero if + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackRasterizationStreamSelect + is ename:VK_FALSE +**** + +include::../validity/structs/VkPipelineRasterizationStateStreamCreateInfoEXT.txt[] +-- + +[open,refpage='VkPipelineRasterizationStateStreamCreateFlagsEXT',desc='Reserved for future use',type='enums'] +-- +include::../api/flags/VkPipelineRasterizationStateStreamCreateFlagsEXT.txt[] + +sname:VkPipelineRasterizationStateStreamCreateFlagsEXT is a bitmask type for +setting a mask, but is currently reserved for future use. +-- + +endif::VK_EXT_transform_feedback[] [[primrast-order]] == Rasterization Order @@ -658,7 +755,7 @@ include::../api/protos/vkCmdBindShadingRateImageNV.txt[] recorded. * pname:imageView is an image view handle that specifies the shading rate image. - pname:imageView may: be set to ename:VK_NULL_HANDLE, which is equivalent + pname:imageView may: be set to dlink:VK_NULL_HANDLE, which is equivalent to specifying a view of an image filled with zero values. * pname:imageLayout is the layout that the image subresources accessible from pname:imageView will be in when the shading rate image is accessed. @@ -669,21 +766,21 @@ include::../api/protos/vkCmdBindShadingRateImageNV.txt[] The <> feature must: be enabled. * [[VUID-vkCmdBindShadingRateImageNV-imageView-02059]] - If pname:imageView is not ename:VK_NULL_HANDLE, it must: be a valid + If pname:imageView is not dlink:VK_NULL_HANDLE, it must: be a valid slink:VkImageView handle of type ename:VK_IMAGE_VIEW_TYPE_2D or ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY. * [[VUID-vkCmdBindShadingRateImageNV-imageView-02060]] - If pname:imageView is not ename:VK_NULL_HANDLE, it must: have a format + If pname:imageView is not dlink:VK_NULL_HANDLE, it must: have a format of ename:VK_FORMAT_R8_UINT. * [[VUID-vkCmdBindShadingRateImageNV-imageView-02061]] - If pname:imageView is not ename:VK_NULL_HANDLE, the image must: have + If pname:imageView is not dlink:VK_NULL_HANDLE, the image must: have been created with ename:VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV set * [[VUID-vkCmdBindShadingRateImageNV-imageView-02062]] - If pname:imageView is not ename:VK_NULL_HANDLE, pname:imageLayout must: + If pname:imageView is not dlink:VK_NULL_HANDLE, pname:imageLayout must: match the actual sname:VkImageLayout of each subresource accessible from pname:imageView at the time the subresource is accessed. * [[VUID-vkCmdBindShadingRateImageNV-imageLayout-02063]] - If pname:imageView is not ename:VK_NULL_HANDLE, pname:imageLayout must: + If pname:imageView is not dlink:VK_NULL_HANDLE, pname:imageLayout must: be ename:VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV or ename:VK_IMAGE_LAYOUT_GENERAL. **** @@ -707,13 +804,13 @@ layer _l_, where _l_ is the layer of the framebuffer being rendered to. If _l_ is greater than or equal to the number of layers in the image view, layer zero will be used. -If the bound shading rate image view is not ename:VK_NULL_HANDLE and +If the bound shading rate image view is not dlink:VK_NULL_HANDLE and contains a texel with coordinates (_u_,_v_) in layer _l_ (if applicable), the single unsigned integer component for that texel will be used as the shading rate index. If the (_u_,_v_) coordinate is outside the extents of the subresource used by the shading rate image view, or if the image view is -ename:VK_NULL_HANDLE, the shading rate index is zero. +dlink:VK_NULL_HANDLE, the shading rate index is zero. If the shading rate image view has multiple mipmap levels, the base level identified by sname:VkImageSubresourceRange::pname:baseMipLevel will be used. diff --git a/chapters/queries.txt b/chapters/queries.txt index 8d441804..b9557b21 100644 --- a/chapters/queries.txt +++ b/chapters/queries.txt @@ -140,6 +140,10 @@ include::../api/enums/VkQueryType.txt[] pipeline statistics query>>. * ename:VK_QUERY_TYPE_TIMESTAMP specifies a <>. +ifdef::VK_EXT_transform_feedback[] + * ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT specifies a + <>. +endif::VK_EXT_transform_feedback[] -- @@ -335,11 +339,116 @@ ifdef::VK_VERSION_1_1,VK_KHR_multiview[] view mask must: be less than or equal to the number of queries in pname:queryPool endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdBeginQuery-queryType-02327]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the + sname:VkCommandPool that pname:commandBuffer was allocated from must: + support graphics operations + * [[VUID-vkCmdBeginQuery-queryType-02328]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT then + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackQueries + must: be supported +endif::VK_EXT_transform_feedback[] **** include::../validity/protos/vkCmdBeginQuery.txt[] -- +ifdef::VK_EXT_transform_feedback[] + +[open,refpage='vkCmdBeginQueryIndexedEXT',desc='Begin an indexed query',type='protos'] +-- + +To begin an indexed query, call: + +include::../api/protos/vkCmdBeginQueryIndexedEXT.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the query pool that will manage the results of the + query. + * pname:query is the query index within the query pool that will contain + the results. + * pname:flags is a bitmask of elink:VkQueryControlFlagBits specifying + constraints on the types of queries that can: be performed. + * pname:index is the query type specific index. + When the query type is pname:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT + the index represents the vertex stream. + +The fname:vkCmdBeginQueryIndexedEXT command operates the same as the +flink:vkCmdBeginQuery command, except that it also accepts a query type +specific pname:index parameter. + +.Valid Usage +**** + * [[VUID-vkCmdBeginQueryIndexedEXT-queryPool-02329]] + pname:queryPool must: have been created with a pname:queryType that + differs from that of any queries that are + <> within pname:commandBuffer + * [[VUID-vkCmdBeginQueryIndexedEXT-None-02330]] + All queries used by the command must: be unavailable + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02331]] + If the <> feature is not enabled, or the pname:queryType used to create + pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags must: + not contain ename:VK_QUERY_CONTROL_PRECISE_BIT + * [[VUID-vkCmdBeginQueryIndexedEXT-query-02332]] + pname:query must: be less than the number of queries in pname:queryPool + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02333]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that + pname:commandBuffer was allocated from must: support graphics operations + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02334]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the + pname:pipelineStatistics indicate graphics operations, the + sname:VkCommandPool that pname:commandBuffer was allocated from must: + support graphics operations + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02335]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the + pname:pipelineStatistics indicate compute operations, the + sname:VkCommandPool that pname:commandBuffer was allocated from must: + support compute operations +ifdef::VK_VERSION_1_1[] + * [[VUID-vkCmdBeginQueryIndexedEXT-commandBuffer-02336]] + pname:commandBuffer must: not be a protected command buffer +endif::VK_VERSION_1_1[] +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdBeginQueryIndexedEXT-query-02337]] + If fname:vkCmdBeginQuery is called within a render pass instance, the + sum of pname:query and the number of bits set in the current subpass's + view mask must: be less than or equal to the number of queries in + pname:queryPool +endif::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02338]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the + sname:VkCommandPool that pname:commandBuffer was allocated from must: + support graphics operations + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02339]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the pname:index + parameter must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02340]] + If the pname:queryType used to create pname:queryPool was not + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the pname:index must: + be zero + * [[VUID-vkCmdBeginQueryIndexedEXT-queryType-02341]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT then + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:transformFeedbackQueries + must: be supported +**** + +include::../validity/protos/vkCmdBeginQueryIndexedEXT.txt[] +-- +endif::VK_EXT_transform_feedback[] + + [open,refpage='VkQueryControlFlagBits',desc='Bitmask specifying constraints on a query',type='enums'] -- @@ -411,6 +520,60 @@ endif::VK_VERSION_1_1,VK_KHR_multiview[] include::../validity/protos/vkCmdEndQuery.txt[] -- +ifdef::VK_EXT_transform_feedback[] +[open,refpage='vkCmdEndQueryIndexedEXT',desc='Ends a query',type='protos'] +-- + +To end an indexed query after the set of desired draw or dispatch commands +is recorded, call: + +include::../api/protos/vkCmdEndQueryIndexedEXT.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the query pool that is managing the results of the + query. + * pname:query is the query index within the query pool where the result is + stored. + * pname:index is the query type specific index. + +The fname:vkCmdEndQueryIndexedEXT command operates the same as the +flink:vkCmdEndQuery command, except that it also accepts a query type +specific pname:index parameter. + +.Valid Usage +**** + * [[VUID-vkCmdEndQueryIndexedEXT-None-02342]] + All queries used by the command must: be + <> + * [[VUID-vkCmdEndQueryIndexedEXT-query-02343]] + pname:query must: be less than the number of queries in pname:queryPool +ifdef::VK_VERSION_1_1[] + * [[VUID-vkCmdEndQueryIndexedEXT-commandBuffer-02344]] + pname:commandBuffer must: not be a protected command buffer +endif::VK_VERSION_1_1[] +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdEndQueryIndexedEXT-query-02345]] + If fname:vkCmdEndQuery is called within a render pass instance, the sum + of pname:query and the number of bits set in the current subpass's view + mask must: be less than or equal to the number of queries in + pname:queryPool +endif::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdEndQueryIndexedEXT-queryType-02346]] + If the pname:queryType used to create pname:queryPool was + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the pname:index + parameter must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackStreams + * [[VUID-vkCmdEndQueryIndexedEXT-queryType-02347]] + If the pname:queryType used to create pname:queryPool was not + ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the pname:index must: + be zero +**** + +include::../validity/protos/vkCmdEndQueryIndexedEXT.txt[] +-- +endif::VK_EXT_transform_feedback[] + [[queries-operation-memorylayout]] An application can: retrieve results either by requesting they be written into application-provided memory, or by requesting they be copied into a @@ -434,6 +597,18 @@ In either case, the layout in memory is defined as follows: the statistics values are written in bit order starting from the least significant bit. Timestamps write one integer value. +ifdef::VK_EXT_transform_feedback[] + Transform feedback queries write two integers; the first integer is the + number of primitives successfully written to the corresponding transform + feedback buffer and the second is the number of primitives output to the + vertex stream, regardless of whether they were successfully captured or + not. + In other words, if the transform feedback buffer was sized too small for + the number of primitives output by the vertex stream, the first integer + represents the number of primitives actually written and the second is + the number that would have been written if all the transform feedback + buffers associated with that vertex stream were large enough. +endif::VK_EXT_transform_feedback[] * If more than one query is retrieved and pname:stride is not at least as large as the size of the array of integers corresponding to a single query, the values written to memory are undefined:. @@ -1047,3 +1222,39 @@ endif::VK_VERSION_1_1,VK_KHR_multiview[] include::../validity/protos/vkCmdWriteTimestamp.txt[] -- + +ifdef::VK_EXT_transform_feedback[] + +[[queries-transform-feedback]] +== Transform Feedback Queries + +Transform feedback queries track the number of primitives attempted to be +written and actually written, by the vertex stream being captured, to a +transform feedback buffer. +This query is updated during draw commands while transform feedback is +active. +The number of primitives actually written will be less than the number +attempted to be written if the bound transform feedback buffer size was too +small for the number of primitives actually drawn. +Primitives are not written beyond the bound range of the transform feedback +buffer. +A transform feedback query is begun and ended by calling +fname:vkCmdBeginQuery and fname:vkCmdEndQuery, respectively to query for +vertex stream zero. +fname:vkCmdBeginQueryIndexedEXT and fname:vkCmdEndQueryIndexexEXT can: be +used to begin and end transform feedback queries for any supported vertex +stream. +When a transform feedback query begins, the count of primitives written and +primitives needed starts from zero. +For each drawing command, the count is incremented as vertex attribute +outputs are captured to the transform feedback buffers while transform +feedback is active. + +When a transform feedback query finishes, the result for that query is +marked as available. +The application can: then either copy the result to a buffer (via +fname:vkCmdCopyQueryPoolResults) or request it be put into host memory (via +fname:vkGetQueryPoolResults). + + +endif::VK_EXT_transform_feedback[] diff --git a/chapters/renderpass.txt b/chapters/renderpass.txt index 9936aecf..59626e9d 100644 --- a/chapters/renderpass.txt +++ b/chapters/renderpass.txt @@ -584,7 +584,7 @@ endif::VK_KHR_maintenance2[] * [[VUID-VkInputAttachmentAspectReference-aspectMask-01964]] pname:aspectMask must: not include ename:VK_IMAGE_ASPECT_METADATA_BIT ifdef::VK_EXT_image_drm_format_modifier[] - * [[VUID-VkInputAttachmentAspectReferenceKHR-aspectMask-02250]] + * [[VUID-VkInputAttachmentAspectReference-aspectMask-02250]] pname:aspectMask must: not include etext:VK_IMAGE_ASPECT_MEMORY_PLANE___i___BIT_EXT for any index __i__. endif::VK_EXT_image_drm_format_modifier[] @@ -1199,6 +1199,12 @@ if each view were a separate attachment. endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_EXT_transform_feedback[] +If any two subpasses of a render pass activate transform feedback to the +same bound transform feedback buffers, a subpass dependency must: be +included (either directly or via some intermediate subpasses) between them. +endif::VK_EXT_transform_feedback[] + ifdef::editing-notes[] [NOTE] .editing-note @@ -1558,6 +1564,12 @@ respectively. corresponding element of pname:pSubpasses includes more than one bit, its pname:dependencyFlags member must: include ename:VK_DEPENDENCY_VIEW_LOCAL_BIT +ifdef::VK_EXT_transform_feedback[] + * [[VUID-VkRenderPassCreateInfo2KHR-None-02348]] + If any two subpasses activate transform feedback to the same bound + transform feedback buffers a subpass dependency must: be included + (either directly or via some intermediate subpasses) between them +endif::VK_EXT_transform_feedback[] **** include::../validity/structs/VkRenderPassCreateInfo2KHR.txt[] @@ -2774,6 +2786,11 @@ commands for that subpass. * [[VUID-vkCmdNextSubpass-None-00909]] The current subpass index must: be less than the number of subpasses in the render pass minus one +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdNextSubpass-None-02349]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] + **** include::../validity/protos/vkCmdNextSubpass.txt[] @@ -2808,6 +2825,10 @@ a flat parameter. * [[VUID-vkCmdNextSubpass2KHR-None-03102]] The current subpass index must: be less than the number of subpasses in the render pass minus one +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdNextSubpass2KHR-None-02350]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] **** include::../validity/protos/vkCmdNextSubpass2KHR.txt[] @@ -2834,6 +2855,11 @@ the final subpass. * [[VUID-vkCmdEndRenderPass-None-00910]] The current subpass index must: be equal to the number of subpasses in the render pass minus one +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdEndRenderPass-None-02351]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] + **** include::../validity/protos/vkCmdEndRenderPass.txt[] @@ -2863,6 +2889,10 @@ flink:vkCmdEndRenderPass, except that it is extensible. * [[VUID-vkCmdEndRenderPass2KHR-None-03103]] The current subpass index must: be equal to the number of subpasses in the render pass minus one +ifdef::VK_EXT_transform_feedback[] + * [[VUID-vkCmdEndRenderPass2KHR-None-02352]] + This command must: not be recorded when transform feedback is active +endif::VK_EXT_transform_feedback[] **** include::../validity/protos/vkCmdEndRenderPass2KHR.txt[] diff --git a/chapters/resources.txt b/chapters/resources.txt index 45de848a..84b3f7df 100644 --- a/chapters/resources.txt +++ b/chapters/resources.txt @@ -225,6 +225,15 @@ ifdef::VK_EXT_conditional_rendering[] buffer is suitable for passing as the pname:buffer parameter to flink:vkCmdBeginConditionalRenderingEXT. endif::VK_EXT_conditional_rendering[] +ifdef::VK_EXT_transform_feedback[] + * ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT specifies that + the buffer is suitable for using for binding as a transform feedback + buffer with flink:vkCmdBindTransformFeedbackBuffersEXT. + * ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT + specifies that the buffer is suitable for using as a counter buffer with + flink:vkCmdBeginTransformFeedbackEXT and + flink:vkCmdEndTransformFeedbackEXT. +endif::VK_EXT_transform_feedback[] -- @@ -647,17 +656,6 @@ which the limiting values are derived. The limiting values are referenced by the relevant valid usage statements of sname:VkImageCreateInfo. -ifdef::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[] -* Let `VkExternalMemoryHandleTypeFlags imageCreateExternalMemoryHandles` be - the set of external memory handle types that may: be used with the - resultant image. - If sname:VkImageCreateInfo::pname:pNext contains an instance of - slink:VkExternalMemoryImageCreateInfo, then - pname:imageCreateExternalMemoryHandles is the value of - slink:VkExternalMemoryImageCreateInfo::pname:handleTypes. - Otherwise, pname:imageCreateExternalMemoryHandles is `0` -endif::VK_VERSION_1_1,VK_KHR_external_memory_capabilities[] - ifdef::VK_EXT_image_drm_format_modifier[] * Let `uint64_t imageCreateDrmFormatModifiers[]` be the set of <> that the @@ -743,36 +741,58 @@ ifdef::VK_ANDROID_external_memory_android_hardware_buffer[] pname:imageCreateImageFormatPropertiesList is endif::VK_ANDROID_external_memory_android_hardware_buffer[] the list of structures obtained by calling - flink:vkGetPhysicalDeviceImageFormatProperties2 for each bit in - pname:imageCreateExternalMemoryHandles, with - slink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType set to - that bit -ifndef::VK_EXT_image_drm_format_modifier[.] -ifdef::VK_EXT_image_drm_format_modifier[,] + flink:vkGetPhysicalDeviceImageFormatProperties2, possibly multiple + times, as follows: + *** The parameters + slink:VkPhysicalDeviceImageFormatInfo2::pname:format, + pname:imageType, pname:tiling, pname:usage, and pname:flags must: + be equal to those in sname:VkImageCreateInfo. + *** If slink:VkImageCreateInfo::pname:pNext contains an instance of + slink:VkExternalMemoryImageCreateInfo where pname:handleTypes is + not `0`, then slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext + must: contain an instance of + slink:VkPhysicalDeviceExternalImageFormatInfo where + pname:handleType is not `0`; and + flink:vkGetPhysicalDeviceImageFormatProperties2 must: be called for + each handle type in + slink:VkExternalMemoryImageCreateInfo::pname:handleTypes, + successively setting + slink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType on + each call. + *** If slink:VkImageCreateInfo::pname:pNext contains no instance of + slink:VkExternalMemoryImageCreateInfo or contains an instance where + pname:handleTypes is `0`, then + slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: either + contain no instance of + slink:VkPhysicalDeviceExternalImageFormatInfo or contain an + instance where pname:handleType is `0`. ifdef::VK_EXT_image_drm_format_modifier[] - and for each modifier in pname:imageCreateDrmFormatModifiers, with - slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT::pname:drmFormatModifier - set to that modifier. + *** If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, + then slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: + contain an instance of + slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT where + pname:sharingMode is equal to + slink:VkImageCreateInfo::pname:sharingMode; and, if + pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, then + pname:queueFamilyIndexCount and pname:pQueueFamilyIndices must: be + equal to those in slink:VkImageCreateInfo; and, if pname:flags + contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the + instance of slink:VkImageFormatListCreateInfoKHR in the pname:pNext + chain of slink:VkPhysicalDeviceImageFormatInfo2 must: be equivalent + to the one in the pname:pNext chain of slink:VkImageCreateInfo; and + flink:vkGetPhysicalDeviceImageFormatProperties2 must: be called for + each modifier in pname:imageCreateDrmFormatModifiers, successively + setting + slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT::pname:drmFormatModifier + on each call. + *** If pname:tiling is not + ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then + slink:VkPhysicalDeviceImageFormatInfo2::pname:pNext must: contain + no instance of slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT. endif::VK_EXT_image_drm_format_modifier[] - (If pname:imageCreateExternalMemoryHandles is empty, then - pname:imageCreateImageFormatPropertiesList is the list of structures - obtained by calling flink:vkGetPhysicalDeviceImageFormatProperties2 - with slink:VkPhysicalDeviceExternalImageFormatInfo omitted or with - slink:VkPhysicalDeviceExternalImageFormatInfo::pname:handleType equal - to `0`). -ifdef::VK_EXT_image_drm_format_modifier[] - (If pname:imageCreateDrmFormatModifiers is empty, then - pname:imageCreateImageFormatPropertiesList is the list of structures - obtained by calling flink:vkGetPhysicalDeviceImageFormatProperties2 - with slink:VkPhysicalDeviceImageDrmFormatModifierInfoEXT omitted). -endif::VK_EXT_image_drm_format_modifier[] - In each call, the parameters - slink:VkPhysicalDeviceImageFormatInfo2::pname:format, pname:imageType, - pname:tiling, pname:usage, and pname:flags must: be equal to those in - sname:VkImageCreateInfo. - If any call returns an error, then - pname:imageCreateImageFormatPropertiesList is defined to be the empty - list. + *** If any call to flink:vkGetPhysicalDeviceImageFormatProperties2 + returns an error, then pname:imageCreateImageFormatPropertiesList is + defined to be the empty list. ifdef::VK_ANDROID_external_memory_android_hardware_buffer[] ** If sname:VkImageCreateInfo::pname:pNext contains an instance of slink:VkExternalFormatANDROID with non-zero pname:externalFormat, then @@ -1151,6 +1171,11 @@ ifdef::VK_EXT_image_drm_format_modifier[] slink:VkImageDrmFormatModifierListCreateInfoEXT or slink:VkImageDrmFormatModifierExplicitCreateInfoEXT, then pname:tiling must: be ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. + * [[VUID-VkImageCreateInfo-tiling-02353]] + If pname:tiling is ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT and + pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, then the + pname:pNext chain must: contain slink:VkImageFormatListCreateInfoKHR + with non-zero pname:viewFormatCount. endif::VK_EXT_image_drm_format_modifier[] ifdef::VK_EXT_sample_locations[] * [[VUID-VkImageCreateInfo-flags-01533]] @@ -1510,16 +1535,14 @@ ename:VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT. associated with slink:VkImageCreateInfo::pname:format and pname:drmFormatModifier, as found by querying slink:VkDrmFormatModifierPropertiesListEXT. - * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-pPlaneLayouts-02266]] - For each element of pname:pPlaneLayouts: - ** [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-size-02267]] - pname:size must: be 0 - ** [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-arrayPitch-02268]] - pname:arrayPitch must: be 0 if - slink:VkImageCreateInfo::pname:arrayLayers is 1. - ** [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-depthPitch-02269]] - pname:depthPitch must: be 0 if - slink:VkImageCreateInfo::pname:extent::pname:depth is 1. + * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-size-02267]] + For each element of pname:pPlaneLayouts, pname:size must: be 0 + * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-arrayPitch-02268]] + For each element of pname:pPlaneLayouts, pname:arrayPitch must: be 0 if + slink:VkImageCreateInfo::pname:arrayLayers is 1. + * [[VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-depthPitch-02269]] + For each element of pname:pPlaneLayouts, pname:depthPitch must: be 0 if + slink:VkImageCreateInfo::pname:extent::pname:depth is 1. **** include::../validity/structs/VkImageDrmFormatModifierExplicitCreateInfoEXT.txt[] @@ -1992,7 +2015,8 @@ include::../validity/structs/VkSubresourceLayout.txt[] -- ifdef::VK_EXT_image_drm_format_modifier[] -[open,refpage='vkGetImageDrmFormatModifierPropertiesEXT',desc='Returns an image's DRM format modifier',type='protos'] + +[open,refpage='vkGetImageDrmFormatModifierPropertiesEXT',desc='Returns an image\'s DRM format modifier',type='protos'] -- If an image was created with ename:VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the image has a <>. ifdef::VK_EXT_conditional_rendering[] |ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT endif::VK_EXT_conditional_rendering[] +ifdef::VK_EXT_transform_feedback[] +|ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT | ename:VK_QUEUE_GRAPHICS_BIT +endif::VK_EXT_transform_feedback[] ifdef::VK_NVX_device_generated_commands[] |ename:VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT endif::VK_NVX_device_generated_commands[] @@ -576,6 +588,9 @@ endif::VK_NV_mesh_shader[] * ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT * ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT * ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +ifdef::VK_EXT_transform_feedback[] + * ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT +endif::VK_EXT_transform_feedback[] ifdef::VK_NV_shading_rate_image[] * ename:VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV endif::VK_NV_shading_rate_image[] @@ -670,9 +685,9 @@ Access types that can: be set in an access mask include: include::../api/enums/VkAccessFlagBits.txt[] - * ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to an - indirect command structure read as part of an indirect drawing or - dispatch command. + * ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to + indirect command data read as part of an indirect drawing or dispatch + command. * ename:VK_ACCESS_INDEX_READ_BIT specifies read access to an index buffer as part of an indexed drawing command, bound by flink:vkCmdBindIndexBuffer. @@ -747,6 +762,16 @@ ifdef::VK_EXT_conditional_rendering[] * ename:VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT specifies read access to a predicate as part of conditional rendering. endif::VK_EXT_conditional_rendering[] +ifdef::VK_EXT_transform_feedback[] + * ename:VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT specifies write access + to a transform feedback buffer made when transform feedback is active. + * ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT specifies read + access to a transform feedback counter buffer which is read when + fname:vkCmdBeginTransformFeedbackEXT executes. + * ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT specifies write + access to a transform feedback counter buffer which is written when + fname:vkCmdEndTransformFeedbackEXT executes. +endif::VK_EXT_transform_feedback[] ifdef::VK_NVX_device_generated_commands[] * ename:VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX specifies reads from sname:VkBuffer inputs to flink:vkCmdProcessCommandsNVX. @@ -817,6 +842,11 @@ endif::VK_EXT_conditional_rendering[] ifdef::VK_NV_shading_rate_image[] |ename:VK_ACCESS_SHADING_RATE_IMAGE_BIT_NV | ename:VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV endif::VK_NV_shading_rate_image[] +ifdef::VK_EXT_transform_feedback[] +|ename:VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT | ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT +|ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT | ename:VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT +|ename:VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT | ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT +endif::VK_EXT_transform_feedback[] |==== [[synchronization-host-access-types]] @@ -4404,3 +4434,98 @@ An event can: only be waited on by the same physical device that signaled it (or the host). endif::VK_VERSION_1_1,VK_KHR_device_group[] + +ifdef::VK_EXT_calibrated_timestamps[] + +[[calibrated-timestamps]] +== Calibrated timestamps + +[open,refpage='vkGetCalibratedTimestampsEXT',desc='Query calibrated timestamps',type='protos'] +-- + +In order to be able to correlate the time a particular operation took place +at on timelines of different time domains (e.g. a device operation vs a host +operation), Vulkan allows querying calibrated timestamps from multiple time +domains. + +To query calibrated timestamps from a set of time domains, call: + +include::../api/protos/vkGetCalibratedTimestampsEXT.txt[] + + * pname:device is the logical device used to perform the query. + * pname:timestampCount is the number of timestamps to query. + * pname:pTimestampInfos is a pointer to an array of pname:timestampCount + number of structures of type slink:VkCalibratedTimestampInfoEXT, + describing the time domains the calibrated timestamps should be captured + from. + * pname:pTimestamps is a pointer to an array of pname:timestampCount + number of 64-bit unsigned integer values in which the requested + calibrated timestamp values are returned. + * pname:pMaxDeviation is a pointer to a 64-bit unsigned integer value in + which the strictly positive maximum deviation, in nanoseconds, of the + calibrated timestamp values is returned. + +[NOTE] +.Note +==== +The maximum deviation may: vary between calls to +fname:vkGetCalibratedTimestampsEXT even for the same set of time domains due +to implementation and platform specific reasons. +It's the application's responsibility to assess whether the returned maximum +deviation makes the timestamp values suitable for any particular purpose and +can: choose to re-issue the timestamp calibration call pursuing a lower +devation value. +==== + +Calibrated timestamp values can: be extrapolated to estimate future +coinciding timestamp values, however, depending on the nature of the time +domains and other properties of the platform extrapolating values over a +sufficiently long period of time may: no longer be accurate enough to fit +any particular purpose so applications are expected to re-calibrate the +timestamps on a regular basis. + +include::../validity/protos/vkGetCalibratedTimestampsEXT.txt[] +-- + +[open,refpage='VkCalibratedTimestampInfoEXT',desc='Structure specifying the input parameters of a calibrated timestamp query',type='structs'] +-- + +The sname:VkCalibratedTimestampInfoEXT structure is defined as: + +include::../api/structs/VkCalibratedTimestampInfoEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:timeDomain is a elink:VkTimeDomainEXT value specifying the time + domain from which the calibrated timestamp value should be returned. + +.Valid Usage +**** + * [[VUID-VkCalibratedTimestampInfoEXT-timeDomain-02354]] + pname:timeDomain must: be one of the elink:VkTimeDomainEXT values + returned by flink:vkGetPhysicalDeviceCalibrateableTimeDomainsEXT +**** +include::../validity/structs/VkCalibratedTimestampInfoEXT.txt[] +-- + +[open,refpage='VkTimeDomainEXT',desc='Supported time domains',type='enums'] +-- + +The set of supported time domains consists of: + +include::../api/enums/VkTimeDomainEXT.txt[] + + * ename:VK_TIME_DOMAIN_DEVICE_EXT specifies the device time domain. + Timestamp values in this time domain are comparable with device + timestamp values captured using flink:vkCmdWriteTimestamp and are + defined to be incrementing according to the + <> of the device. + * ename:VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT specifies the CLOCK_MONOTONIC + time domain available on POSIX platforms. + * ename:VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT specifies the + CLOCK_MONOTONIC_RAW time domain available on POSIX platforms. + * ename:VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT specifies the + performance counter (QPC) time domain available on Windows. +-- + +endif::VK_EXT_calibrated_timestamps[] diff --git a/chapters/vertexpostproc.txt b/chapters/vertexpostproc.txt index 3220f5f1..9809937d 100644 --- a/chapters/vertexpostproc.txt +++ b/chapters/vertexpostproc.txt @@ -8,6 +8,10 @@ After programmable vertex processing, the following fixed-function operations are applied to vertices of the resulting primitives: +ifdef::VK_EXT_transform_feedback[] + * Transform feedback (see <>) +endif::VK_EXT_transform_feedback[] ifdef::VK_NV_viewport_swizzle[] * Viewport swizzle (see <>) @@ -39,6 +43,316 @@ endif::editing-notes[] Next, rasterization is performed on primitives as described in chapter <>. +ifdef::VK_EXT_transform_feedback[] +[[vertexpostproc-transform-feedback]] +== Transform Feedback + +Before any other fixed-function vertex post-processing, vertex outputs from +the last shader in the vertex processing stage can: be written out to one or +more transform feedback buffers bound to the command buffer. +To capture vertex outputs the last vertex processing stage shader must: be +declared with the code:Xfb execution mode. +Outputs decorated with code:XfbBuffer will be written out to the +corresponding transform feedback buffers bound to the command buffer when +transform feedback is active. +Transform feedback buffers are bound to the command buffer by using +flink:vkCmdBindTransformFeedbackBuffersEXT. +Transform feedback is made active by calling +flink:vkCmdBeginTransformFeedbackEXT and made inactive by calling +flink:vkCmdEndTransformFeedbackEXT. +After vertex data is written it is possible to use +flink:vkCmdDrawIndirectByteCountEXT to start a new draw where the +pname:vertexCount is derived from the number of bytes written by a previous +transform feedback. + +When an individual point, line, or triangle primitive reaches the transform +feedback stage while transform feedback is active, the values of the +specified output variables are assembled into primitives and appended to the +bound transform feedback buffers. +After activating transform feedback, the values of the first assembled +primitive are written at the starting offsets of the bound transform +feedback buffers, and subsequent primitives are appended to the buffer. +If the optional pname:pCounterBuffers and pname:pCounterBufferOffsets +parameters are specified, the starting points within the transform feedback +buffers are adjusted so data is appended to the previously written values +indicated by the value stored by the implementation in the counter buffer. +When capturing line and triangle primitives, all values from the first +vertex output are written first, followed by values of the subsequent vertex +outputs. + +When capturing vertices, the stride associated with each transform feedback +buffer, as indicated by the code:XfbStride decoration, indicates the number +of bytes of storage reserved for each vertex in the transform feedback +buffer. +For every vertex captured, each output attribute with a code:Offset +decoration will be written to the storage reserved for the vertex at the +associated transform feedback buffer. +When writing output variables that are arrays or structures, individual +array elements or structure members are written tightly packed in order. +For vector types, individual components are written in order. +For matrix types, outputs are written as an array of column vectors. + +If any component of an output with an assigned transform feedback offset was +not written to by its shader, the value recorded for that component is +undefined. +The results of writing an output variable to a transform feedback buffer are +undefined if any component of that variable would be written at an offset +not aligned to the size of the component, or the component is less than 4 +bytes in size. +When capturing a vertex, any portion of the reserved storage not associated +with an output variable with an assigned transform feedback offset will be +unmodified. + +When transform feedback is inactive, no vertices are recorded. +If there is a valid counter buffer handle and counter buffer offset in the +pname:pCounterBuffers and pname:pCounterBufferOffsets arrays, writes to the +corresponding transform feedback buffer will start at the byte offset +represented by the value stored in the counter buffer location. + +Individual lines or triangles of a strip or fan primitive will be extracted +and recorded separately. +Incomplete primitives are not recorded. + +When using a geometry shader that emits vertices to multiple vertex streams, +a primitive will be assembled and output for each stream when there are +enough vertices emitted for the output primitive type. +All outputs assigned to a given transform feedback buffer are required to +come from a single vertex stream. + +The sizes of the transform feedback buffers are defined by the +flink:vkCmdBindTransformFeedbackBuffersEXT pname:pSizes parameter for each +of the bound buffers, or the size of the bound buffer, whichever is the +lesser. +If there is less space remaining in any of the transform feedback buffers +than the size of the all the vertex data for that primitive based on the +code:XfbStride for that code:XfbBuffer then no vertex data of that primitive +is recorded in any transform feedback buffer, and the value for the number +of primitives written in the corresponding +ename:VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT query for all transform +feedback buffers is no longer incremented. + +Any outputs made to a code:XfbBuffer that is not bound to a transform +feedback buffer is ignored. + +[open,refpage='vkCmdBindTransformFeedbackBuffersEXT',desc='Bind transform feedback buffers to a command buffer',type='protos'] +-- + +To bind transform feedback buffers to a command buffer for use in subsequent +draw commands, call: + +include::../api/protos/vkCmdBindTransformFeedbackBuffersEXT.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:firstBinding is the index of the first transform feedback binding + whose state is updated by the command. + * pname:bindingCount is the number of transform feedback bindings whose + state is updated by the command. + * pname:pBuffers is a pointer to an array of buffer handles. + * pname:pOffsets is a pointer to an array of buffer offsets. + * pname:pSizes is an optional array of buffer sizes, which specifies the + maximum number of bytes to capture to the corresponding transform + feedback buffer. + If pname:pSizes is `NULL`, or the value of the pname:pSizes array + element is ename:VK_WHOLE_SIZE, then the maximum bytes captured will be + the size of the corresponding buffer minus the buffer offset. + +The values taken from elements [eq]#i# of pname:pBuffers, pname:pOffsets and +pname:pSizes replace the current state for the transform feedback binding +[eq]#pname:firstBinding {plus} i#, for [eq]#i# in [eq]#[0, +pname:bindingCount)#. +The transform feedback binding is updated to start at the offset indicated +by pname:pOffsets[i] from the start of the buffer pname:pBuffers[i]. + +.Valid Usage +**** + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-transformFeedback-02355]] + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:transformFeedback + must: be enabled + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-firstBinding-02356]] + pname:firstBinding must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-firstBinding-02357]] + The sum of pname:firstBinding and pname:bindingCount must: be less than + or equal to + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02358]] + All elements of pname:pOffsets must: be less than the size of the + corresponding element in pname:pBuffers + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02359]] + All elements of pname:pOffsets must: be a multiple of 4 + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02360]] + All elements of pname:pBuffers must: have been created with the + ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT flag + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pSize-02361]] + If the optional pname:pSize array is specified, each element of + pname:pSizes must: either be ename:VK_WHOLE_SIZE, or be less than or + equal to + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBufferSize + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pSizes-02362]] + All elements of pname:pSizes must: be less than or equal to the size of + the corresponding buffer in pname:pBuffers + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pOffsets-02363]] + All elements of pname:pOffsets plus pname:pSizes, where the + pname:pSizes, element is not ename:VK_WHOLE_SIZE, must: be less than or + equal to the size of the corresponding element in pname:pBuffers + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-pBuffers-02364]] + Each element of pname:pBuffers that is non-sparse must: be bound + completely and contiguously to a single sname:VkDeviceMemory object + * [[VUID-vkCmdBindTransformFeedbackBuffersEXT-None-02365]] + Transform feedback must: not be active when the + fname:vkCmdBindTransformFeedbackBuffersEXT command is recorded +**** + +include::../validity/protos/vkCmdBindTransformFeedbackBuffersEXT.txt[] +-- + + +[open,refpage='vkCmdBeginTransformFeedbackEXT',desc='Make transform feedback active in the command buffer',type='protos'] +-- + +Transform feedback for specific transform feedback buffers is made active by +calling: + +include::../api/protos/vkCmdBeginTransformFeedbackEXT.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:firstCounterBuffer is the index of the first transform feedback + buffer corresponding to pname:pCounterBuffers[0] and + pname:pCounterBufferOffsets[0]. + * pname:counterBufferCount is the size of the pname:pCounterBuffers and + pname:pCounterBufferOffsets arrays. + * pname:pCounterBuffers is an optional array of buffer handles to the + counter buffers which contain a 4 byte integer value representing the + byte offset from the start of the corresponding transform feedback + buffer from where to start capturing vertex data. + If the byte offset stored to the counter buffer location was done using + flink:vkCmdEndTransformFeedbackEXT it can be used to resume transform + feedback from the previous location. + If pname:pCounterBuffers is `NULL`, then transform feedback will start + capturing vertex data to byte offset zero in all bound transform + feedback buffers. + For each element of pname:pCounterBuffers that is dlink:VK_NULL_HANDLE, + transform feedback will start capturing vertex data to byte zero in the + corresponding bound transform feedback buffer. + * pname:pCounterBufferOffsets is an optional array of offsets within each + of the pname:pCounterBuffers where the counter values were previously + written. + The location in each counter buffer at these offsets must: be large + enough to contain 4 bytes of data. + This data is the number of bytes captured by the previous transform + feedback to this buffer. + If pname:pCounterBufferOffsets is `NULL`, then it is assumed the offsets + are zero. + +The active transform feedback buffers will capture primitives emitted from +the corresponding code:XfbBuffer in the bound graphics pipeline. +Any code:XfbBuffer emitted that does not output to an active transform +feedback buffer will not be captured. + +.Valid Usage +**** + * [[VUID-vkCmdBeginTransformFeedbackEXT-transformFeedback-02366]] + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:transformFeedback + must: be enabled + * [[VUID-vkCmdBeginTransformFeedbackEXT-None-02367]] + Transform feedback must: not be active + * [[VUID-vkCmdBeginTransformFeedbackEXT-firstCounterBuffer-02368]] + pname:firstCounterBuffer must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdBeginTransformFeedbackEXT-firstCounterBuffer-02369]] + The sum of pname:firstCounterBuffer and pname:counterBufferCount must: + be less than or equal to + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdBeginTransformFeedbackEXT-pCounterBufferOffsets-02370]] + For each buffer handle in the array, if it is not dlink:VK_NULL_HANDLE + it must: reference a buffer large enough to hold 4 bytes at the + corresponding offset from the pname:pCounterBufferOffsets array + * [[VUID-vkCmdBeginTransformFeedbackEXT-pCounterBuffer-02371]] + If pname:pCounterBuffer is `NULL`, then pname:pCounterBufferOffsets + must: also be `NULL` + * [[VUID-vkCmdBeginTransformFeedbackEXT-pCounterBuffers-02372]] + For each buffer handle in the pname:pCounterBuffers array that is not + dlink:VK_NULL_HANDLE it must: have been created with a pname:usage value + containing + ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT +ifdef::VK_VERSION_1_1,VK_KHR_multiview[] + * [[VUID-vkCmdBeginTransformFeedbackEXT-None-02373]] + Transform feedback must: not be made active in a render pass instance + with multiview enabled +endif::VK_VERSION_1_1,VK_KHR_multiview[] +**** + +include::../validity/protos/vkCmdBeginTransformFeedbackEXT.txt[] +-- + +[open,refpage='vkCmdEndTransformFeedbackEXT',desc='Make transform feedback inactive in the command buffer',type='protos'] +-- + +Transform feedback for specific transform feedback buffers is made inactive +by calling: + +include::../api/protos/vkCmdEndTransformFeedbackEXT.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:firstCounterBuffer is the index of the first transform feedback + buffer corresponding to pname:pCounterBuffers[0] and + pname:pCounterBufferOffsets[0]. + * pname:counterBufferCount is the size of the pname:pCounterBuffers and + pname:pCounterBufferOffsets arrays. + * pname:pCounterBuffers is an optional array of buffer handles to the + counter buffers used to record the current byte positions of each + transform feedback buffer where the next vertex output data would be + captured. + This can: be used by a subsequent flink:vkCmdBeginTransformFeedbackEXT + call to resume transform feedback capture from this position. + It can also be used by flink:vkCmdDrawIndirectByteCountEXT to determine + the vertex count of the draw call. + * pname:pCounterBufferOffsets is an optional array of offsets within each + of the pname:pCounterBuffers where the counter values can be written. + The location in each counter buffer at these offsets must: be large + enough to contain 4 bytes of data. + The data stored at this location is the byte offset from the start of + the transform feedback buffer binding where the next vertex data would + be written. + If pname:pCounterBufferOffsets is `NULL`, then it is assumed the offsets + are zero. + +.Valid Usage +**** + * [[VUID-vkCmdEndTransformFeedbackEXT-transformFeedback-02374]] + sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:transformFeedback + must: be enabled + * [[VUID-vkCmdEndTransformFeedbackEXT-None-02375]] + Transform feedback must: be active + * [[VUID-vkCmdEndTransformFeedbackEXT-firstCounterBuffer-02376]] + pname:firstCounterBuffer must: be less than + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdEndTransformFeedbackEXT-firstCounterBuffer-02377]] + The sum of pname:firstCounterBuffer and pname:counterBufferCount must: + be less than or equal to + sname:VkPhysicalDeviceTransformFeedbackPropertiesEXT::pname:maxTransformFeedbackBuffers + * [[VUID-vkCmdEndTransformFeedbackEXT-pCounterBufferOffsets-02378]] + For each buffer handle in the array, if it is not dlink:VK_NULL_HANDLE + it must: reference a buffer large enough to hold 4 bytes at the + corresponding offset from the pname:pCounterBufferOffsets array + * [[VUID-vkCmdEndTransformFeedbackEXT-pCounterBuffer-02379]] + If pname:pCounterBuffer is `NULL`, then pname:pCounterBufferOffsets + must: also be `NULL` + * [[VUID-vkCmdEndTransformFeedbackEXT-pCounterBuffers-02380]] + For each buffer handle in the pname:pCounterBuffers array that is not + dlink:VK_NULL_HANDLE it must: have been created with a pname:usage value + containing + ename:VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT +**** + +include::../validity/protos/vkCmdEndTransformFeedbackEXT.txt[] +-- + +endif::VK_EXT_transform_feedback[] + ifdef::VK_NV_viewport_swizzle[] [[vertexpostproc-viewport-swizzle]] == Viewport Swizzle diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index 163fb176..a7780a0f 100644 --- a/include/vulkan/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 87 +#define VK_HEADER_VERSION 88 #define VK_NULL_HANDLE 0 @@ -147,6 +147,7 @@ typedef enum VkResult { VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, VK_ERROR_INVALID_SHADER_NV = -1000012000, + VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000, VK_ERROR_FRAGMENTATION_EXT = -1000161000, VK_ERROR_NOT_PERMITTED_EXT = -1000174001, VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, @@ -297,6 +298,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, @@ -398,6 +402,12 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, + VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000, + VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002, + VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, + VK_STRUCTURE_TYPE_IMAGE_EXCPLICIT_DRM_FORMAT_MODIFIER_CREATE_INFO_EXT = 1000158004, + VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000, @@ -428,6 +438,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000, + VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, @@ -443,6 +454,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000, VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, @@ -812,6 +824,7 @@ typedef enum VkImageType { typedef enum VkImageTiling { VK_IMAGE_TILING_OPTIMAL = 0, VK_IMAGE_TILING_LINEAR = 1, + VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT = 1000158000, VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR, VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1), @@ -834,6 +847,7 @@ typedef enum VkQueryType { VK_QUERY_TYPE_OCCLUSION = 0, VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, VK_QUERY_TYPE_TIMESTAMP = 2, + VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004, VK_QUERY_TYPE_COMPACTED_SIZE_NVX = 1000165000, VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION, VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP, @@ -1429,6 +1443,7 @@ typedef enum VkPipelineStageFlagBits { VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, + VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000, VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000, VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV = 0x00400000, @@ -1448,6 +1463,10 @@ typedef enum VkImageAspectFlagBits { VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, + VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = 0x00000080, + VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = 0x00000100, + VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = 0x00000200, + VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = 0x00000400, VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, @@ -1522,6 +1541,8 @@ typedef enum VkBufferUsageFlagBits { VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, + VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800, + VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000, VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200, VK_BUFFER_USAGE_RAYTRACING_BIT_NVX = 0x00000400, VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF @@ -1644,6 +1665,9 @@ typedef enum VkAccessFlagBits { VK_ACCESS_HOST_WRITE_BIT = 0x00004000, VK_ACCESS_MEMORY_READ_BIT = 0x00008000, VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, + VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000, + VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000, + VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000, VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, @@ -6093,7 +6117,7 @@ typedef struct VkConformanceVersionKHR { typedef struct VkPhysicalDeviceDriverPropertiesKHR { VkStructureType sType; void* pNext; - uint32_t driverID; + VkDriverIdKHR driverID; char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR]; char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR]; VkConformanceVersionKHR conformanceVersion; @@ -6360,6 +6384,95 @@ typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { +#define VK_EXT_transform_feedback 1 +#define VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION 1 +#define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback" + +typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; + +typedef struct VkPhysicalDeviceTransformFeedbackFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 transformFeedback; + VkBool32 geometryStreams; +} VkPhysicalDeviceTransformFeedbackFeaturesEXT; + +typedef struct VkPhysicalDeviceTransformFeedbackPropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t maxTransformFeedbackStreams; + uint32_t maxTransformFeedbackBuffers; + VkDeviceSize maxTransformFeedbackBufferSize; + uint32_t maxTransformFeedbackStreamDataSize; + uint32_t maxTransformFeedbackBufferDataSize; + uint32_t maxTransformFeedbackBufferDataStride; + VkBool32 transformFeedbackQueries; + VkBool32 transformFeedbackStreamsLinesTriangles; + VkBool32 transformFeedbackRasterizationStreamSelect; + VkBool32 transformFeedbackDraw; +} VkPhysicalDeviceTransformFeedbackPropertiesEXT; + +typedef struct VkPipelineRasterizationStateStreamCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationStateStreamCreateFlagsEXT flags; + uint32_t rasterizationStream; +} VkPipelineRasterizationStateStreamCreateInfoEXT; + + +typedef void (VKAPI_PTR *PFN_vkCmdBindTransformFeedbackBuffersEXT)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); +typedef void (VKAPI_PTR *PFN_vkCmdBeginTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); +typedef void (VKAPI_PTR *PFN_vkCmdEndTransformFeedbackEXT)(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); +typedef void (VKAPI_PTR *PFN_vkCmdBeginQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index); +typedef void (VKAPI_PTR *PFN_vkCmdEndQueryIndexedEXT)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectByteCountEXT)(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginTransformFeedbackEXT( + VkCommandBuffer commandBuffer, + uint32_t firstCounterBuffer, + uint32_t counterBufferCount, + const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndTransformFeedbackEXT( + VkCommandBuffer commandBuffer, + uint32_t firstCounterBuffer, + uint32_t counterBufferCount, + const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginQueryIndexedEXT( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query, + VkQueryControlFlags flags, + uint32_t index); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndQueryIndexedEXT( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query, + uint32_t index); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT( + VkCommandBuffer commandBuffer, + uint32_t instanceCount, + uint32_t firstInstance, + VkBuffer counterBuffer, + VkDeviceSize counterBufferOffset, + uint32_t counterOffset, + uint32_t vertexStride); +#endif + #define VK_AMD_draw_indirect_count 1 #define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 #define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" @@ -7342,7 +7455,7 @@ typedef struct VkDebugUtilsMessengerCallbackDataEXT { typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageType, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData); @@ -7677,6 +7790,65 @@ typedef struct VkPipelineCoverageModulationStateCreateInfoNV { #define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage" +#define VK_EXT_image_drm_format_modifier 1 +#define VK_EXT_EXTENSION_159_SPEC_VERSION 0 +#define VK_EXT_EXTENSION_159_EXTENSION_NAME "VK_EXT_extension_159" +#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 1 +#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier" + +typedef struct VkDrmFormatModifierPropertiesEXT { + uint64_t drmFormatModifier; + uint32_t drmFormatModifierPlaneCount; + VkFormatFeatureFlags drmFormatModifierTilingFeatures; +} VkDrmFormatModifierPropertiesEXT; + +typedef struct VkDrmFormatModifierPropertiesListEXT { + VkStructureType sType; + void* pNext; + uint32_t drmFormatModifierCount; + VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties; +} VkDrmFormatModifierPropertiesListEXT; + +typedef struct VkPhysicalDeviceImageDrmFormatModifierInfoEXT { + VkStructureType sType; + const void* pNext; + uint64_t drmFormatModifier; + VkSharingMode sharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; +} VkPhysicalDeviceImageDrmFormatModifierInfoEXT; + +typedef struct VkImageDrmFormatModifierListCreateInfoEXT { + VkStructureType sType; + const void* pNext; + uint32_t drmFormatModifierCount; + const uint64_t* pDrmFormatModifiers; +} VkImageDrmFormatModifierListCreateInfoEXT; + +typedef struct VkImageDrmFormatModifierExplicitCreateInfoEXT { + VkStructureType sType; + const void* pNext; + uint64_t drmFormatModifier; + uint32_t drmFormatModifierPlaneCount; + const VkSubresourceLayout* pPlaneLayouts; +} VkImageDrmFormatModifierExplicitCreateInfoEXT; + +typedef struct VkImageDrmFormatModifierPropertiesEXT { + VkStructureType sType; + void* pNext; + uint64_t drmFormatModifier; +} VkImageDrmFormatModifierPropertiesEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetImageDrmFormatModifierPropertiesEXT)(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT( + VkDevice device, + VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties); +#endif + #define VK_EXT_validation_cache 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) @@ -8297,6 +8469,46 @@ VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( uint32_t marker); #endif +#define VK_EXT_calibrated_timestamps 1 +#define VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1 +#define VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME "VK_EXT_calibrated_timestamps" + + +typedef enum VkTimeDomainEXT { + VK_TIME_DOMAIN_DEVICE_EXT = 0, + VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1, + VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2, + VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3, + VK_TIME_DOMAIN_BEGIN_RANGE_EXT = VK_TIME_DOMAIN_DEVICE_EXT, + VK_TIME_DOMAIN_END_RANGE_EXT = VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT, + VK_TIME_DOMAIN_RANGE_SIZE_EXT = (VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT - VK_TIME_DOMAIN_DEVICE_EXT + 1), + VK_TIME_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF +} VkTimeDomainEXT; + +typedef struct VkCalibratedTimestampInfoEXT { + VkStructureType sType; + const void* pNext; + VkTimeDomainEXT timeDomain; +} VkCalibratedTimestampInfoEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainEXT* pTimeDomains); +typedef VkResult (VKAPI_PTR *PFN_vkGetCalibratedTimestampsEXT)(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoEXT* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT( + VkPhysicalDevice physicalDevice, + uint32_t* pTimeDomainCount, + VkTimeDomainEXT* pTimeDomains); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT( + VkDevice device, + uint32_t timestampCount, + const VkCalibratedTimestampInfoEXT* pTimestampInfos, + uint64_t* pTimestamps, + uint64_t* pMaxDeviation); +#endif + #define VK_AMD_shader_core_properties 1 #define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1 #define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties" @@ -8517,6 +8729,31 @@ VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV( VkCheckpointDataNV* pCheckpointData); #endif +#define VK_EXT_pci_bus_info 1 +#define VK_EXT_PCI_BUS_INFO_SPEC_VERSION 1 +#define VK_EXT_PCI_BUS_INFO_EXTENSION_NAME "VK_EXT_pci_bus_info" + +typedef struct VkPhysicalDevicePCIBusInfoPropertiesEXT { + VkStructureType sType; + void* pNext; + uint16_t pciDomain; + uint8_t pciBus; + uint8_t pciDevice; + uint8_t pciFunction; +} VkPhysicalDevicePCIBusInfoPropertiesEXT; + + + +#define VK_GOOGLE_hlsl_functionality1 1 +#define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION 0 +#define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1" + + +#define VK_GOOGLE_decorate_string 1 +#define VK_GOOGLE_DECORATE_STRING_SPEC_VERSION 0 +#define VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME "VK_GOOGLE_decorate_string" + + #ifdef __cplusplus } #endif diff --git a/reflow_count.py b/reflow_count.py index 25547668..b18e03ab 100644 --- a/reflow_count.py +++ b/reflow_count.py @@ -1,2 +1,2 @@ # The value to start tagging VU statements at, unless overridden by -nextvu -startVUID = 2286 +startVUID = 2381 diff --git a/xml/vk.xml b/xml/vk.xml index 1e1dcd47..5158f534 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -150,7 +150,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 87 +#define VK_HEADER_VERSION 88 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -182,6 +182,7 @@ server. + @@ -314,6 +315,8 @@ server. typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; typedef VkFlags VkDescriptorBindingFlagsEXT; typedef VkFlags VkConditionalRenderingFlagsEXT; + typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; + Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) @@ -465,6 +468,7 @@ server. + @@ -1992,7 +1996,7 @@ server. VkStructureType sType void* pNext - uint32_t driverID + VkDriverIdKHR driverID char driverName[VK_MAX_DRIVER_NAME_SIZE_KHR] char driverInfo[VK_MAX_DRIVER_INFO_SIZE_KHR] VkConformanceVersionKHR conformanceVersion @@ -2890,7 +2894,7 @@ server. uint32_t coverageModulationTableCount const float* pCoverageModulationTable - + VkStructureType sType const void* pNext uint32_t viewFormatCount @@ -3029,6 +3033,11 @@ server. VkBool32 fullyCoveredFragmentShaderInputVariabletrue if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input variable VkBool32 conservativeRasterizationPostDepthCoveragetrue if the implementation supports both conservative rasterization and post depth coverage sample coverage mask + + VkStructureType sType + const void* pNext + VkTimeDomainEXT timeDomain + VkStructureType sType void* pNextPointer to next structure @@ -3206,6 +3215,14 @@ server. void* pNext uint32_t maxVertexAttribDivisormax value of vertex attribute divisor + + VkStructureType sType + void* pNext + uint16_t pciDomain + uint8_t pciBus + uint8_t pciDevice + uint8_t pciFunction + VkStructureType sType const void* pNext @@ -3301,6 +3318,32 @@ server. void* pNext VkBool32 decodeModeSharedExponent + + VkStructureType sType + void* pNext + VkBool32 transformFeedback + VkBool32 geometryStreams + + + VkStructureType sType + void* pNext + uint32_t maxTransformFeedbackStreams + uint32_t maxTransformFeedbackBuffers + VkDeviceSize maxTransformFeedbackBufferSize + uint32_t maxTransformFeedbackStreamDataSize + uint32_t maxTransformFeedbackBufferDataSize + uint32_t maxTransformFeedbackBufferDataStride + VkBool32 transformFeedbackQueries + VkBool32 transformFeedbackStreamsLinesTriangles + VkBool32 transformFeedbackRasterizationStreamSelect + VkBool32 transformFeedbackDraw + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationStateStreamCreateFlagsEXT flags + uint32_t rasterizationStream + VkStructureTypesType void* pNext @@ -3510,6 +3553,9 @@ server. VkStructureType sType const void* pNext uint64_t drmFormatModifier + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices VkStructureType sType @@ -4341,6 +4387,12 @@ server. + + + + + + @@ -6517,6 +6569,20 @@ server. size_t* pInfoSize void* pInfo + + VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT + VkPhysicalDevice physicalDevice + uint32_t* pTimeDomainCount + VkTimeDomainEXT* pTimeDomains + + + VkResult vkGetCalibratedTimestampsEXT + VkDevice device + uint32_t timestampCount + const VkCalibratedTimestampInfoEXT* pTimestampInfos + uint64_t* pTimestamps + uint64_t* pMaxDeviation + VkResult vkSetDebugUtilsObjectNameEXT VkDevice device @@ -6657,6 +6723,56 @@ server. uint32_t* pCheckpointDataCount VkCheckpointDataNV* pCheckpointData + + void vkCmdBindTransformFeedbackBuffersEXT + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + const VkDeviceSize* pSizes + + + void vkCmdBeginTransformFeedbackEXT + VkCommandBuffer commandBuffer + uint32_t firstCounterBuffer + uint32_t counterBufferCount + const VkBuffer* pCounterBuffers + const VkDeviceSize* pCounterBufferOffsets + + + void vkCmdEndTransformFeedbackEXT + VkCommandBuffer commandBuffer + uint32_t firstCounterBuffer + uint32_t counterBufferCount + const VkBuffer* pCounterBuffers + const VkDeviceSize* pCounterBufferOffsets + + + void vkCmdBeginQueryIndexedEXT + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + VkQueryControlFlags flags + uint32_t index + + + void vkCmdEndQueryIndexedEXT + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + uint32_t index + + + void vkCmdDrawIndirectByteCountEXT + VkCommandBuffer commandBuffer + uint32_t instanceCount + uint32_t firstInstance + VkBuffer counterBuffer + VkDeviceSize counterBufferOffset + uint32_t counterOffset + uint32_t vertexStride + void vkCmdSetExclusiveScissorNV VkCommandBuffer commandBuffer @@ -7689,10 +7805,37 @@ server. - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9210,7 +9353,7 @@ server. - + @@ -9532,10 +9675,15 @@ server. - + - - + + + + + + + @@ -9748,10 +9896,12 @@ server. - + - - + + + + @@ -9824,16 +9974,16 @@ server. - + - - + + - + - - + + @@ -9908,5 +10058,23 @@ server. + + + + + + + + + + + + + + + + + +