diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 19256819d..0e8ccddb3 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -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 <> section for acceleration structures (internal issue + 3932). + * Rewrite language to clarify behavior with out-of-AABB intersections in + the <> + 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 diff --git a/Makefile b/Makefile index 67a5bdffb..bddc167ae 100644 --- a/Makefile +++ b/Makefile @@ -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))) diff --git a/appendices/VK_EXT_present_mode_fifo_latest_ready.adoc b/appendices/VK_EXT_present_mode_fifo_latest_ready.adoc new file mode 100644 index 000000000..826e192f0 --- /dev/null +++ b/appendices/VK_EXT_present_mode_fifo_latest_ready.adoc @@ -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 diff --git a/appendices/credits.adoc b/appendices/credits.adoc index ea2c5c05b..b989ecc6f 100644 --- a/appendices/credits.adoc +++ b/appendices/credits.adoc @@ -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) diff --git a/appendices/spirvenv.adoc b/appendices/spirvenv.adoc index 752560e9a..b68efeb1d 100644 --- a/appendices/spirvenv.adoc +++ b/appendices/spirvenv.adoc @@ -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 - of a constant vector [eq]#(0,0)#. + of a constant vector [eq]#(0,0)# * [[VUID-{refpage}-OpTypeImage-06924]] Objects of types code:OpTypeImage, code:OpTypeSampler, code:OpTypeSampledImage, code:OpTypeAccelerationStructureKHR, and arrays @@ -333,10 +333,10 @@ or knowledge of runtime information, such as enabled features. <> 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, @@ -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 @@ -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: @@ -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 diff --git a/chapters/VK_EXT_depth_clamp_control/fragops.adoc b/chapters/VK_EXT_depth_clamp_control/fragops.adoc index b4deb7b70..95c3d7493 100644 --- a/chapters/VK_EXT_depth_clamp_control/fragops.adoc +++ b/chapters/VK_EXT_depth_clamp_control/fragops.adoc @@ -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[] @@ -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[] diff --git a/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModeInfo.adoc b/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModeInfo.adoc index 8be9faf4e..8d5b9a810 100644 --- a/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModeInfo.adoc +++ b/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModeInfo.adoc @@ -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. diff --git a/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModesCreateInfo.adoc b/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModesCreateInfo.adoc index 374d86489..4e64b301d 100644 --- a/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModesCreateInfo.adoc +++ b/chapters/VK_EXT_swapchain_maintenance1/SwapchainPresentModesCreateInfo.adoc @@ -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 <> 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 diff --git a/chapters/VK_HUAWEI_cluster_culling_shader/drawing.adoc b/chapters/VK_HUAWEI_cluster_culling_shader/drawing.adoc index c220e4ec1..1c9859068 100644 --- a/chapters/VK_HUAWEI_cluster_culling_shader/drawing.adoc +++ b/chapters/VK_HUAWEI_cluster_culling_shader/drawing.adoc @@ -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 diff --git a/chapters/VK_KHR_surface/wsi.adoc b/chapters/VK_KHR_surface/wsi.adoc index 6ac304809..e124e027c 100644 --- a/chapters/VK_KHR_surface/wsi.adoc +++ b/chapters/VK_KHR_surface/wsi.adoc @@ -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. @@ -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 @@ -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 |==== diff --git a/chapters/VK_KHR_swapchain/wsi.adoc b/chapters/VK_KHR_swapchain/wsi.adoc index e73bec454..6cda35152 100644 --- a/chapters/VK_KHR_swapchain/wsi.adoc +++ b/chapters/VK_KHR_swapchain/wsi.adoc @@ -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 <> @@ -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 @@ -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 <> 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[] diff --git a/chapters/accelstructures.adoc b/chapters/accelstructures.adoc index 453aaf8a3..46f780ecd 100644 --- a/chapters/accelstructures.adoc +++ b/chapters/accelstructures.adoc @@ -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 +<>, +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 diff --git a/chapters/cmdbuffers.adoc b/chapters/cmdbuffers.adoc index 97f5961c8..01cbb2dd4 100644 --- a/chapters/cmdbuffers.adoc +++ b/chapters/cmdbuffers.adoc @@ -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 APIs>> endif::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[] **** diff --git a/chapters/device_generated_commands/generation.adoc b/chapters/device_generated_commands/generation.adoc index 30fe235f0..6f80f19c2 100644 --- a/chapters/device_generated_commands/generation.adoc +++ b/chapters/device_generated_commands/generation.adoc @@ -94,10 +94,6 @@ include::{generated}/api/structs/VkGeneratedCommandsPipelineInfoEXT.adoc[] structure. * pname:pipeline is a valid pipeline object. -.Valid Usage -**** -**** - include::{generated}/validity/structs/VkGeneratedCommandsPipelineInfoEXT.adoc[] -- @@ -1155,7 +1151,7 @@ endif::VK_VERSION_1_1[] executes, and the preprocessing command must: have used the same pname:pGeneratedCommandsInfo content as well as the content of the input buffers it references (all except - slink:VkGeneratedCommandsInfoEXT::pname:preprocessBuffer). + slink:VkGeneratedCommandsInfoEXT::pname:preprocessBuffer) * [[VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11047]] If pname:isPreprocessed is ename:VK_TRUE then the pname:indirectCommandsLayout member of pname:pGeneratedCommandsInfo @@ -1175,7 +1171,7 @@ endif::VK_VERSION_1_1[] If pname:isPreprocessed is ename:VK_TRUE then the bound descriptor sets and push constants must: match identically with those bound during recording of the corresponding call to - flink:vkCmdPreprocessGeneratedCommandsEXT. + flink:vkCmdPreprocessGeneratedCommandsEXT * [[VUID-vkCmdExecuteGeneratedCommandsEXT-isPreprocessed-11049]] If pname:isPreprocessed is ename:VK_TRUE and the pname:indirectCommandsLayout member of pname:pGeneratedCommandsInfo @@ -1264,7 +1260,7 @@ endif::VK_EXT_transform_feedback[] slink:VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::pname:supportedIndirectCommandsShaderStages>> can: be set in pname:pGeneratedCommandsInfo->shaderStages * [[VUID-vkCmdExecuteGeneratedCommandsEXT-None-11062]] - If a rendering pass is currently active, the view mask must: be `0`. + If a rendering pass is currently active, the view mask must: be `0` * [[VUID-vkCmdExecuteGeneratedCommandsEXT-commandBuffer-11143]] pname:commandBuffer must: not have been created with ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT diff --git a/chapters/device_generated_commands/indirectcommands.adoc b/chapters/device_generated_commands/indirectcommands.adoc index 98ea88e9f..da300ffbf 100644 --- a/chapters/device_generated_commands/indirectcommands.adoc +++ b/chapters/device_generated_commands/indirectcommands.adoc @@ -1329,7 +1329,7 @@ include::{generated}/api/structs/VkIndirectCommandsVertexBufferTokenEXT.adoc[] **** * [[VUID-VkIndirectCommandsVertexBufferTokenEXT-vertexBindingUnit-11134]] pname:vertexBindingUnit must: be less than the total number of vertex - input bindings in use by the current graphics state. + input bindings in use by the current graphics state **** include::{generated}/validity/structs/VkIndirectCommandsVertexBufferTokenEXT.adoc[] diff --git a/chapters/executiongraphs.adoc b/chapters/executiongraphs.adoc index 77f488f2a..fce7c570c 100644 --- a/chapters/executiongraphs.adoc +++ b/chapters/executiongraphs.adoc @@ -376,7 +376,7 @@ against it. * pname:scratchSize must: be greater than or equal to slink:VkExecutionGraphPipelineScratchSizeAMDX::pname:minSize returned by flink:vkGetExecutionGraphPipelineScratchSizeAMDX for the currently bound - execution graph pipeline. + execution graph pipeline * [[VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-09144]] pname:scratch must: be a multiple of 64 **** diff --git a/chapters/features.adoc b/chapters/features.adoc index eb41d6c3f..ca1cbf37b 100644 --- a/chapters/features.adoc +++ b/chapters/features.adoc @@ -7180,6 +7180,28 @@ include::{generated}/validity/structs/VkPhysicalDeviceSwapchainMaintenance1Featu -- endif::VK_EXT_swapchain_maintenance1[] +ifdef::VK_EXT_present_mode_fifo_latest_ready[] +[open,refpage='VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT',desc='Structure describing support for VK_PRESENT_MODE_FIFO_LATEST_READY_EXT',type='structs'] +-- +The sname:VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT structure is +defined as: + +include::{generated}/api/structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.adoc[] + + * pname:sType is a elink:VkStructureType value identifying this structure. + * pname:pNext is `NULL` or a pointer to a structure extending this + structure. + * [[features-presentModeFifoLatestReady]] pname:presentModeFifoLatestReady + specifies whether the implementation supports the + ename:VK_PRESENT_MODE_FIFO_LATEST_READY_EXT present mode. + +:refpage: VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT +include::{chapters}/features.adoc[tag=features] + +include::{generated}/validity/structs/VkPhysicalDevicePresentModeFifoLatestReadyFeaturesEXT.adoc[] +-- +endif::VK_EXT_present_mode_fifo_latest_ready[] + ifdef::VK_EXT_dynamic_rendering_unused_attachments[] [open,refpage='VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT',desc='Structure describing the dynamic rendering unused attachment features that can be supported by an implementation',type='structs'] -- diff --git a/chapters/pipelines.adoc b/chapters/pipelines.adoc index c91023261..ea7e32814 100644 --- a/chapters/pipelines.adoc +++ b/chapters/pipelines.adoc @@ -542,7 +542,7 @@ endif::VK_HUAWEI_cluster_culling_shader[] ename:VK_SHADER_STAGE_ALL ifdef::VKSC_VERSION_1_0[] * [[VUID-VkPipelineShaderStageCreateInfo-module-05026]] - pname:module must: be dlink:VK_NULL_HANDLE. + pname:module must: be dlink:VK_NULL_HANDLE * [[VUID-VkPipelineShaderStageCreateInfo-pName-05027]] If pname:pName is not `NULL`, it must: be the name of an code:OpEntryPoint in the SPIR-V shader module used for offline @@ -7430,7 +7430,7 @@ ifdef::VKSC_VERSION_1_0[] ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT * [[VUID-VkPipelineCacheCreateInfo-pInitialData-05139]] The pipeline cache data pointed to by pname:pInitialData must: not - contain any pipelines with duplicate pipeline identifiers. + contain any pipelines with duplicate pipeline identifiers endif::VKSC_VERSION_1_0[] **** ifdef::VKSC_VERSION_1_0[] @@ -8600,7 +8600,7 @@ include::{generated}/api/protos/vkDestroyPipelineBinaryKHR.adoc[] **** * [[VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-09614]] If sname:VkAllocationCallbacks were provided when pname:pipelineBinary - was created, a compatible set of callbacks must: be provided here. + was created, a compatible set of callbacks must: be provided here * [[VUID-vkDestroyPipelineBinaryKHR-pipelineBinary-09615]] If no slink:VkAllocationCallbacks were provided when pname:pipelineBinary was created, pname:pAllocator must: be `NULL` diff --git a/chapters/raytraversal.adoc b/chapters/raytraversal.adoc index d263d2f10..c7f799cf4 100644 --- a/chapters/raytraversal.adoc +++ b/chapters/raytraversal.adoc @@ -538,7 +538,11 @@ infrastructure; no further processing of this intersection candidate occurs. The occurrence of an AABB intersection candidate does not guarantee the ray intersects the primitive bounds. To avoid propagating false intersections the application should: verify the -intersection candidate before reporting any hits. +intersection candidate before reporting any hits and only report +intersections within the bounds of the AABB. +Reporting an intersection outside the AABB either through the implementation +giving a conservative bound or reporting a [eq]#t# out of range is legal but +may: result in unpredictable closest hit results. ifdef::VK_KHR_ray_tracing_pipeline[] If the ray was traced with a <> as a <>. + <> endif::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[] **** @@ -4699,7 +4699,7 @@ ifdef::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[] * [[VUID-VkSemaphoreSignalInfo-semaphores-05125]] If pname:semaphores has stext:NvSciSyncObj as payload, application must: calculate the corresponding timeline semaphore value in pname:value by - calling <>. + calling <> endif::VK_NV_external_sci_sync,VK_NV_external_sci_sync2[] **** diff --git a/proposals/VK_EXT_present_mode_fifo_latest_ready.adoc b/proposals/VK_EXT_present_mode_fifo_latest_ready.adoc new file mode 100644 index 000000000..6b55e859d --- /dev/null +++ b/proposals/VK_EXT_present_mode_fifo_latest_ready.adoc @@ -0,0 +1,65 @@ +// Copyright 2024 The Khronos Group Inc. +// +// SPDX-License-Identifier: CC-BY-4.0 + += VK_EXT_present_mode_fifo_latest_ready +:toc: left +:refpage: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/ +:sectnums: + +== Problem Statement + +When an application manages to render multiple frames per display refresh cycle, +`VK_PRESENT_MODE_FIFO_KHR` or `VK_PRESENT_MODE_FIFO_RELAXED_KHR` can introduce +some undesired latency, because only the oldest present request in the present +queue is processed during each vertical blanking period. This also effectively +caps an application's frame rate to the monitor refresh rate. + +== Solution Space + +`VK_PRESENT_MODE_IMMEDIATE_KHR` may cause tearing, so is not a good alternative +when tearing is not desired. + +`VK_PRESENT_MODE_MAILBOX_KHR` is currently the only solution to this problem, +but brings its own set of issues: + * It is challenging to achieve for some implementations. + * Most importantly, its semantics preclude any useful interaction with + time-based present APIs, such as `VK_GOOGLE_display_timing` or the one + proposed in `VK_EXT_present_timing`. Because only a single present + request is kept in the queue, specifying a present time requires the + application to know the precise timing of the request in advance to avoid + it replacing an image with an earlier target time that has not been + displayed yet. + +== Proposal + +This extension adds a new present mode, `VK_PRESENT_MODE_FIFO_LATEST_READY_EXT`, +which allows the presentation engine to dequeue multiple present requests during +vblank, in FIFO order, until encountering a request that is not ready. The image +of the last present request to be dequeued is presented to the display. This can +increase an application's frame rate up to `(swapchainImageCount - 1) * +refreshRate` compared to `VK_PRESENT_MODE_FIFO_KHR`. + +While this seems similar in concept to `VK_PRESENT_MODE_MAILBOX_KHR`, the +fundamental difference is that the processing of multiple present requests +is done during vblank. From the application perspective, this means that, +for example, in a flip-based model, a single vblank may cause multiple +swapchain images to be released at once, while `VK_PRESENT_MODE_MAILBOX_KHR` +is continuously releasing images as new requests become ready. + +In the absence of a present timing extension, a "ready" request is effectively +any request issued after a `VkPresentInfoKHR`'s `pWaitSemaphores` have been +signaled. In that context, this extension does not provide more than +`VK_PRESENT_MODE_MAILBOX_KHR` already offers. However, when using a target +present time, the presentation engine would only dequeue all present requests +for which the specified present time has lapsed. + +== Issues + +=== RESOLVED: Is the presentation engine required to wait for the next vblank to return images of obsolete present requests? + +No, but images must be released in the same (FIFO) order they were presented in. + +=== TODO: Should VK_PRESENT_MODE_FIFO_RELAXED_KHR get a corresponding VK_PRESENT_MODE_FIFO_RELAXED_LATEST_READY_EXT? + +Undecided. diff --git a/xml/vk.xml b/xml/vk.xml index 8d108d08d..dfed28324 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -175,7 +175,7 @@ branch of the member gitlab server. #define VKSC_API_VERSION_1_0 VK_MAKE_API_VERSION(VKSC_API_VARIANT, 1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 296 +#define VK_HEADER_VERSION 297 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) // Version of this file @@ -9415,6 +9415,11 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 shaderReplicatedComposites + + VkStructureType sType + void* pNext + VkBool32 presentModeFifoLatestReady + float minDepthClamp float maxDepthClamp @@ -22563,10 +22568,14 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + +