Skip to content

Commit

Permalink
Merge branch 'public/main' into tobias/VK_AMDX_shader_enqueue_v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	chapters/executiongraphs.adoc
  • Loading branch information
Tobski committed Oct 9, 2024
2 parents 9daeaa2 + 74d7efc commit a15cb8b
Show file tree
Hide file tree
Showing 22 changed files with 304 additions and 54 deletions.
21 changes: 21 additions & 0 deletions ChangeLog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ appears frequently in the change log.

'''

Change log for October 4, 2024 Vulkan 1.3.297 spec update:

Public Issues

* Fix references to images in proposal documents (public issue 2441).

Internal Issues

* Add new <<acceleration-structure-degenerate-prims, Degenerate Primitives
and Instances>> section for acceleration structures (internal issue
3932).
* Rewrite language to clarify behavior with out-of-AABB intersections in
the <<ray-intersection-confirmation, Ray Intersection Confirmation>>
section (internal issue 3973).

New Extensions

* VK_EXT_present_mode_fifo_latest_ready

'''

Change log for September 26, 2024 Vulkan 1.3.296 spec update:

Public Issues
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ VERBOSE =
# ADOCOPTS options for asciidoc->HTML5 output

NOTEOPTS = -a editing-notes -a implementation-guide
PATCHVERSION = 296
PATCHVERSION = 297
BASEOPTS =

ifneq (,$(findstring VKSC_VERSION_1_0,$(VERSIONS)))
Expand Down
42 changes: 42 additions & 0 deletions appendices/VK_EXT_present_mode_fifo_latest_ready.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2024 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_present_mode_fifo_latest_ready.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
2024-05-28
*IP Status*::
No known IP claims.
*Contributors*::
- James Jones, NVIDIA
- Lionel Duc, NVIDIA

=== Description

This device extension adds a new present mode,
ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT.

This tear-free present mode behaves much like
ename:VK_PRESENT_MODE_FIFO_KHR, except that each vertical blanking period
dequeues consecutive present requests until the latest ready is found to
update the current image.

While this seems similar in concept to ename:VK_PRESENT_MODE_MAILBOX_KHR,
the fundamental difference is that the processing of the present requests is
done during vblank.
From the application perspective, this means for example, that in a
flip-based model, a single vblank may: cause multiple swapchain images to be
released at once, while ename:VK_PRESENT_MODE_MAILBOX_KHR may: continuously
be releasing images as new requests become ready.

This additional present mode is useful when using a time-based present API.

include::{generated}/interfaces/VK_EXT_present_mode_fifo_latest_ready.adoc[]

=== Version History

* Revision 1, 2024-05-28 (Lionel Duc)
** Internal revisions
2 changes: 1 addition & 1 deletion appendices/credits.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ endif::VKSC_VERSION_1_0[]
* Stuart Smith, AMD (versions 1.0, 1.1, 1.2, 1.3)
* Sujeevan Rajayogam, Google (version 1.3)
* Tilmann Scheller, Samsung Electronics (version 1.1)
* Tim Foley, Intel (version 1.0)
* Theresa Foley, Intel (version 1.0)
* Tim Lewis, Khronos (version 1.3)
* Timo Suoranta, AMD (version 1.0)
* Timothy Lottes, AMD (versions 1.0, 1.1)
Expand Down
12 changes: 6 additions & 6 deletions appendices/spirvenv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ or knowledge of runtime information, such as enabled features.
of 2 (storage image)
* [[VUID-{refpage}-SubpassData-04660]]
The [eq]#(u,v)# coordinates used for a code:SubpassData must: be the
<id> of a constant vector [eq]#(0,0)#.
<id> of a constant vector [eq]#(0,0)#
* [[VUID-{refpage}-OpTypeImage-06924]]
Objects of types code:OpTypeImage, code:OpTypeSampler,
code:OpTypeSampledImage, code:OpTypeAccelerationStructureKHR, and arrays
Expand Down Expand Up @@ -333,10 +333,10 @@ or knowledge of runtime information, such as enabled features.
<<interfaces-builtin-variables>> must: not be used
* [[VUID-{refpage}-OpEntryPoint-09658]]
For a given code:OpEntryPoint, any code:BuiltIn decoration must: not be
used more than once by the code:Input interface.
used more than once by the code:Input interface
* [[VUID-{refpage}-OpEntryPoint-09659]]
For a given code:OpEntryPoint, any code:BuiltIn decoration must: not be
used more than once by the code:Output interface.
used more than once by the code:Output interface
* [[VUID-{refpage}-Location-06672]]
The code:Location or code:Component decorations must: only be used with
the code:Input, code:Output, code:RayPayloadKHR,
Expand Down Expand Up @@ -1321,7 +1321,7 @@ ifdef::VK_NV_cooperative_matrix[]
must be 1.
** If code:ComponentType of code:A, code:B, code:C, or code:Result is an
unsigned integral type, the code:Signedness operand of the
code:OpTypeInt must be 0.
code:OpTypeInt must be 0
* [[VUID-{refpage}-OpTypeCooperativeMatrixNV-06322]]
code:OpTypeCooperativeMatrixNV and code:OpCooperativeMatrix*
instructions must: not be used in shader stages not included in
Expand All @@ -1331,7 +1331,7 @@ ifdef::VK_KHR_cooperative_matrix[]
* [[VUID-{refpage}-OpTypeCooperativeMatrixKHR-08974]]
For code:OpTypeCooperativeMatrixKHR, the component type, scope, number
of rows, and number of columns must: match one of the matrices in any of
the supported slink:VkCooperativeMatrixPropertiesKHR.
the supported slink:VkCooperativeMatrixPropertiesKHR
* [[VUID-{refpage}-OpCooperativeMatrixMulAddKHR-10060]]
For code:OpCooperativeMatrixMulAddKHR, the operands must: match a
supported slink:VkCooperativeMatrixPropertiesKHR, such that:
Expand Down Expand Up @@ -1371,7 +1371,7 @@ ifdef::VK_KHR_cooperative_matrix[]
slink:VkCooperativeMatrixPropertiesKHR::pname:saturatingAccumulation is
ename:VK_FALSE, code:SaturatingAccumulationKHR must: not be used.
** The scope of all cooperative matrix operands must: be
elink:VkScopeKHR::ename:VK_SCOPE_SUBGROUP_KHR.
elink:VkScopeKHR::ename:VK_SCOPE_SUBGROUP_KHR
* [[VUID-{refpage}-cooperativeMatrixSupportedStages-08985]]
code:OpTypeCooperativeMatrixKHR and code:OpCooperativeMatrix*
instructions must: not be used in shader stages not included in
Expand Down
4 changes: 2 additions & 2 deletions chapters/VK_EXT_depth_clamp_control/fragops.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ename:VK_DEPTH_CLAMP_MODE_VIEWPORT_RANGE_EXT.
ename:VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, and the pipeline is
not created with ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT, then
pname:pDepthClampRange must be a valid pointer to a valid
sname:VkDepthClampRangeEXT structure.
sname:VkDepthClampRangeEXT structure
****

include::{generated}/validity/structs/VkPipelineViewportDepthClampControlCreateInfoEXT.adoc[]
Expand Down Expand Up @@ -88,7 +88,7 @@ value used to create the currently active pipeline.
If pname:depthClampMode is set to
ename:VK_DEPTH_CLAMP_MODE_USER_DEFINED_RANGE_EXT, then
pname:pDepthClampRange must be a valid pointer to a valid
sname:VkDepthClampRangeEXT structure.
sname:VkDepthClampRangeEXT structure
****

include::{generated}/validity/protos/vkCmdSetDepthClampRangeEXT.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,45 @@ endif::VK_KHR_shared_presentable_image[]
vertical blanking period will follow the new mode for current and
subsequent images.
* Transition from ename:VK_PRESENT_MODE_IMMEDIATE_KHR to
ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR: As all prior present requests in
the ename:VK_PRESENT_MODE_IMMEDIATE_KHR mode are applied immediately,
there are no outstanding present operations in this mode, and current
and subsequent images are appended to the FIFO queue and presented
according to the new mode.
ename:VK_PRESENT_MODE_FIFO_KHR or ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
or ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
endif::VK_EXT_present_mode_fifo_latest_ready[]
: As all prior present requests in the
ename:VK_PRESENT_MODE_IMMEDIATE_KHR mode are applied immediately, there
are no outstanding present operations in this mode, and current and
subsequent images are appended to the FIFO queue and presented according
to the new mode.
* Transition from ename:VK_PRESENT_MODE_MAILBOX_KHR to
ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR: Presentation in both modes
require waiting for the next vertical blanking period, with
ename:VK_PRESENT_MODE_MAILBOX_KHR allowing the pending present operation
to be replaced by a new one.
ename:VK_PRESENT_MODE_FIFO_KHR or ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
or ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
endif::VK_EXT_present_mode_fifo_latest_ready[]
: Presentation in FIFO modes require waiting for the next vertical
blanking period, with ename:VK_PRESENT_MODE_MAILBOX_KHR allowing the
pending present operation to be replaced by a new one.
In this case, the current present operation will replace the pending
present operation and is applied according to the new mode.
* Transition from ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR to
ename:VK_PRESENT_MODE_IMMEDIATE_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
or ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
endif::VK_EXT_present_mode_fifo_latest_ready[]
to ename:VK_PRESENT_MODE_IMMEDIATE_KHR or
ename:VK_PRESENT_MODE_MAILBOX_KHR: If the FIFO queue is empty,
presentation is done according to the behavior of the new mode.
If there are present operations in the FIFO queue, once the last present
operation is performed based on the respective vertical blanking period,
the current and subsequent updates are applied according to the new
mode.
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
* Transition between ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR, and
ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT: Images continue to be
appended to the same FIFO queue, and the behavior with respect to
waiting for vertical blanking period and dequeuing requests will follow
the new mode for current and subsequent images.
endif::VK_EXT_present_mode_fifo_latest_ready[]
* The behavior during transition between any other present modes, if
possible, is implementation defined.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ include::{generated}/api/structs/VkSwapchainPresentModesCreateInfoEXT.adoc[]
Each entry in pPresentModes must: be one of the elink:VkPresentModeKHR
values returned by fname:vkGetPhysicalDeviceSurfacePresentModesKHR for
the surface
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
* [[VUID-VkSwapchainPresentModesCreateInfoEXT-presentModeFifoLatestReady-10160]]
If the <<features-presentModeFifoLatestReady,
pname:presentModeFifoLatestReady>> feature is not enabled, pPresentModes
must: not contain ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
endif::VK_EXT_present_mode_fifo_latest_ready[]
* [[VUID-VkSwapchainPresentModesCreateInfoEXT-pPresentModes-07763]]
The entries in pPresentModes must: be a subset of the present modes
returned in
Expand Down
2 changes: 1 addition & 1 deletion chapters/VK_HUAWEI_cluster_culling_shader/drawing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ include::{chapters}/commonvalidity/draw_indirect_drawcount.adoc[]
* [[VUID-vkCmdDrawClusterIndirectHUAWEI-ClusterCullingHUAWEI-07824]]
The current pipeline bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS
must: contain a shader stage using the code:ClusterCullingHUAWEI
{ExecutionModel}.
{ExecutionModel}
* [[VUID-vkCmdDrawClusterIndirectHUAWEI-offset-07918]]
pname:offset must: be a multiple of
slink:VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI::pname:indirectBufferOffsetAlignment
Expand Down
32 changes: 29 additions & 3 deletions chapters/VK_KHR_surface/wsi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,12 @@ include::{generated}/api/structs/VkSurfaceCapabilitiesKHR.adoc[]
representing the ways the application can: use the presentable images of
a swapchain created
ifdef::VK_KHR_shared_presentable_image[]
with elink:VkPresentModeKHR set to ename:VK_PRESENT_MODE_IMMEDIATE_KHR,
ename:VK_PRESENT_MODE_MAILBOX_KHR, ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR
with elink:VkPresentModeKHR set to
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT,
endif::VK_EXT_present_mode_fifo_latest_ready[]
ename:VK_PRESENT_MODE_IMMEDIATE_KHR, ename:VK_PRESENT_MODE_MAILBOX_KHR,
ename:VK_PRESENT_MODE_FIFO_KHR or ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR
endif::VK_KHR_shared_presentable_image[]
for the surface on the specified device.
ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must: be included in the set.
Expand Down Expand Up @@ -1576,6 +1579,26 @@ include::{generated}/api/enums/VkPresentModeKHR.adoc[]
New requests are appended to the end of the queue, and one request is
removed from the beginning of the queue and processed during or after
each vertical blanking period in which the queue is non-empty.
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
* ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT specifies that the
presentation engine waits for the next vertical blanking period to
update the current image.
Tearing cannot: be observed.
An internal queue is used to hold pending presentation requests.
New requests are appended to the end of the queue.
At each vertical blanking period, the presentation engine dequeues all
successive requests that are ready to be presented from the beginning of
the queue.
ifdef::VK_GOOGLE_display_timing[]
If using `apiext:VK_GOOGLE_display_timing` to provide a target present
time, the presentation engine will check the specified time for each
image.
If the target present time is less-than or equal-to the current time,
the presentation engine will dequeue the image and check the next one.
endif::VK_GOOGLE_display_timing[]
The image of the last dequeued request will be presented.
The other dequeued requests will be dropped.
endif::VK_EXT_present_mode_fifo_latest_ready[]
ifdef::VK_KHR_shared_presentable_image[]
* ename:VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR specifies that the
presentation engine and application have concurrent access to a single
Expand Down Expand Up @@ -1612,6 +1635,9 @@ mode, and can be determined as per the table below:
| ename:VK_PRESENT_MODE_MAILBOX_KHR | slink:VkSurfaceCapabilitiesKHR::pname:supportedUsageFlags
| ename:VK_PRESENT_MODE_FIFO_KHR | slink:VkSurfaceCapabilitiesKHR::pname:supportedUsageFlags
| ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR | slink:VkSurfaceCapabilitiesKHR::pname:supportedUsageFlags
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
| ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT | slink:VkSurfaceCapabilitiesKHR::pname:supportedUsageFlags
endif::VK_EXT_present_mode_fifo_latest_ready[]
| ename:VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR | slink:VkSharedPresentSurfaceCapabilitiesKHR::pname:sharedPresentSupportedUsageFlags
| ename:VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR | slink:VkSharedPresentSurfaceCapabilitiesKHR::pname:sharedPresentSupportedUsageFlags
|====
Expand Down
16 changes: 13 additions & 3 deletions chapters/VK_KHR_swapchain/wsi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ endif::VKSC_VERSION_1_0[]
the pname:maxImageCount member of the sname:VkSurfaceCapabilitiesKHR
structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface if the returned pname:maxImageCount is not zero
* [[VUID-VkSwapchainCreateInfoKHR-presentMode-02839]]
ifdef::VK_EXT_swapchain_maintenance1[]
* [[VUID-VkSwapchainCreateInfoKHR-swapchainMaintenance1-10155]]
If the <<features-swapchainMaintenance1,pname:swapchainMaintenance1>>
Expand Down Expand Up @@ -465,8 +464,12 @@ endif::VK_EXT_swapchain_maintenance1[]
sname:VkSurfaceCapabilitiesKHR structure returned by
fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface
* [[VUID-VkSwapchainCreateInfoKHR-presentMode-01427]]
If pname:presentMode is ename:VK_PRESENT_MODE_IMMEDIATE_KHR,
ename:VK_PRESENT_MODE_MAILBOX_KHR, ename:VK_PRESENT_MODE_FIFO_KHR or
If pname:presentMode is
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT,
endif::VK_EXT_present_mode_fifo_latest_ready[]
ename:VK_PRESENT_MODE_IMMEDIATE_KHR, ename:VK_PRESENT_MODE_MAILBOX_KHR,
ename:VK_PRESENT_MODE_FIFO_KHR or
ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR, pname:imageUsage must: be a
subset of the supported usage flags present in the
pname:supportedUsageFlags member of the slink:VkSurfaceCapabilitiesKHR
Expand Down Expand Up @@ -511,6 +514,13 @@ endif::VK_VERSION_1_1,VK_KHR_get_physical_device_properties2[]
pname:presentMode must: be one of the elink:VkPresentModeKHR values
returned by fname:vkGetPhysicalDeviceSurfacePresentModesKHR for the
surface
ifdef::VK_EXT_present_mode_fifo_latest_ready[]
* [[VUID-VkSwapchainCreateInfoKHR-presentModeFifoLatestReady-10161]]
If the <<features-presentModeFifoLatestReady,
pname:presentModeFifoLatestReady>> feature is not enabled,
pname:presentMode must: not be
ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT
endif::VK_EXT_present_mode_fifo_latest_ready[]
ifdef::VK_VERSION_1_1,VK_KHR_device_group[]
* [[VUID-VkSwapchainCreateInfoKHR-physicalDeviceCount-01429]]
ifndef::VKSC_VERSION_1_0[]
Expand Down
33 changes: 33 additions & 0 deletions chapters/accelstructures.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,39 @@ object is active in the source acceleration structure but would be inactive
in the destination, or vice versa.


[[acceleration-structure-degenerate-prims]]
=== Degenerate Primitives and Instances

_Degenerate_ primitives and instances behave differently to
<<acceleration-structure-inactive-prims,inactive primitives and instances>>,
and are defined as:

* triangles that have one or more vertices whose respective (X), (Y), (Z)
components are identical, or have three vertices that have at least two
of the (X), (Y), or (Z) components identical, therefore forming a line
or point.
Degenerate triangles do not generate any intersections.
* AABBs whose pname:minX=pname:maxX, pname:minY=pname:maxY, and
pname:minZ=pname:maxZ.
Degenerate AABBs may: invoke the intersection shader.
* instances that reference bottom level acceleration structures that
contain no active primitives.
When building an acceleration structure, implementations should: treat
degenerate instances as though they are a point at the instance origin,
specified by slink:VkAccelerationStructureInstanceKHR::pname:transform.

Unlike _inactive_ primitives and instances, _degenerate_ primitives and
instances may: transition from the degenerate to the non-degenerate state,
or vice versa, when performing an acceleration structure update.

If an acceleration structure is built without
ename:VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR set in
slink:VkAccelerationStructureBuildGeometryInfoKHR::pname:flags, degenerate
primitives may: be discarded.
Primitives that are defined with the same index value for more than one
vertex can: always be discarded.


[[acceleration-structure-building]]
=== Building Acceleration Structures

Expand Down
2 changes: 1 addition & 1 deletion chapters/cmdbuffers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ ifdef::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[]
* [[VUID-VkSemaphoreSubmitInfoKHR-semaphore-05094]]
If pname:semaphore has a payload of stext:NvSciSyncObj, pname:value
must: be calculated by application via <<NvSciSync-extension-page,
NvSciSync APIs>>.
NvSciSync APIs>>
endif::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[]
****
Expand Down
Loading

0 comments on commit a15cb8b

Please sign in to comment.