From faf3ba598d6339c5590e544ffb3fdd182b46c544 Mon Sep 17 00:00:00 2001 From: Jon Leech Date: Fri, 24 Jan 2025 05:03:44 -0800 Subject: [PATCH] Change log for January 24, 2025 Vulkan 1.4.306 spec update: Github Issues * Refactor binary blob text to consistently specify how structures are written to the blob (based on public PR 2477). Internal Issues * Update common draw and draw vertex binding VUs to allow graphics pipelines to ignore tessellation / geometry dynamic state if not using that stage (internal issue 3982) * Clarify in vkUpdateDescriptorSets that descriptors are just a bag of bits until they are dereferenced (internal issue 4125) * Use correct xref for the term "`multi-planar`" (internal issue 4144) * Remove VU 06323 from runtime SPIR-V VUs (internal issue 4147) * Clarify that the <> is unbound (internal MR 7123). * Move mesh shader VUs 08694 and 08695 from common draw validity to common draw mesh validity, so they only affect mesh-drawing commands (internal MR 7126). * Fix typo in VU 01708 (internal MR 7139). New Extensions * VK_EXT_external_memory_metal * VK_KHR_video_maintenance2 --- ChangeLog.adoc | 30 +++ Makefile | 2 +- appendices/VK_EXT_external_memory_metal.adoc | 11 +- appendices/VK_KHR_maintenance8.adoc | 4 + appendices/VK_KHR_video_maintenance2.adoc | 48 ++++ appendices/spirvenv.adoc | 5 - .../device_memory.adoc | 46 ++-- .../VK_EXT_metal_objects/device_memory.adoc | 17 +- chapters/capabilities.adoc | 22 +- .../commonvalidity/blit_image_common.adoc | 2 +- ...o_imagebuffer_buffer_alignment_common.adoc | 13 +- ...opy_bufferimage_to_imagebuffer_common.adoc | 5 +- .../commonvalidity/copy_image_common.adoc | 44 ++-- chapters/commonvalidity/draw_common.adoc | 20 +- chapters/commonvalidity/draw_mesh_common.adoc | 19 ++ .../commonvalidity/draw_vertex_binding.adoc | 6 +- .../get_image_subresource_layout_common.adoc | 12 +- .../image_layout_transition_common.adoc | 9 +- chapters/copies.adoc | 29 ++- chapters/debugging.adoc | 14 +- chapters/descriptorsets.adoc | 21 +- chapters/features.adoc | 50 ++++ chapters/formats.adoc | 20 +- chapters/memory.adoc | 15 +- chapters/pipelines.adoc | 78 +++--- chapters/resources.adoc | 136 ++++++----- chapters/sparsemem.adoc | 7 +- chapters/synchronization.adoc | 12 +- chapters/video/av1_decode.adoc | 44 +++- chapters/video/av1_encode.adoc | 15 +- chapters/video/decode.adoc | 154 ++++++++++++ chapters/video/encode.adoc | 8 +- chapters/video/h264_decode.adoc | 52 ++++ chapters/video/h264_encode.adoc | 51 +++- chapters/video/h265_decode.adoc | 55 +++++ chapters/video/h265_encode.adoc | 67 +++++- chapters/videocoding.adoc | 29 +++ proposals/VK_EXT_external_memory_metal.adoc | 37 +-- proposals/VK_KHR_video_maintenance2.adoc | 225 ++++++++++++++++++ xml/vk.xml | 74 ++++-- 40 files changed, 1189 insertions(+), 319 deletions(-) create mode 100644 appendices/VK_KHR_video_maintenance2.adoc create mode 100644 proposals/VK_KHR_video_maintenance2.adoc mode change 100644 => 100755 xml/vk.xml diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 59d09eda0..cd104baa9 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -14,6 +14,36 @@ appears frequently in the change log. ''' +Change log for January 24, 2025 Vulkan 1.4.306 spec update: + +Github Issues + + * Refactor binary blob text to consistently specify how structures are + written to the blob (based on public PR 2477). + +Internal Issues + + * Update common draw and draw vertex binding VUs to allow graphics + pipelines to ignore tessellation / geometry dynamic state if not using + that stage (internal issue 3982) + * Clarify in vkUpdateDescriptorSets that descriptors are just a bag of + bits until they are dereferenced (internal issue 4125) + * Use correct xref for the term "`multi-planar`" (internal issue 4144) + * Remove VU 06323 from runtime SPIR-V VUs (internal issue 4147) + * Clarify that the <> is + unbound (internal MR 7123). + * Move mesh shader VUs 08694 and 08695 from common draw validity to common + draw mesh validity, so they only affect mesh-drawing commands (internal + MR 7126). + * Fix typo in VU 01708 (internal MR 7139). + +New Extensions + + * VK_EXT_external_memory_metal + * VK_KHR_video_maintenance2 + +''' + Change log for January 17, 2025 Vulkan 1.4.305 spec update: Github Issues diff --git a/Makefile b/Makefile index ed86fb91a..c4ded1044 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ VERBOSE = # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 305 +PATCHVERSION = 306 BASEOPTS = ifneq (,$(findstring VKSC_VERSION_1_0,$(VERSIONS))) diff --git a/appendices/VK_EXT_external_memory_metal.adoc b/appendices/VK_EXT_external_memory_metal.adoc index d16f6a5bc..5859f7d1c 100644 --- a/appendices/VK_EXT_external_memory_metal.adoc +++ b/appendices/VK_EXT_external_memory_metal.adoc @@ -1,4 +1,4 @@ -// Copyright 2024 The Khronos Group Inc. +// Copyright 2024-2025 The Khronos Group Inc. // // SPDX-License-Identifier: CC-BY-4.0 @@ -15,9 +15,12 @@ include::{generated}/meta/{refprefix}VK_EXT_external_memory_metal.adoc[] === Description -An application may wish to reference device memory in multiple Vulkan device instances, in multiple processes, and/or in Metal API. -This extension enables an application to export and import Metal handles from Vulkan memory objects such that the underlying -resources can be referenced outside the scope of the Vulkan device instance that created them. +An application may wish to reference device memory in multiple Vulkan device +instances, in multiple processes, and/or in Metal API. +This extension enables an application to export and import Metal handles +from Vulkan memory objects such that the underlying resources can be +referenced outside the scope of the Vulkan device instance that created +them. include::{generated}/interfaces/VK_EXT_external_memory_metal.adoc[] diff --git a/appendices/VK_KHR_maintenance8.adoc b/appendices/VK_KHR_maintenance8.adoc index a7b94629f..e2d517cc3 100644 --- a/appendices/VK_KHR_maintenance8.adoc +++ b/appendices/VK_KHR_maintenance8.adoc @@ -22,6 +22,10 @@ include::{generated}/meta/{refprefix}VK_KHR_maintenance8.adoc[] - Rick Hammerstone, Qualcomm - Daniel Story, Nintendo - Hans-Kristian Arntzen, Valve + - Caterina Shablia, Collabora + - Georg Lehmann, Valve + - Shahbaz Youssefi, Google + - Tobias Hector, AMD === Description diff --git a/appendices/VK_KHR_video_maintenance2.adoc b/appendices/VK_KHR_video_maintenance2.adoc new file mode 100644 index 000000000..8b41acf57 --- /dev/null +++ b/appendices/VK_KHR_video_maintenance2.adoc @@ -0,0 +1,48 @@ +// Copyright 2023-2025 The Khronos Group Inc. +// +// SPDX-License-Identifier: CC-BY-4.0 + +include::{generated}/meta/{refprefix}VK_KHR_video_maintenance2.adoc[] + +=== Other Extension Metadata + +*Last Modified Date*:: + 2024-10-14 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Ahmed Abdelkhalek, AMD + - Benjamin Cheng, AMD + - Aidan Fabius, Core Avionics & Industrial Inc. + - Ping Liu, Intel + - Lynne Iribarren, Independent + - Srinath Kumarapuram, NVIDIA + - Tony Zlatinski, NVIDIA + - Daniel Rakos, RasterGrid + +=== Description + +`VK_KHR_video_maintenance2` adds a collection of minor video coding +features, none of which would warrant an entire extension of their own. + +The new features are as follows: + + * Allow video coding control commands (such as video session reset) to be + issued without the need for a bound video session parameters object for + video decode operations that would otherwise require the use of video + session parameters objects. + * Allow applications to specify codec-specific parameter sets inline for + each decode operation instead of having to construct video session + parameters objects. + * Require support for + ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR in all + applicable video encode profiles. + * Provide additional guarantees on Video Std parameters that the encoder + implementation will not override. + +include::{generated}/interfaces/VK_KHR_video_maintenance2.adoc[] + +=== Version History + + * Revision 1, 2024-10-14 (Daniel Rakos) + ** internal revisions diff --git a/appendices/spirvenv.adoc b/appendices/spirvenv.adoc index 9b25f528c..5b0a78689 100644 --- a/appendices/spirvenv.adoc +++ b/appendices/spirvenv.adoc @@ -1510,11 +1510,6 @@ endif::VK_NV_cooperative_matrix2[] instructions must: not be used in shader stages not included in slink:VkPhysicalDeviceCooperativeMatrixPropertiesKHR::pname:cooperativeMatrixSupportedStages endif::VK_KHR_cooperative_matrix[] - * [[VUID-{refpage}-DescriptorSet-06323]] - code:DescriptorSet and code:Binding decorations must: obey the - constraints on {StorageClass}, type, and descriptor type described in - <> ifdef::VK_NV_cooperative_matrix[] * [[VUID-{refpage}-OpCooperativeMatrixLoadNV-06324]] For code:OpCooperativeMatrixLoadNV and code:OpCooperativeMatrixStoreNV diff --git a/chapters/VK_EXT_external_memory_metal/device_memory.adoc b/chapters/VK_EXT_external_memory_metal/device_memory.adoc index e459c91da..4c51838d0 100644 --- a/chapters/VK_EXT_external_memory_metal/device_memory.adoc +++ b/chapters/VK_EXT_external_memory_metal/device_memory.adoc @@ -1,4 +1,4 @@ -// Copyright 2024 The Khronos Group Inc. +// Copyright 2024-2025 The Khronos Group Inc. // // SPDX-License-Identifier: CC-BY-4.0 @@ -21,8 +21,8 @@ include::{generated}/api/structs/VkImportMemoryMetalHandleInfoEXT.adoc[] specifying the type of pname:handle or pname:name. * pname:handle is `NULL` or the external handle to import. -Importing memory object payloads from Metal handles shares the -ownership of the handle to the Vulkan implementation. +Importing memory object payloads from Metal handles shares the ownership of +the handle to the Vulkan implementation. Applications can: import the same payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a @@ -32,18 +32,23 @@ sname:VkDeviceMemory object. .Valid Usage **** - * If pname:handleType is not `0`, it must: be supported for import, as + * [[VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10408]] + If pname:handleType is not `0`, it must: be supported for import, as reported by slink:VkExternalImageFormatProperties or slink:VkExternalBufferProperties - * The memory from which pname:handle was exported must: have been created + * [[VUID-VkImportMemoryMetalHandleInfoEXT-handle-10409]] + The memory from which pname:handle was exported must: have been created on the same underlying physical device as pname:device - * If pname:handleType is not `0`, it must: be + * [[VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10410]] + If pname:handleType is not `0`, it must: be ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT - * If pname:handleType is not `0` , pname:handle must: be a valid non-NULL + * [[VUID-VkImportMemoryMetalHandleInfoEXT-handleType-10411]] + If pname:handleType is not `0` , pname:handle must: be a valid non-NULL handle of the type specified by pname:handleType - * pname:handle must: obey any requirements listed for pname:handleType in + * [[VUID-VkImportMemoryMetalHandleInfoEXT-handle-10412]] + pname:handle must: obey any requirements listed for pname:handleType in <> **** @@ -53,8 +58,8 @@ include::{generated}/validity/structs/VkImportMemoryMetalHandleInfoEXT.adoc[] [open,refpage='vkGetMemoryMetalHandleEXT',desc='Get a Metal handle for a memory object',type='protos'] -- -To export a Metal handle representing the payload of a Vulkan device -memory object, call: +To export a Metal handle representing the payload of a Vulkan device memory +object, call: include::{generated}/api/protos/vkGetMemoryMetalHandleEXT.adoc[] @@ -66,8 +71,8 @@ include::{generated}/api/protos/vkGetMemoryMetalHandleEXT.adoc[] * pname:pHandle will return the Metal handle representing the payload of the device memory object. -Unless the app retains the handle object returned by the call, the lifespan will be the same as -the associated `VkDeviceMemory`. +Unless the app retains the handle object returned by the call, the lifespan +will be the same as the associated `VkDeviceMemory`. include::{generated}/validity/protos/vkGetMemoryMetalHandleEXT.adoc[] -- @@ -93,12 +98,15 @@ properties of the defined external memory handle types. .Valid Usage **** - * pname:memory must: have been created with a valid + * [[VUID-VkMemoryGetMetalHandleInfoEXT-memory-10413]] + pname:memory must: have been created with a valid slink:VkExportMemoryAllocateInfo - * pname:handleType must: have been included in + * [[VUID-VkMemoryGetMetalHandleInfoEXT-handleType-10414]] + pname:handleType must: have been included in slink:VkExportMemoryAllocateInfo::pname:handleTypes when pname:memory was created - * pname:handleType must: be + * [[VUID-VkMemoryGetMetalHandleInfoEXT-handleType-10415]] + pname:handleType must: be ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT @@ -126,9 +134,11 @@ include::{generated}/api/protos/vkGetMemoryMetalHandlePropertiesEXT.adoc[] .Valid Usage **** - * pname:handle must: point to a valid id, id or + * [[VUID-vkGetMemoryMetalHandlePropertiesEXT-handle-10416]] + pname:handle must: point to a valid id, id or id - * pname:handleType must: be + * [[VUID-vkGetMemoryMetalHandlePropertiesEXT-handleType-10417]] + pname:handleType must: be ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT, ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT or ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT @@ -150,4 +160,4 @@ include::{generated}/api/structs/VkMemoryMetalHandlePropertiesEXT.adoc[] memory type which the specified Metal handle can: be imported as. include::{generated}/validity/structs/VkMemoryMetalHandlePropertiesEXT.adoc[] --- \ No newline at end of file +-- diff --git a/chapters/VK_EXT_metal_objects/device_memory.adoc b/chapters/VK_EXT_metal_objects/device_memory.adoc index f382b6a84..f9f6d8eb0 100644 --- a/chapters/VK_EXT_metal_objects/device_memory.adoc +++ b/chapters/VK_EXT_metal_objects/device_memory.adoc @@ -173,23 +173,24 @@ include::{generated}/api/structs/VkExportMetalObjectsInfoEXT.adoc[] * [[VUID-VkExportMetalObjectsInfoEXT-pNext-06799]] If the pname:pNext chain includes a slink:VkExportMetalTextureInfoEXT structure, and if the slink:VkImage in its pname:image member does not - have a multi-planar format, then its pname:plane member must: be - ename:VK_IMAGE_ASPECT_PLANE_0_BIT + have a <>, then its + pname:plane member must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT * [[VUID-VkExportMetalObjectsInfoEXT-pNext-06800]] If the pname:pNext chain includes a slink:VkExportMetalTextureInfoEXT structure, and if the slink:VkImage in its pname:image member has a - multi-planar format with only two planes, then its pname:plane member - must: not be ename:VK_IMAGE_ASPECT_PLANE_2_BIT + <> with only two planes, then + its pname:plane member must: not be ename:VK_IMAGE_ASPECT_PLANE_2_BIT * [[VUID-VkExportMetalObjectsInfoEXT-pNext-06801]] If the pname:pNext chain includes a slink:VkExportMetalTextureInfoEXT structure, and if the slink:VkImageView in its pname:imageView member - does not have a multi-planar format, then its pname:plane member must: - be ename:VK_IMAGE_ASPECT_PLANE_0_BIT + does not have a <>, then its + pname:plane member must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT * [[VUID-VkExportMetalObjectsInfoEXT-pNext-06802]] If the pname:pNext chain includes a slink:VkExportMetalTextureInfoEXT structure, and if the slink:VkImageView in its pname:imageView member - has a multi-planar format with only two planes, then its pname:plane - member must: not be ename:VK_IMAGE_ASPECT_PLANE_2_BIT + has a <> with only two planes, + then its pname:plane member must: not be + ename:VK_IMAGE_ASPECT_PLANE_2_BIT * [[VUID-VkExportMetalObjectsInfoEXT-pNext-06803]] If the pname:pNext chain includes a slink:VkExportMetalIOSurfaceInfoEXT structure, the slink:VkImage in its pname:image member must: have been diff --git a/chapters/capabilities.adoc b/chapters/capabilities.adoc index 77f502239..db6fab4e0 100644 --- a/chapters/capabilities.adoc +++ b/chapters/capabilities.adoc @@ -529,12 +529,12 @@ ifdef::VK_QNX_external_memory_screen_buffer[] details of this handle type. endif::VK_QNX_external_memory_screen_buffer[] ifdef::VK_EXT_external_memory_metal[] - * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT is a handle to - a `MTLResource` holding a `MTLBuffer`. - * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT is a handle to - a `MTLResource` holding a `MTLTexture`. - * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT is a handle to - a `MTLResource` holding a `MTLHeap`. + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT is a handle to a + `MTLResource` holding a `MTLBuffer`. + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT is a handle to a + `MTLResource` holding a `MTLTexture`. + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLHEAP_BIT_EXT is a handle to a + `MTLResource` holding a `MTLHeap`. endif::VK_EXT_external_memory_metal[] <<< @@ -824,9 +824,10 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] [open,refpage='VkSamplerYcbcrConversionImageFormatProperties',desc='Structure specifying combined image sampler descriptor count for multi-planar images',type='structs'] -- To determine the number of combined image samplers required to support a -multi-planar format, add slink:VkSamplerYcbcrConversionImageFormatProperties -to the pname:pNext chain of the slink:VkImageFormatProperties2 structure in -a call to fname:vkGetPhysicalDeviceImageFormatProperties2. +<>, add +slink:VkSamplerYcbcrConversionImageFormatProperties to the pname:pNext chain +of the slink:VkImageFormatProperties2 structure in a call to +fname:vkGetPhysicalDeviceImageFormatProperties2. The sname:VkSamplerYcbcrConversionImageFormatProperties structure is defined as: @@ -872,7 +873,8 @@ implementations to use a uniform stride for dynamic indexing of the descriptors in the binding. For example, consider a descriptor set layout binding with two descriptors -and immutable samplers for multi-planar formats that have +and immutable samplers for <> +that have sname:VkSamplerYcbcrConversionImageFormatProperties::pname:combinedImageSamplerDescriptorCount values of `2` and `3` respectively. There are two descriptors in the binding and the maximum diff --git a/chapters/commonvalidity/blit_image_common.adoc b/chapters/commonvalidity/blit_image_common.adoc index a39ec4ce5..6ceeb547f 100644 --- a/chapters/commonvalidity/blit_image_common.adoc +++ b/chapters/commonvalidity/blit_image_common.adoc @@ -135,7 +135,7 @@ endif::VK_VERSION_1_4,VK_KHR_maintenance5[] slink:VkImageCreateInfo when pname:srcImage was created * [[VUID-{refpage}-dstSubresource-01708]] ifdef::VK_VERSION_1_4,VK_KHR_maintenance5[] - If pname:srcSubresource.layerCount is not + If pname:dstSubresource.layerCount is not ename:VK_REMAINING_ARRAY_LAYERS, endif::VK_VERSION_1_4,VK_KHR_maintenance5[] [eq]#pname:dstSubresource.baseArrayLayer {plus} diff --git a/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_buffer_alignment_common.adoc b/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_buffer_alignment_common.adoc index 99d34a507..a25ba88cb 100644 --- a/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_buffer_alignment_common.adoc +++ b/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_buffer_alignment_common.adoc @@ -12,18 +12,17 @@ * [[VUID-{refpage}-{imageparam}-07975]] If pname:{imageparam} does not have either a depth/stencil format ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] - or a <>, + or a <>, endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] then for each element of pname:pRegions, pname:bufferOffset must: be a multiple of the <> ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-{imageparam}-07976]] - If pname:{imageparam} has a - <>, then - for each element of pname:pRegions, pname:bufferOffset must: be a - multiple of the element size of the compatible format for the format and - the pname:aspectMask of the pname:imageSubresource as defined in - <> + If pname:{imageparam} has a <>, then for each element of pname:pRegions, pname:bufferOffset + must: be a multiple of the element size of the compatible format for the + format and the pname:aspectMask of the pname:imageSubresource as defined + in <> endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-{imageparam}-07978]] If pname:{imageparam} has a depth/stencil format, the pname:bufferOffset diff --git a/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_common.adoc b/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_common.adoc index e993a513b..b46e5e524 100644 --- a/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_common.adoc +++ b/chapters/commonvalidity/copy_bufferimage_to_imagebuffer_common.adoc @@ -156,11 +156,10 @@ endif::VK_QCOM_rotated_copy_commands[] must: specify aspects present in pname:{imageparam} ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-{imageparam}-07981]] - If pname:{imageparam} has a - <>, then for each element of pname:pRegions, pname:{imagesubresource}.aspectMask must: be a single valid - <> bit + <> bit endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-{imageparam}-07983]] If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_3D, for each diff --git a/chapters/commonvalidity/copy_image_common.adoc b/chapters/commonvalidity/copy_image_common.adoc index a65178e68..46ea685b8 100644 --- a/chapters/commonvalidity/copy_image_common.adoc +++ b/chapters/commonvalidity/copy_image_common.adoc @@ -52,8 +52,7 @@ endif::VK_KHR_shared_presentable_image[] * [[VUID-{refpage}-srcImage-01548]] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] If the elink:VkFormat of each of pname:srcImage and pname:dstImage is - not a <>, the + not a <>, the endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[The] elink:VkFormat of each of pname:srcImage and pname:dstImage must: be @@ -61,8 +60,8 @@ ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[The] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-None-01549]] In a copy to or from a plane of a - <>, the - elink:VkFormat of the image and plane must: be compatible according to + <>, the elink:VkFormat of the + image and plane must: be compatible according to <> for the plane being copied endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] @@ -88,8 +87,7 @@ endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-srcImage-01551]] If neither pname:srcImage nor pname:dstImage has a - <> + <> ifdef::VK_KHR_maintenance8[and the <> feature is not enabled] then for each element of pname:pRegions, pname:srcSubresource.aspectMask and pname:dstSubresource.aspectMask must: match @@ -104,27 +102,25 @@ ifdef::VK_KHR_maintenance8[] ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT. endif::VK_KHR_maintenance8[] * [[VUID-{refpage}-srcImage-08713]] - If pname:srcImage has a <>, then for each element of pname:pRegions, - pname:srcSubresource.aspectMask must: be a single valid - <> bit + If pname:srcImage has a <>, + then for each element of pname:pRegions, pname:srcSubresource.aspectMask + must: be a single valid <> bit * [[VUID-{refpage}-dstImage-08714]] - If pname:dstImage has a <>, then for each element of pname:pRegions, - pname:dstSubresource.aspectMask must: be a single valid - <> bit + If pname:dstImage has a <>, + then for each element of pname:pRegions, pname:dstSubresource.aspectMask + must: be a single valid <> bit * [[VUID-{refpage}-srcImage-01556]] - If pname:srcImage has a - <> - and the pname:dstImage does not have a multi-planar image format, then - for each element of pname:pRegions, pname:dstSubresource.aspectMask - must: be ename:VK_IMAGE_ASPECT_COLOR_BIT + If pname:srcImage has a <> and + the pname:dstImage does not have a multi-planar image format, then for + each element of pname:pRegions, pname:dstSubresource.aspectMask must: be + ename:VK_IMAGE_ASPECT_COLOR_BIT * [[VUID-{refpage}-dstImage-01557]] - If pname:dstImage has a - <> - and the pname:srcImage does not have a multi-planar image format, then - for each element of pname:pRegions, pname:srcSubresource.aspectMask - must: be ename:VK_IMAGE_ASPECT_COLOR_BIT + If pname:dstImage has a <> and + the pname:srcImage does not have a multi-planar image format, then for + each element of pname:pRegions, pname:srcSubresource.aspectMask must: be + ename:VK_IMAGE_ASPECT_COLOR_BIT endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_KHR_maintenance8[] * [[VUID-{refpage}-srcSubresource-10209]] diff --git a/chapters/commonvalidity/draw_common.adoc b/chapters/commonvalidity/draw_common.adoc index 0078ee3e4..d831dde4e 100644 --- a/chapters/commonvalidity/draw_common.adoc +++ b/chapters/commonvalidity/draw_common.adoc @@ -1524,7 +1524,8 @@ ifdef::VK_EXT_shader_object[] a shader object is bound to the ename:VK_SHADER_STAGE_GEOMETRY_BIT stage or endif::VK_EXT_shader_object[] - a graphics pipeline is bound which was created with the + a graphics pipeline is bound which was created with both a + ename:VK_SHADER_STAGE_GEOMETRY_BIT stage and the ename:VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT dynamic state enabled, then flink:vkCmdSetRasterizationStreamEXT must: have been called and not subsequently <> in the current @@ -2399,23 +2400,6 @@ ifdef::VK_EXT_mesh_shader[] ename:VK_SHADER_STAGE_VERTEX_BIT or ename:VK_SHADER_STAGE_MESH_BIT_EXT stages must: have a valid sname:VkShaderEXT bound, and the other must: have no sname:VkShaderEXT bound - * [[VUID-{refpage}-None-08694]] - If there is no bound graphics pipeline, and both the - <> and <> features are enabled, and a valid sname:VkShaderEXT - is bound the to the ename:VK_SHADER_STAGE_MESH_BIT_EXT stage, and that - sname:VkShaderEXT was created without the - ename:VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid - sname:VkShaderEXT must: be bound to the - ename:VK_SHADER_STAGE_TASK_BIT_EXT stage - * [[VUID-{refpage}-None-08695]] - If there is no bound graphics pipeline, and both the - <> and <> features are enabled, and a valid sname:VkShaderEXT - is bound the to the ename:VK_SHADER_STAGE_MESH_BIT_EXT stage, and that - sname:VkShaderEXT was created with the - ename:VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must: be no - sname:VkShaderEXT bound to the ename:VK_SHADER_STAGE_TASK_BIT_EXT stage * [[VUID-{refpage}-None-08696]] If there is no bound graphics pipeline, and a valid sname:VkShaderEXT is bound to the ename:VK_SHADER_STAGE_VERTEX_BIT stage, there must: be no diff --git a/chapters/commonvalidity/draw_mesh_common.adoc b/chapters/commonvalidity/draw_mesh_common.adoc index a2073d2ff..2fc90d906 100644 --- a/chapters/commonvalidity/draw_mesh_common.adoc +++ b/chapters/commonvalidity/draw_mesh_common.adoc @@ -37,4 +37,23 @@ endif::VK_EXT_primitives_generated_query[] or ename:VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] +ifdef::VK_EXT_shader_object[] + * [[VUID-{refpage}-None-08694]] + If there is no bound graphics pipeline, and both the + <> and <> features are enabled, and a valid sname:VkShaderEXT + is bound the to the ename:VK_SHADER_STAGE_MESH_BIT_EXT stage, and that + sname:VkShaderEXT was created without the + ename:VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, a valid + sname:VkShaderEXT must: be bound to the + ename:VK_SHADER_STAGE_TASK_BIT_EXT stage + * [[VUID-{refpage}-None-08695]] + If there is no bound graphics pipeline, and both the + <> and <> features are enabled, and a valid sname:VkShaderEXT + is bound the to the ename:VK_SHADER_STAGE_MESH_BIT_EXT stage, and that + sname:VkShaderEXT was created with the + ename:VK_SHADER_CREATE_NO_TASK_SHADER_BIT_EXT flag, there must: be no + sname:VkShaderEXT bound to the ename:VK_SHADER_STAGE_TASK_BIT_EXT stage +endif::VK_EXT_shader_object[] // Common Valid Usage diff --git a/chapters/commonvalidity/draw_vertex_binding.adoc b/chapters/commonvalidity/draw_vertex_binding.adoc index 2664bb934..f3793d7c0 100644 --- a/chapters/commonvalidity/draw_vertex_binding.adoc +++ b/chapters/commonvalidity/draw_vertex_binding.adoc @@ -211,7 +211,8 @@ ifdef::VK_EXT_shader_object[] ifdef::VK_EXT_extended_dynamic_state2[or] endif::VK_EXT_shader_object[] ifdef::VK_EXT_extended_dynamic_state2[] - the bound graphics pipeline state was created with the + the bound graphics pipeline state was created with both a + ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT stage and the ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state enabled, endif::VK_EXT_extended_dynamic_state2[] and the <> of @@ -277,7 +278,8 @@ ifdef::VK_EXT_shader_object[] a shader object is bound to the ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage or endif::VK_EXT_shader_object[] - a graphics pipeline is bound which was created with the + a graphics pipeline is bound which was created with both a + ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT stage and the ename:VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT dynamic state enabled, then flink:vkCmdSetTessellationDomainOriginEXT must: have been called and not subsequently <> in diff --git a/chapters/commonvalidity/get_image_subresource_layout_common.adoc b/chapters/commonvalidity/get_image_subresource_layout_common.adoc index 5dfad3111..43e4d0907 100644 --- a/chapters/commonvalidity/get_image_subresource_layout_common.adoc +++ b/chapters/commonvalidity/get_image_subresource_layout_common.adoc @@ -17,8 +17,7 @@ * [[VUID-{refpage}-format-08886]] If pname:format of the pname:image is a color format ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] - that is not a <>, + that is not a <>, endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] and pname:tiling of the pname:{imageparam} is ename:VK_IMAGE_TILING_LINEAR or ename:VK_IMAGE_TILING_OPTIMAL, the @@ -40,10 +39,9 @@ endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-tiling-08717]] If the pname:tiling of the pname:{imageparam} is - ename:VK_IMAGE_TILING_LINEAR and has a - <>, then the pname:aspectMask member of pname:pSubresource must: - be a single valid <> bit + ename:VK_IMAGE_TILING_LINEAR and has a <>, then the pname:aspectMask member of + pname:pSubresource must: be a single valid + <> bit endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] // Common Valid Usage diff --git a/chapters/commonvalidity/image_layout_transition_common.adoc b/chapters/commonvalidity/image_layout_transition_common.adoc index 19652b49b..d6b193605 100644 --- a/chapters/commonvalidity/image_layout_transition_common.adoc +++ b/chapters/commonvalidity/image_layout_transition_common.adoc @@ -42,10 +42,11 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] pname:aspectMask member of pname:subresourceRange must: be ename:VK_IMAGE_ASPECT_COLOR_BIT * [[VUID-{refpage}-image-01672]] - If pname:image has a multi-planar format and the image is _disjoint_, - then the pname:aspectMask member of pname:subresourceRange must: include - at least one <> - bit or ename:VK_IMAGE_ASPECT_COLOR_BIT + If pname:image has a <> and + the image is _disjoint_, then the pname:aspectMask member of + pname:subresourceRange must: include at least one + <> bit or + ename:VK_IMAGE_ASPECT_COLOR_BIT endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-{refpage}-image-03320]] If pname:image has a depth/stencil format with both depth and stencil diff --git a/chapters/copies.adoc b/chapters/copies.adoc index 825ebf4d3..f51e5db3a 100644 --- a/chapters/copies.adoc +++ b/chapters/copies.adoc @@ -213,10 +213,10 @@ values copied from pname:srcBuffer outside of the range [eq]#[0,1]# will be written as undefined: values to the destination image. ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -<> can: -only be copied on a per-plane basis, and the subresources used in each -region when copying to or from such images must: specify only one plane, -though different regions can: specify different planes. +<> can: only be copied on a +per-plane basis, and the subresources used in each region when copying to or +from such images must: specify only one plane, though different regions can: +specify different planes. When copying planes of multi-planar images, the format considered is the <>, rather than the format of the multi-planar image. @@ -566,11 +566,10 @@ base image, according to the aspect, as described in the following table: ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] [[copies-buffers-images-multi-planar]] -When copying between a buffer and any plane of a -<>, -addressing calculations are performed using the <>, rather than the format of the -multi-planar image. +When copying between a buffer and any plane of a <>, addressing calculations are performed using the +<>, rather than +the format of the multi-planar image. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] Each texel block is copied from one resource to the other according to the @@ -824,8 +823,8 @@ ifdef::VK_QCOM_rotated_copy_commands[] * [[VUID-VkCopyBufferToImageInfo2KHR-pRegions-06204]] If any element of pname:pRegions contains slink:VkCopyCommandTransformInfoQCOM in its pname:pNext chain, then - pname:dstImage must: not have a - <> + pname:dstImage must: not have a <> endif::VK_QCOM_rotated_copy_commands[] include::{chapters}/commonvalidity/copy_buffer_to_image_common.adoc[] include::{chapters}/commonvalidity/copy_anyimage_to_imageany_common.adoc[] @@ -948,8 +947,8 @@ ifdef::VK_QCOM_rotated_copy_commands[] * [[VUID-VkCopyImageToBufferInfo2KHR-pRegions-06206]] If any element of pname:pRegions contains slink:VkCopyCommandTransformInfoQCOM in its pname:pNext chain, then - pname:srcImage must: not have a - <> + pname:srcImage must: not have a <> endif::VK_QCOM_rotated_copy_commands[] include::{chapters}/commonvalidity/copy_image_to_buffer_common.adoc[] include::{chapters}/commonvalidity/copy_anyimage_to_imageany_common.adoc[] @@ -1536,8 +1535,8 @@ ifdef::VK_QCOM_rotated_copy_commands[] * [[VUID-VkBlitImageInfo2KHR-pRegions-06208]] If any element of pname:pRegions contains slink:VkCopyCommandTransformInfoQCOM in its pname:pNext chain, then - pname:srcImage must: not have a - <> + pname:srcImage must: not have a <> endif::VK_QCOM_rotated_copy_commands[] ifdef::VK_QCOM_filter_cubic_weights[] * [[VUID-VkBlitImageInfo2-filter-09204]] diff --git a/chapters/debugging.adoc b/chapters/debugging.adoc index 4b1fe2cdd..49fa113aa 100644 --- a/chapters/debugging.adoc +++ b/chapters/debugging.adoc @@ -446,6 +446,7 @@ include::{generated}/api/structs/VkDeviceFaultVendorBinaryHeaderVersionOneEXT.ad enum value specifying the version of the header. A consumer of the crash dump should: use the header version to interpret the remainder of the header. + pname:headerVersion must: be written as exactly 4 bytes. * pname:vendorID is the sname:VkPhysicalDeviceProperties::pname:vendorID of the implementation. * pname:deviceID is the sname:VkPhysicalDeviceProperties::pname:deviceID @@ -478,17 +479,8 @@ include::{generated}/api/structs/VkDeviceFaultVendorBinaryHeaderVersionOneEXT.ad * pname:apiVersion must: be zero or the value specified by slink:VkApplicationInfo::pname:apiVersion during instance creation. -Unlike most structures declared by the Vulkan API, all fields of this -structure are written with the least significant byte first, regardless of -host byte-order. - -The C language specification does not define the packing of structure -members. -This layout assumes tight structure member packing, with members laid out in -the order listed in the structure, and the intended size of the structure is -56 bytes. -If a compiler produces code that diverges from that pattern, applications -must: employ another method to set values at the correct offsets. +:binary_blob_size: 56 +include::{chapters}/pipelines.adoc[tag=binary_blob_header] .Valid Usage **** diff --git a/chapters/descriptorsets.adoc b/chapters/descriptorsets.adoc index c52a0228c..b6375b13b 100644 --- a/chapters/descriptorsets.adoc +++ b/chapters/descriptorsets.adoc @@ -2865,9 +2865,9 @@ ifdef::VK_VULKAN_1_1,VK_KHR_sampler_ycbcr_conversion[] [NOTE] ==== When creating a descriptor pool that will contain descriptors for combined -image samplers of multi-planar formats, an application needs to account for -non-trivial descriptor consumption when choosing the pname:descriptorCount -value, as indicated by +image samplers of <>, an +application needs to account for non-trivial descriptor consumption when +choosing the pname:descriptorCount value, as indicated by slink:VkSamplerYcbcrConversionImageFormatProperties::pname:combinedImageSamplerDescriptorCount. ifdef::VK_VERSION_1_4,VK_KHR_maintenance6[] @@ -3350,6 +3350,12 @@ ename:VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT bits set, endif::VK_VERSION_1_2,VK_EXT_descriptor_indexing[] that command buffer becomes <>. +Copying a descriptor from a descriptor set does not constitute a use of the +referenced resource or view, as it is the reference itself that is copied. +Applications can: copy a descriptor referencing a destroyed resource, and it +can: copy an undefined: descriptor. +The destination descriptor becomes undefined: in both cases. + .Valid Usage **** * [[VUID-vkUpdateDescriptorSets-pDescriptorWrites-06236]] @@ -4137,11 +4143,10 @@ endif::VK_VERSION_1_2,VK_KHR_separate_depth_stencil_layouts[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkDescriptorImageInfo-sampler-01564]] If pname:sampler is used and the elink:VkFormat of the image is a - <>, the - image must: have been created with - ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the pname:aspectMask of - the pname:imageView must: be a valid - <> bit + <>, the image must: have been + created with ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the + pname:aspectMask of the pname:imageView must: be a valid + <> bit endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_KHR_portability_subset[] * [[VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450]] diff --git a/chapters/features.adoc b/chapters/features.adoc index 652eee6e6..2bf48b536 100644 --- a/chapters/features.adoc +++ b/chapters/features.adoc @@ -4401,6 +4401,56 @@ include::{generated}/validity/structs/VkPhysicalDeviceVideoMaintenance1FeaturesK -- endif::VK_KHR_video_maintenance1[] +ifdef::VK_KHR_video_maintenance2[] +[open,refpage='VkPhysicalDeviceVideoMaintenance2FeaturesKHR',desc='Structure describing the video maintenance features that can be supported by an implementation',type='structs'] +-- +The sname:VkPhysicalDeviceVideoMaintenance2FeaturesKHR structure is defined +as: + +include::{generated}/api/structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.adoc[] + +This structure describes the following features: + + * pname:sType is a elink:VkStructureType value identifying this structure. + * pname:pNext is `NULL` or a pointer to a structure extending this + structure. + * [[features-videoMaintenance2]] pname:videoMaintenance2 specifies that + the implementation supports the following: +ifdef::VK_KHR_video_decode_queue[] + ** Support for issuing <> + commands against video decode sessions without a bound video session + parameters object. + ** The new video session creation flag + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR for + video decode sessions. +endif::VK_KHR_video_decode_queue[] +ifdef::VK_KHR_video_encode_queue[] +ifdef::VK_KHR_video_encode_h264,VK_KHR_video_encode_h265,VK_KHR_video_encode_av1[] + ** Required support for the <> ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR for the + following video encode profiles: +ifdef::VK_KHR_video_encode_h264[] + *** <>; +endif::VK_KHR_video_encode_h264[] +ifdef::VK_KHR_video_encode_h265[] + *** <>; +endif::VK_KHR_video_encode_h265[] +ifdef::VK_KHR_video_encode_av1[] + *** <>. +endif::VK_KHR_video_encode_av1[] +endif::VK_KHR_video_encode_h264,VK_KHR_video_encode_h265,VK_KHR_video_encode_av1[] + ** Additional guarantees on Video Std parameters used with video encode + profiles that the implementations support without the need to + <> them. +endif::VK_KHR_video_encode_queue[] + +:refpage: VkPhysicalDeviceVideoMaintenance2FeaturesKHR +include::{chapters}/features.adoc[tag=features] + +include::{generated}/validity/structs/VkPhysicalDeviceVideoMaintenance2FeaturesKHR.adoc[] +-- +endif::VK_KHR_video_maintenance2[] + ifdef::VK_KHR_video_encode_av1[] [open,refpage='VkPhysicalDeviceVideoEncodeAV1FeaturesKHR',desc='Structure describing the video encode AV1 features that can be supported by an implementation',type='structs'] -- diff --git a/chapters/formats.adoc b/chapters/formats.adoc index d8c46239c..836a9860e 100644 --- a/chapters/formats.adoc +++ b/chapters/formats.adoc @@ -1304,10 +1304,10 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] [[formats-compatible-planes]] === Compatible Formats of Planes of Multi-Planar Formats -Individual planes of multi-planar formats are size-compatible with -single-plane color formats if they occupy the same number of bits per texel -block, and are compatible with those formats if they have the same block -extent. +Individual planes of <> are +size-compatible with single-plane color formats if they occupy the same +number of bits per texel block, and are compatible with those formats if +they have the same block extent. In the following table, individual planes of a _multi-planar_ format are compatible with the format listed against the relevant plane index for that @@ -1358,11 +1358,12 @@ relations by size: endif::VK_KHR_maintenance8[] -[[formats-planes-image-aspect]] +[[formats-multiplanar-image-aspect]] === Multi-Planar Format Image Aspect -When using elink:VkImageAspectFlagBits to select a plane of a multi-planar -format, the following are the valid options: +When using elink:VkImageAspectFlagBits to select a plane of a +<>, the following are the valid +options: * Two planes ** ename:VK_IMAGE_ASPECT_PLANE_0_BIT @@ -1445,7 +1446,7 @@ within a region. |==== ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -[[formats-planes]] +[[formats-multiplanar]] For _multi-planar_ images, the components in separate _planes_ are separated by underscores, and the number of planes is indicated by the addition of a etext:_2PLANE or etext:_3PLANE suffix. @@ -2233,8 +2234,7 @@ pname:drmFormatModifier. An image's _memory planecount_ (as returned by pname:drmFormatModifierPlaneCount) is distinct from its _format planecount_ -(in the sense of <> -{YCbCr} formats). +(in the sense of <>). In tlink:VkImageAspectFlags, each `VK_IMAGE_ASPECT_MEMORY_PLANE__{ibit}__BIT_EXT` represents a _memory plane_ and each `VK_IMAGE_ASPECT_PLANE__{ibit}__BIT` a _format plane_. diff --git a/chapters/memory.adoc b/chapters/memory.adoc index 275dd3f2e..95878237b 100644 --- a/chapters/memory.adoc +++ b/chapters/memory.adoc @@ -1655,17 +1655,20 @@ ifdef::VK_QNX_external_memory_screen_buffer[] identical endif::VK_QNX_external_memory_screen_buffer[] ifdef::VK_EXT_external_memory_metal[] - * If the parameters define an import operation and the external handle is + * [[VUID-VkMemoryAllocateInfo-pNext-10395]] + If the parameters define an import operation and the external handle is a ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT, then - pname:pNext must: include a slink:VkMemoryDedicatedAllocateInfo with + pname:pNext must: include a slink:VkMemoryDedicatedAllocateInfo with pname:image that is not dlink:VK_NULL_HANDLE - * If the parameters define an import operation, the external handle is a + * [[VUID-VkMemoryAllocateInfo-pNext-10396]] + If the parameters define an import operation, the external handle is a Metal MTLTexture, and the pname:pNext chain includes a slink:VkMemoryDedicatedAllocateInfo structure with pname:image that is - not dlink:VK_NULL_HANDLE, the width, height, array layer dimensions, - and mipmap levels of pname:image and the Metal MTLTexture's must: be + not dlink:VK_NULL_HANDLE, the width, height, array layer dimensions, and + mipmap levels of pname:image and the Metal MTLTexture's must: be identical - * If the parameters define an import operation, the external handle is a + * [[VUID-VkMemoryAllocateInfo-pNext-10397]] + If the parameters define an import operation, the external handle is a Metal MTLTexture, and the pname:pNext chain includes a slink:VkMemoryDedicatedAllocateInfo structure with pname:image that is not dlink:VK_NULL_HANDLE, pname:allocationSize must: be `0` diff --git a/chapters/pipelines.adoc b/chapters/pipelines.adoc index 651b2c3bd..5e8b20a16 100644 --- a/chapters/pipelines.adoc +++ b/chapters/pipelines.adoc @@ -7755,6 +7755,25 @@ in the runtime error ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA. endif::VKSC_VERSION_1_0[] ==== +// This text fragment is used multiple times the Pipelines and Debugging chapters. +// Authors must define binary_blob_size prior to inclusion. +ifdef::hidden[] +// tag::binary_blob_header[] +Unlike most structures declared by the Vulkan API, all fields of this +structure are written with the least significant byte first, regardless of +host byte-order. + +The C language specification does not define the packing of structure +members. +This layout assumes tight structure member packing, with members laid out in +the order listed in the structure, and the intended size of the structure is +{binary_blob_size} bytes. +If a compiler produces code that diverges from that pattern, applications +must: employ another method to set values at the correct offsets. +// end::binary_blob_header[] +endif::hidden[] + + [open,refpage='VkPipelineCacheHeaderVersionOne',desc='Structure describing the layout of the pipeline cache header',type='structs'] -- Version one of the pipeline cache header is defined as: @@ -7766,6 +7785,7 @@ include::{generated}/api/structs/VkPipelineCacheHeaderVersionOne.adoc[] specifying the version of the header. A consumer of the pipeline cache should: use the cache version to interpret the remainder of the cache header. + pname:headerVersion must: be written as exactly 4 bytes. * pname:vendorID is the sname:VkPhysicalDeviceProperties::pname:vendorID of the implementation. * pname:deviceID is the sname:VkPhysicalDeviceProperties::pname:deviceID @@ -7774,17 +7794,13 @@ include::{generated}/api/structs/VkPipelineCacheHeaderVersionOne.adoc[] sname:VkPhysicalDeviceProperties::pname:pipelineCacheUUID of the implementation. -Unlike most structures declared by the Vulkan API, all fields of this -structure are written with the least significant byte first, regardless of -host byte-order. - -The C language specification does not define the packing of structure -members. -This layout assumes tight structure member packing, with members laid out in -the order listed in the structure, and the intended size of the structure is -32 bytes. -If a compiler produces code that diverges from that pattern, applications -must: employ another method to set values at the correct offsets. +ifndef::VKSC_VERSION_1_0[] +:binary_blob_size: 32 +endif::VKSC_VERSION_1_0[] +ifdef::VKSC_VERSION_1_0[] +:binary_blob_size: 56 +endif::VKSC_VERSION_1_0[] +include::{chapters}/pipelines.adoc[tag=binary_blob_header] .Valid Usage **** @@ -7846,6 +7862,7 @@ include::{generated}/api/structs/VkPipelineCacheHeaderVersionSafetyCriticalOne.a * pname:validationVersion is a elink:VkPipelineCacheValidationVersion enum value specifying the version of any validation information that is included in this pipeline cache. + pname:validationVersion must: be written as exactly 4 bytes. * pname:implementationData is 4 bytes of padding to ensure structure members are consistently aligned on all platforms. The contents of this field may: be used for implementation-specific @@ -7874,17 +7891,8 @@ applications and offline compilers must ensure that there are no pipelines with identical pipeline identifiers in the same pipeline cache. ==== -Unlike most structures declared by the Vulkan API, all fields of this -structure are written with the least significant byte first, regardless of -host byte-order. - -The C language specification does not define the packing of structure -members. -This layout assumes tight structure member packing, with members laid out in -the order listed in the structure, and the intended size of the structure is -56 bytes. -If a compiler produces code that diverges from that pattern, applications -must: employ another method to set values at the correct offsets. +:binary_blob_size: 56 +include::{chapters}/pipelines.adoc[tag=binary_blob_header] .Valid Usage **** @@ -7976,17 +7984,8 @@ The slink:VkPipelineCacheStageValidationIndexEntry structures may: not be tightly packed, enabling additional implementation-specific data to be stored with each entry, or for future extensibility. -Unlike most structures declared by the Vulkan API, all fields of this -structure are written with the least significant byte first, regardless of -host byte-order. - -The C language specification does not define the packing of structure -members. -This layout assumes tight structure member packing, with members laid out in -the order listed in the structure, and the intended size of the structure is -56 bytes. -If a compiler produces code that diverges from that pattern, applications -must: employ another method to set values at the correct offsets. +:binary_blob_size: 56 +include::{chapters}/pipelines.adoc[tag=binary_blob_header] .Valid Usage **** @@ -8031,17 +8030,8 @@ module as described in <> that was used by the <> for this shader stage when creating this pipeline cache entry. -Unlike most structures declared by the Vulkan API, all fields of this -structure are written with the least significant byte first, regardless of -host byte-order. - -The C language specification does not define the packing of structure -members. -This layout assumes tight structure member packing, with members laid out in -the order listed in the structure, and the intended size of the structure is -16 bytes. -If a compiler produces code that diverges from that pattern, applications -must: employ another method to set values at the correct offsets. +:binary_blob_size: 16 +include::{chapters}/pipelines.adoc[tag=binary_blob_header] .Valid Usage **** diff --git a/chapters/resources.adoc b/chapters/resources.adoc index 9f220a6b6..7ec052589 100644 --- a/chapters/resources.adoc +++ b/chapters/resources.adoc @@ -2373,20 +2373,21 @@ endif::VK_KHR_portability_subset[] ifdef::VK_VERSION_1_2,VK_KHR_image_format_list[] * [[VUID-VkImageCreateInfo-pNext-06722]] If a slink:VkImageFormatListCreateInfo structure was included in the - pname:pNext chain and pname:format is not a - <> format and + pname:pNext chain and pname:format is not a <> and slink:VkImageFormatListCreateInfo::pname:viewFormatCount is not zero, then each format in slink:VkImageFormatListCreateInfo::pname:pViewFormats must: either be compatible with the pname:format as described in the <> or, if pname:flags contains ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, be an - uncompressed format that is size-compatible with pname:format + uncompressed format that is <> with pname:format * [[VUID-VkImageCreateInfo-pNext-10062]] If a slink:VkImageFormatListCreateInfo structure was included in the - pname:pNext chain and pname:format is a - <> format and - pname:flags contains ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and + pname:pNext chain and pname:format is a <> and pname:flags contains + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and slink:VkImageFormatListCreateInfo::pname:viewFormatCount is not zero, then each format in slink:VkImageFormatListCreateInfo::pname:pViewFormats must: be @@ -2553,17 +2554,15 @@ ifdef::VK_EXT_image_compression_control[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageCreateInfo-pNext-06743]] If the pname:pNext chain includes a slink:VkImageCompressionControlEXT - structure, pname:format is a - <> format, and - slink:VkImageCompressionControlEXT::pname:flags includes + structure, pname:format is a <>, and slink:VkImageCompressionControlEXT::pname:flags includes ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then slink:VkImageCompressionControlEXT::pname:compressionControlPlaneCount must: be equal to the number of planes in pname:format * [[VUID-VkImageCreateInfo-pNext-06744]] If the pname:pNext chain includes a slink:VkImageCompressionControlEXT - structure, pname:format is not a - <> format, and - slink:VkImageCompressionControlEXT::pname:flags includes + structure, pname:format is not a <>, and slink:VkImageCompressionControlEXT::pname:flags includes ename:VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT, then slink:VkImageCompressionControlEXT::pname:compressionControlPlaneCount must: be 1 @@ -2609,13 +2608,15 @@ ifdef::VK_EXT_metal_objects[] ename:VK_IMAGE_ASPECT_PLANE_2_BIT * [[VUID-VkImageCreateInfo-pNext-06785]] If the pname:pNext chain includes a slink:VkImportMetalTextureInfoEXT - structure and the image does not have a multi-planar format, then + structure and the image does not have a <>, then slink:VkImportMetalTextureInfoEXT::pname:plane must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT * [[VUID-VkImageCreateInfo-pNext-06786]] If the pname:pNext chain includes a slink:VkImportMetalTextureInfoEXT - structure and the image has a multi-planar format with only two planes, - then slink:VkImportMetalTextureInfoEXT::pname:plane must: not be + structure and the image has a <> with only two planes, then + slink:VkImportMetalTextureInfoEXT::pname:plane must: not be ename:VK_IMAGE_ASPECT_PLANE_2_BIT endif::VK_EXT_metal_objects[] ifdef::VK_VERSION_1_4,VK_EXT_host_image_copy[] @@ -3127,8 +3128,9 @@ include::{generated}/validity/structs/VkImageCompressionControlEXT.adoc[] ==== Some combinations of compression properties may not be supported. For example, some implementations may not support different fixed-rate -compression rates per plane of a multi-planar format and will not be able to -enable fixed-rate compression for any plane if the requested rates differ. +compression rates per plane of a <> and will not be able to enable fixed-rate compression for any plane +if the requested rates differ. ==== -- @@ -3551,7 +3553,7 @@ endif::VKSC_VERSION_1_0[] be used to create a sname:VkImageView with a different format from the image. ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] - For <> formats, + For <>, ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that a sname:VkImageView can be created of a _plane_ of the image. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] @@ -3596,10 +3598,10 @@ ifdef::VK_VERSION_1_1,VK_KHR_maintenance2[] endif::VK_VERSION_1_1,VK_KHR_maintenance2[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * ename:VK_IMAGE_CREATE_DISJOINT_BIT specifies that an image with a - <> must: - have each plane separately bound to memory, rather than having a single - memory binding for the whole image; the presence of this bit - distinguishes a _disjoint image_ from an image without this bit set. + <> must: have each plane + separately bound to memory, rather than having a single memory binding + for the whole image; the presence of this bit distinguishes a _disjoint + image_ from an image without this bit set. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_VERSION_1_1,VK_KHR_bind_memory2[] * ename:VK_IMAGE_CREATE_ALIAS_BIT specifies that two images created with @@ -3813,8 +3815,8 @@ If the image's ifdef::VK_EXT_image_drm_format_modifier[] tiling is ename:VK_IMAGE_TILING_LINEAR and its endif::VK_EXT_image_drm_format_modifier[] -format is a <>, then fname:vkGetImageSubresourceLayout describes one +format is a <>, then +fname:vkGetImageSubresourceLayout describes one ifdef::VK_EXT_image_drm_format_modifier[_format plane_] ifndef::VK_EXT_image_drm_format_modifier[plane] of the image. @@ -3974,8 +3976,7 @@ same pname:offset and pname:size are returned and represent the interleaved memory allocation. ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -If the image has a <> +If the image has a <> ifdef::VK_EXT_image_drm_format_modifier[] and its tiling is ename:VK_IMAGE_TILING_LINEAR endif::VK_EXT_image_drm_format_modifier[] @@ -5034,8 +5035,8 @@ endif::VK_EXT_image_sliced_view_of_3d[] If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -and if the pname:format of the image is not -<>, +and if the pname:format of the image is not <> endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] pname:format can: be different from the image's format, but if ifdef::VK_VERSION_1_1,VK_KHR_maintenance2[] @@ -5051,12 +5052,12 @@ the interpretation of the bit pattern changing. ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] [[image-views-plane-promotion]] -If pname:image was created with a -<> format, and the -image view's pname:aspectMask is one of ename:VK_IMAGE_ASPECT_PLANE_0_BIT, -ename:VK_IMAGE_ASPECT_PLANE_1_BIT or ename:VK_IMAGE_ASPECT_PLANE_2_BIT, the -view's aspect mask is considered to be equivalent to -ename:VK_IMAGE_ASPECT_COLOR_BIT when used as a framebuffer attachment. +If pname:image was created with a <>, and the image view's pname:aspectMask is one of +ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT or +ename:VK_IMAGE_ASPECT_PLANE_2_BIT, the view's aspect mask is considered to +be equivalent to ename:VK_IMAGE_ASPECT_COLOR_BIT when used as a framebuffer +attachment. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] [NOTE] @@ -5109,8 +5110,7 @@ flink:vkCreateImageView, an identically defined slink:VkSamplerYcbcrConversion object must: be used when sampling the image. [[image-views-requiring-sampler-ycbcr-conversion]] -If the image has a -<> pname:format, +If the image has a <>, pname:subresourceRange.aspectMask is ename:VK_IMAGE_ASPECT_COLOR_BIT, and pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, then the pname:format must: be identical to the image pname:format and the sampler to be used with @@ -5123,14 +5123,13 @@ When such an image is used in a <> operation, the endif::VK_KHR_video_queue[] If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT -and the image has a -<> pname:format, -and if pname:subresourceRange.aspectMask is -ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or -ename:VK_IMAGE_ASPECT_PLANE_2_BIT, pname:format must: be -<> with the corresponding plane of the -image, and the sampler to be used with the image view must: not enable -<>. +and the image has a <>, and if +pname:subresourceRange.aspectMask is ename:VK_IMAGE_ASPECT_PLANE_0_BIT, +ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or ename:VK_IMAGE_ASPECT_PLANE_2_BIT, +pname:format must: be <> with the +corresponding plane of the image, and the sampler to be used with the image +view must: not enable <>. The pname:width and pname:height of the single-plane image view must: be derived from the multi-planar image's dimensions in the manner listed for <> for the plane. @@ -5435,10 +5434,9 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageViewCreateInfo-image-01760]] If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the pname:format - of the pname:image is not a - <> format, - pname:format must: be compatible with the pname:format used to create - pname:image, as defined in <>, pname:format must: be compatible with the pname:format used to + create pname:image, as defined in <> endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] endif::VK_VERSION_1_1,VK_KHR_maintenance2[] @@ -5454,7 +5452,7 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] // endif::VK_VERSION_1_1,VK_KHR_maintenance2[] // ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] and if the pname:format of the pname:image is not a - <> format, + <>, // endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] pname:format must: be compatible with the pname:format used to create pname:image, as defined in <> with, the pname:format + used to create pname:image * [[VUID-VkImageViewCreateInfo-image-07072]] If pname:image was created with the ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT flag and @@ -5496,17 +5495,16 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageViewCreateInfo-image-01586]] If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, if the pname:format of - the pname:image is a - <> format, and + the pname:image is a <>, and if pname:subresourceRange.aspectMask is one of the - <> bits, then + <> bits, then pname:format must: be compatible with the elink:VkFormat for the plane of the pname:image pname:format indicated by pname:subresourceRange.aspectMask, as defined in <> * [[VUID-VkImageViewCreateInfo-subresourceRange-07818]] pname:subresourceRange.aspectMask must: only have at most 1 valid - <> bit + <> bit endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] // The VU below comes in an alternate version when the extension is @@ -5524,9 +5522,9 @@ ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] If pname:image was not created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, // ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] - or if the pname:format of the pname:image is a - <> format and - if pname:subresourceRange.aspectMask is ename:VK_IMAGE_ASPECT_COLOR_BIT, + or if the pname:format of the pname:image is a <> and if pname:subresourceRange.aspectMask is + ename:VK_IMAGE_ASPECT_COLOR_BIT, // endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] pname:format must: be identical to the pname:format used to create pname:image @@ -6102,8 +6100,8 @@ ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] respectively. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -respectively, except if pname:format is a -<>. +respectively, except if pname:format is a <>. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] If using a depth/stencil format with both depth and stencil components, pname:aspectMask must: include at least one of @@ -6141,10 +6139,10 @@ pname:subresourceRange used by the sname:VkImageView must: be ename:VK_IMAGE_ASPECT_COLOR_BIT. When creating a sname:VkImageView, if sampler {YCbCr} conversion is not -enabled in the sampler and the image pname:format is -<>, the image must: -have been created with ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the -pname:aspectMask of the sname:VkImageView's pname:subresourceRange must: be +enabled in the sampler and the image pname:format is <>, the image must: have been created with +ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, and the pname:aspectMask of the +sname:VkImageView's pname:subresourceRange must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT or ename:VK_IMAGE_ASPECT_PLANE_2_BIT. endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] @@ -8590,9 +8588,9 @@ with slink:VkBuffer before it has been bound to memory. endif::VK_ANDROID_external_memory_android_hardware_buffer[] ifdef::VK_KHR_external_memory_win32,VK_EXT_external_memory_metal[] -The value of pname:size has no meaning and should: be ignored -if the resource being queried was created with any of the following -external memory handle types: +The value of pname:size has no meaning and should: be ignored if the +resource being queried was created with any of the following external memory +handle types: ifdef::VK_KHR_external_memory_win32[] * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT @@ -9077,7 +9075,7 @@ endif::VK_QNX_external_memory_screen_buffer[] If pname:pCreateInfo->flags has ename:VK_IMAGE_CREATE_DISJOINT_BIT set and if the pname:pCreateInfo->tiling is ename:VK_IMAGE_TILING_LINEAR or ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single - valid <> bit + valid <> bit ifdef::VK_EXT_image_drm_format_modifier[] * [[VUID-VkDeviceImageMemoryRequirements-pCreateInfo-06420]] If pname:pCreateInfo->tiling is @@ -9122,7 +9120,7 @@ endif::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02281]] If the image's pname:tiling is ename:VK_IMAGE_TILING_LINEAR or ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single - valid <> bit + valid <> bit ifdef::VK_EXT_image_drm_format_modifier[] * [[VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02282]] If the image's pname:tiling is @@ -9989,7 +9987,7 @@ endif::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkBindImagePlaneMemoryInfo-planeAspect-02283]] If the image's pname:tiling is ename:VK_IMAGE_TILING_LINEAR or ename:VK_IMAGE_TILING_OPTIMAL, then pname:planeAspect must: be a single - valid <> bit + valid <> bit ifdef::VK_EXT_image_drm_format_modifier[] * [[VUID-VkBindImagePlaneMemoryInfo-planeAspect-02284]] If the image's pname:tiling is diff --git a/chapters/sparsemem.adoc b/chapters/sparsemem.adoc index c8a75b174..f665bb56c 100644 --- a/chapters/sparsemem.adoc +++ b/chapters/sparsemem.adoc @@ -215,7 +215,9 @@ identically to sname:VkBuffer objects using only the ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT feature. The only difference is the ability for some regions of the buffer to be unbound during device use. - +After creating a sname:VkBuffer with +ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, the entire buffer region is +considered unbound. [[sparsememory-partially-resident-images]] == Sparse Partially-Resident Images @@ -229,6 +231,9 @@ or sparse image block granularity. Each image subresource (outside of the <>) starts on a sparse block boundary and has dimensions that are integer multiples of the corresponding dimensions of the sparse image block. +After creating a sname:VkImage with +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, all image subresources are +considered unbound. [NOTE] ==== diff --git a/chapters/synchronization.adoc b/chapters/synchronization.adoc index 005ef4ee2..2989ff996 100644 --- a/chapters/synchronization.adoc +++ b/chapters/synchronization.adoc @@ -7178,9 +7178,9 @@ is currently in. ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -If pname:image has a multi-planar format and the image is _disjoint_, then -including ename:VK_IMAGE_ASPECT_COLOR_BIT in the pname:aspectMask member of -pname:subresourceRange is equivalent to including +If pname:image has a <> and the +image is _disjoint_, then including ename:VK_IMAGE_ASPECT_COLOR_BIT in the +pname:aspectMask member of pname:subresourceRange is equivalent to including ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, and (for three-plane formats only) ename:VK_IMAGE_ASPECT_PLANE_2_BIT. @@ -7305,9 +7305,9 @@ endif::VK_VERSION_1_3,VK_KHR_synchronization2[] ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] -If pname:image has a multi-planar format and the image is _disjoint_, then -including ename:VK_IMAGE_ASPECT_COLOR_BIT in the pname:aspectMask member of -pname:subresourceRange is equivalent to including +If pname:image has a <> and the +image is _disjoint_, then including ename:VK_IMAGE_ASPECT_COLOR_BIT in the +pname:aspectMask member of pname:subresourceRange is equivalent to including ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, and (for three-plane formats only) ename:VK_IMAGE_ASPECT_PLANE_2_BIT. diff --git a/chapters/video/av1_decode.adoc b/chapters/video/av1_decode.adoc index a1c6d61ff..94f91e4e6 100644 --- a/chapters/video/av1_decode.adoc +++ b/chapters/video/av1_decode.adoc @@ -272,6 +272,41 @@ it. include::{generated}/validity/structs/VkVideoDecodeAV1SessionParametersCreateInfoKHR.adoc[] -- +ifdef::VK_KHR_video_maintenance2[] +[[decode-av1-inline-parameter-sets]] +==== Inline Parameter Sets + +In case of <> created with the video codec +operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR and with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the +application can: also specify the active <> _inline_ by including an instance of the +slink:VkVideoDecodeAV1InlineSessionParametersInfoKHR structure in the +pname:pNext chain of slink:VkVideoDecodeInfoKHR. + +[open,refpage='VkVideoDecodeAV1InlineSessionParametersInfoKHR',desc='Structure specifies inline AV1 decoder parameter set information',type='structs'] +-- +The sname:VkVideoDecodeAV1InlineSessionParametersInfoKHR structure is +defined as: + +include::{generated}/api/structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.adoc[] + + * pname:sType is a elink:VkStructureType value identifying this structure. + * pname:pNext is `NULL` or a pointer to a structure extending this + structure. + * pname:pStdSequenceHeader is `NULL` or a pointer to an instance of the + code:StdVideoAV1SequenceHeader structure describing the + <>. + +If pname:pStdSequenceHeader is not `NULL`, the issued video decode +operations will use the specified sequence header parameters instead of the +active sequence header being sourced from the bound video session parameters +object. + +include::{generated}/validity/structs/VkVideoDecodeAV1InlineSessionParametersInfoKHR.adoc[] +-- +endif::VK_KHR_video_maintenance2[] + === AV1 Decoding Parameters @@ -465,7 +500,14 @@ States>> section. Active Parameter Sets:: The _active sequence header_ is the <> stored in the bound video session parameters object. +sequence header>> stored in the bound video session parameters object +ifdef::VK_KHR_video_maintenance2[] +, unless the bound video session was created with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the +active sequence header is specified +<>. +endif::VK_KHR_video_maintenance2[] +. include::{generated}/validity/structs/VkVideoDecodeAV1PictureInfoKHR.adoc[] -- diff --git a/chapters/video/av1_encode.adoc b/chapters/video/av1_encode.adoc index 125214cd9..d66e7fb4e 100644 --- a/chapters/video/av1_encode.adoc +++ b/chapters/video/av1_encode.adoc @@ -1912,7 +1912,14 @@ slink:VkQueueFamilyVideoPropertiesKHR::pname:videoCodecOperations. | pname:maxActiveReferencePictures | 0 | min | **slink:VkVideoEncodeCapabilitiesKHR** | | | pname:flags | - | min -| pname:rateControlModes | - | min +| pname:rateControlModes +ifndef::VK_KHR_video_maintenance2[] +| - +endif::VK_KHR_video_maintenance2[] +ifdef::VK_KHR_video_maintenance2[] +| ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR ^8^ +endif::VK_KHR_video_maintenance2[] +| min | pname:maxBitrate | 5529600 | min | pname:maxQualityLevels | 1 | min | pname:encodeInputPictureGranularity | (64,64) | max @@ -1993,3 +2000,9 @@ endif::VK_KHR_video_encode_quantization_map[] If slink:VkVideoCapabilitiesKHR::pname:flags includes ename:VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then pname:maxQIndexDelta must: be greater than pname:minQIndexDelta. + +ifdef::VK_KHR_video_maintenance2[] +8:: + If the <> feature is + supported. +endif::VK_KHR_video_maintenance2[] diff --git a/chapters/video/decode.adoc b/chapters/video/decode.adoc index 168979b7f..e0fc3b183 100644 --- a/chapters/video/decode.adoc +++ b/chapters/video/decode.adoc @@ -682,6 +682,23 @@ ifdef::VK_KHR_video_decode_h264[] slink:VkVideoDecodeH264PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo must: be less than pname:pDecodeInfo->srcBufferRange +ifdef::VK_KHR_video_maintenance2[] + * [[VUID-vkCmdDecodeVideoKHR-None-10400]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then there must: be + a bound video session parameters object if any of the following + conditions are not met: + ** the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR + ** the pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure + ** the pname:pStdSPS member of the + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure + included in the pname:pNext chain of pname:pDecodeInfo is not `NULL` + ** the pname:pStdPPS member of the + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure + included in the pname:pNext chain of pname:pDecodeInfo is not `NULL` +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-StdVideoH264SequenceParameterSet-07154]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video @@ -692,6 +709,25 @@ ifdef::VK_KHR_video_decode_h264[] provided in the pname:pStdPictureInfo member of the slink:VkVideoDecodeH264PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + , unless the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its + pname:pStdSPS member is not equal to `NULL` + * [[VUID-vkCmdDecodeVideoKHR-pNext-10401]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a + non-`NULL` pname:pStdSPS member, then + pname:pStdSPS->seq_parameter_set_id must: equal + code:StdVideoDecodeH264PictureInfo::pname:seq_parameter_set_id provided + in the pname:pStdPictureInfo member of the + slink:VkVideoDecodeH264PictureInfoKHR structure included in the + pname:pNext chain of pname:pDecodeInfo +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-StdVideoH264PictureParameterSet-07155]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then the bound video @@ -703,6 +739,27 @@ ifdef::VK_KHR_video_decode_h264[] respectively, that are provided in the pname:pStdPictureInfo member of the slink:VkVideoDecodeH264PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + , unless the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure, and its + pname:pStdPPS member is not equal to `NULL` + * [[VUID-vkCmdDecodeVideoKHR-pNext-10402]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure with a + non-`NULL` pname:pStdPPS member, then + pname:pStdPPS->seq_parameter_set_id and + pname:pStdPPS->pic_parameter_set_id must: equal + code:StdVideoDecodeH264PictureInfo::pname:seq_parameter_set_id and + code:StdVideoDecodeH264PictureInfo::pname:pic_parameter_set_id, + respectively, provided in the pname:pStdPictureInfo member of the + slink:VkVideoDecodeH264PictureInfoKHR structure included in the + pname:pNext chain of pname:pDecodeInfo +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07156]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and @@ -797,6 +854,26 @@ ifdef::VK_KHR_video_decode_h265[] slink:VkVideoDecodeH265PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo must: be less than pname:pDecodeInfo->srcBufferRange +ifdef::VK_KHR_video_maintenance2[] + * [[VUID-vkCmdDecodeVideoKHR-None-10403]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then there must: be + a bound video session parameters object if any of the following + conditions are not met: + ** the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR + ** the pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure + ** the pname:pStdVPS member of the + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure + included in the pname:pNext chain of pname:pDecodeInfo is not `NULL` + ** the pname:pStdSPS member of the + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure + included in the pname:pNext chain of pname:pDecodeInfo is not `NULL` + ** the pname:pStdPPS member of the + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure + included in the pname:pNext chain of pname:pDecodeInfo is not `NULL` +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265VideoParameterSet-07160]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video @@ -807,6 +884,25 @@ ifdef::VK_KHR_video_decode_h265[] that is provided in the pname:pStdPictureInfo member of the slink:VkVideoDecodeH265PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + , unless the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its + pname:pStdVPS member is not equal to `NULL` + * [[VUID-vkCmdDecodeVideoKHR-pNext-10404]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a + non-`NULL` pname:pStdVPS member, then + pname:pStdVPS->vps_video_parameter_set_id must: equal + code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id + provided in the pname:pStdPictureInfo member of the + slink:VkVideoDecodeH265PictureInfoKHR structure included in the + pname:pNext chain of pname:pDecodeInfo +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265SequenceParameterSet-07161]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video @@ -819,6 +915,27 @@ ifdef::VK_KHR_video_decode_h265[] respectively, that are provided in the pname:pStdPictureInfo member of the slink:VkVideoDecodeH265PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + , unless the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its + pname:pStdSPS member is not equal to `NULL` + * [[VUID-vkCmdDecodeVideoKHR-pNext-10405]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a + non-`NULL` pname:pStdSPS member, then + pname:pStdSPS->sps_video_parameter_set_id and + pname:pStdSPS->sps_seq_parameter_set_id must: equal + code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id and + code:StdVideoDecodeH265PictureInfo::pname:pps_seq_parameter_set_id, + respectively, provided in the pname:pStdPictureInfo member of the + slink:VkVideoDecodeH265PictureInfoKHR structure included in the + pname:pNext chain of pname:pDecodeInfo +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-StdVideoH265PictureParameterSet-07162]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then the bound video @@ -832,6 +949,29 @@ ifdef::VK_KHR_video_decode_h265[] respectively, that are provided in the pname:pStdPictureInfo member of the slink:VkVideoDecodeH265PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + , unless the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure, and its + pname:pStdPPS member is not equal to `NULL` + * [[VUID-vkCmdDecodeVideoKHR-pNext-10406]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, and the + pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure with a + non-`NULL` pname:pStdPPS member, then + pname:pStdPPS->sps_video_parameter_set_id, + pname:pStdPPS->pps_seq_parameter_set_id, and + pname:pStdPPS->pps_pic_parameter_set_id must: equal + code:StdVideoDecodeH265PictureInfo::pname:sps_video_parameter_set_id, + code:StdVideoDecodeH265PictureInfo::pname:pps_seq_parameter_set_id, and + code:StdVideoDecodeH265PictureInfo::pname:pps_pic_parameter_set_id, + respectively, provided in the pname:pStdPictureInfo member of the + slink:VkVideoDecodeH265PictureInfoKHR structure included in the + pname:pNext chain of pname:pDecodeInfo +endif::VK_KHR_video_maintenance2[] * [[VUID-vkCmdDecodeVideoKHR-pDecodeInfo-07163]] If the bound video session was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and @@ -914,6 +1054,20 @@ ifdef::VK_KHR_video_decode_av1[] the code:referenceNameSlotIndices array member of the slink:VkVideoDecodeAV1PictureInfoKHR structure included in the pname:pNext chain of pname:pDecodeInfo +ifdef::VK_KHR_video_maintenance2[] + * [[VUID-vkCmdDecodeVideoKHR-None-10407]] + If the bound video session was created with the video codec operation + ename:VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then there must: be a + bound video session parameters object if any of the following conditions + are not met: + ** the bound video session was created with + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR + ** the pname:pNext chain of pname:pDecodeInfo includes a + slink:VkVideoDecodeAV1InlineSessionParametersInfoKHR structure + ** the pname:pStdSequenceHeader member of the + slink:VkVideoDecodeAV1InlineSessionParametersInfoKHR structure included + in the pname:pNext chain of pname:pDecodeInfo is not `NULL` +endif::VK_KHR_video_maintenance2[] endif::VK_KHR_video_decode_av1[] **** diff --git a/chapters/video/encode.adoc b/chapters/video/encode.adoc index 4b0866d59..6d78a9605 100644 --- a/chapters/video/encode.adoc +++ b/chapters/video/encode.adoc @@ -980,10 +980,10 @@ endif::VK_KHR_video_encode_av1[] The bound video session must: not be in <> state at the time the command is executed on the device * [[VUID-vkCmdEncodeVideoKHR-None-08318]] - The bound video session parameters object must: have been created with - the currently set <> - for the bound video session at the time the command is executed on the - device + If there is a bound video session parameters object, then it must: have + been created with the currently set <> for the bound video session at the time the command is + executed on the device * [[VUID-vkCmdEncodeVideoKHR-opCount-07174]] For each <> query, the <> diff --git a/chapters/video/h264_decode.adoc b/chapters/video/h264_decode.adoc index 676f29076..65e78b749 100644 --- a/chapters/video/h264_decode.adoc +++ b/chapters/video/h264_decode.adoc @@ -359,6 +359,44 @@ This structure can: be specified in the following places: include::{generated}/validity/structs/VkVideoDecodeH264SessionParametersAddInfoKHR.adoc[] -- +ifdef::VK_KHR_video_maintenance2[] +[[decode-h264-inline-parameter-sets]] +==== Inline Parameter Sets + +In case of <> created with the video codec +operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR and with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the +application can: also specify the active parameter sets _inline_ by +including an instance of the +slink:VkVideoDecodeH264InlineSessionParametersInfoKHR structure in the +pname:pNext chain of slink:VkVideoDecodeInfoKHR. + +[open,refpage='VkVideoDecodeH264InlineSessionParametersInfoKHR',desc='Structure specifies inline H.264 decoder parameter set information',type='structs'] +-- +The sname:VkVideoDecodeH264InlineSessionParametersInfoKHR structure is +defined as: + +include::{generated}/api/structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.adoc[] + + * pname:sType is a elink:VkStructureType value identifying this structure. + * pname:pNext is `NULL` or a pointer to a structure extending this + structure. + * pname:pStdSPS is `NULL` or a pointer to an instance of the + code:StdVideoH264SequenceParameterSet structure describing the + <>. + * pname:pStdPPS is `NULL` or a pointer to an instance of the + code:StdVideoH264PictureParameterSet structure describing the + <>. + +If pname:pStdSPS or pname:pStdPPS is not `NULL`, the issued video decode +operations will use the parameter sets specified by them, respectively, +instead of the corresponding parameter sets being sourced from the bound +video session parameters object. + +include::{generated}/validity/structs/VkVideoDecodeH264InlineSessionParametersInfoKHR.adoc[] +-- +endif::VK_KHR_video_maintenance2[] + === H.264 Decoding Parameters @@ -444,6 +482,10 @@ Active Parameter Sets:: The members of the code:StdVideoDecodeH264PictureInfo structure pointed to by pname:pStdPictureInfo are used to select the active parameter sets to use +ifdef::VK_KHR_video_maintenance2[] +from the specified <> or +endif::VK_KHR_video_maintenance2[] from the bound video session parameters object, as follows: * [[decode-h264-active-sps]] The _active SPS_ is the @@ -455,6 +497,16 @@ from the bound video session parameters object, as follows: code:StdVideoDecodeH264PictureInfo::code:seq_parameter_set_id and code:StdVideoDecodeH264PictureInfo::code:pic_parameter_set_id. +ifdef::VK_KHR_video_maintenance2[] +If the bound video session was created with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and any of +the active parameter sets are specified +<>, then the corresponding inline +parameter set is used. +Otherwise, the parameter set in question is sourced from the bound video +session parameters object. +endif::VK_KHR_video_maintenance2[] + include::{generated}/validity/structs/VkVideoDecodeH264PictureInfoKHR.adoc[] -- diff --git a/chapters/video/h264_encode.adoc b/chapters/video/h264_encode.adoc index 579cbea32..10095b31b 100644 --- a/chapters/video/h264_encode.adoc +++ b/chapters/video/h264_encode.adoc @@ -83,6 +83,42 @@ encode parameters: * code:StdVideoEncodeH264PictureInfo::code:primary_pic_type * code:StdVideoEncodeH264SliceHeader::code:slice_type +ifdef::VK_KHR_video_maintenance2[] +If the <> feature is +enabled, implementations must: not override any of the following H.264 +encode parameters: + + * the following parameters specified in + code:StdVideoH264SequenceParameterSet: + ** code:flags.vui_parameters_present_flag + ** code:profile_idc + ** code:level_idc + ** code:chroma_format_idc + * the following parameters specified in the + code:StdVideoH264SequenceParameterSetVui structure pointed to by + code:StdVideoH264SequenceParameterSet::code:pSequenceParameterSetVui: + ** code:flags.aspect_ratio_info_present_flag + ** code:flags.overscan_info_present_flag + ** code:flags.overscan_appropriate_flag + ** code:flags.video_signal_type_present_flag + ** code:flags.video_full_range_flag + ** code:flags.color_description_present_flag + ** code:flags.chroma_loc_info_present_flag + ** code:flags.timing_info_present_flag + ** code:flags.fixed_frame_rate_flag + ** code:aspect_ratio_idc + ** code:sar_width + ** code:sar_height + ** code:video_format + ** code:colour_primaries + ** code:transfer_characteristics + ** code:matrix_coefficients + ** code:num_units_in_tick + ** code:time_scale + ** code:chroma_sample_loc_type_top_field + ** code:chroma_sample_loc_type_bottom_field +endif::VK_KHR_video_maintenance2[] + In case of H.264 encode parameters stored in <> objects, applications need to use the flink:vkGetEncodedVideoSessionParametersKHR @@ -1717,7 +1753,14 @@ slink:VkQueueFamilyVideoPropertiesKHR::pname:videoCodecOperations. | pname:maxActiveReferencePictures | 0 | min | **slink:VkVideoEncodeCapabilitiesKHR** | | | pname:flags | - | min -| pname:rateControlModes | - | min +| pname:rateControlModes +ifndef::VK_KHR_video_maintenance2[] +| - +endif::VK_KHR_video_maintenance2[] +ifdef::VK_KHR_video_maintenance2[] +| ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR ^4^ +endif::VK_KHR_video_maintenance2[] +| min | pname:maxBitrate | 64000 | min | pname:maxQualityLevels | 1 | min | pname:encodeInputPictureGranularity | (64,64) | max @@ -1765,3 +1808,9 @@ endif::VK_KHR_video_encode_quantization_map[] If slink:VkVideoCapabilitiesKHR::pname:flags includes ename:VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then pname:maxQpDelta must: be greater than pname:minQpDelta. + +ifdef::VK_KHR_video_maintenance2[] +4:: + If the <> feature is + supported. +endif::VK_KHR_video_maintenance2[] diff --git a/chapters/video/h265_decode.adoc b/chapters/video/h265_decode.adoc index 7fa5f900f..3fd7a3774 100644 --- a/chapters/video/h265_decode.adoc +++ b/chapters/video/h265_decode.adoc @@ -280,6 +280,47 @@ This structure can: be specified in the following places: include::{generated}/validity/structs/VkVideoDecodeH265SessionParametersAddInfoKHR.adoc[] -- +ifdef::VK_KHR_video_maintenance2[] +[[decode-h265-inline-parameter-sets]] +==== Inline Parameter Sets + +In case of <> created with the video codec +operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR and with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, the +application can: also specify the active parameter sets _inline_ by +including an instance of the +slink:VkVideoDecodeH265InlineSessionParametersInfoKHR structure in the +pname:pNext chain of slink:VkVideoDecodeInfoKHR. + +[open,refpage='VkVideoDecodeH265InlineSessionParametersInfoKHR',desc='Structure specifies inline H.265 decoder parameter set information',type='structs'] +-- +The sname:VkVideoDecodeH265InlineSessionParametersInfoKHR structure is +defined as: + +include::{generated}/api/structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.adoc[] + + * pname:sType is a elink:VkStructureType value identifying this structure. + * pname:pNext is `NULL` or a pointer to a structure extending this + structure. + * pname:pStdVPS is `NULL` or a pointer to an instance of the + code:StdVideoH265VideoParameterSet structure describing the + <>. + * pname:pStdSPS is `NULL` or a pointer to an instance of the + code:StdVideoH265SequenceParameterSet structure describing the + <>. + * pname:pStdPPS is `NULL` or a pointer to an instance of the + code:StdVideoH265PictureParameterSet structure describing the + <>. + +If pname:pStdVPS, pname:pStdSPS, or pname:pStdPPS is not `NULL`, the issued +video decode operations will use the parameter sets specified by them, +respectively, instead of the corresponding active parameter sets being +sourced from the bound video session parameters object. + +include::{generated}/validity/structs/VkVideoDecodeH265InlineSessionParametersInfoKHR.adoc[] +-- +endif::VK_KHR_video_maintenance2[] + === H.265 Decoding Parameters @@ -377,6 +418,10 @@ Active Parameter Sets:: The members of the code:StdVideoDecodeH265PictureInfo structure pointed to by pname:pStdPictureInfo are used to select the active parameter sets to use +ifdef::VK_KHR_video_maintenance2[] +from the specified <> or +endif::VK_KHR_video_maintenance2[] from the bound video session parameters object, as follows: * [[decode-h265-active-vps]] The _active VPS_ is the @@ -394,6 +439,16 @@ from the bound video session parameters object, as follows: code:StdVideoDecodeH265PictureInfo::code:pps_seq_parameter_set_id, and code:StdVideoDecodeH265PictureInfo::code:pps_pic_parameter_set_id. +ifdef::VK_KHR_video_maintenance2[] +If the bound video session was created with +ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR and any of +the active parameter sets are specified +<>, then the corresponding inline +parameter set is used. +Otherwise, the parameter set in question is sourced from the bound video +session parameters object. +endif::VK_KHR_video_maintenance2[] + include::{generated}/validity/structs/VkVideoDecodeH265PictureInfoKHR.adoc[] -- diff --git a/chapters/video/h265_encode.adoc b/chapters/video/h265_encode.adoc index afc95c469..ded604553 100644 --- a/chapters/video/h265_encode.adoc +++ b/chapters/video/h265_encode.adoc @@ -87,6 +87,58 @@ encode parameters: * code:StdVideoEncodeH265PictureInfo::code:pic_type * code:StdVideoEncodeH265SliceSegmentHeader::code:slice_type +ifdef::VK_KHR_video_maintenance2[] +If the <> feature is +enabled, implementations must: not override any of the following H.265 +encode parameters: + + * the following parameters specified in the + code:StdVideoH265ProfileTierLevel structure pointed to by + code:StdVideoH265VideoParameterSet::code:pProfileTierLevel and + code:StdVideoH265SequenceParameterSet::code:pProfileTierLevel: + ** code:flags.general_tier_flag + ** code:flags.general_progressive_source_flag, if set to `1` + ** code:flags.general_interlaced_source_flag, if set to `0` + ** code:flags.general_frame_only_constraint_flag + ** code:general_profile_idc + ** code:general_level_idc + * the following parameters specified in + code:StdVideoH265SequenceParameterSet: + ** code:chroma_format_idc + * the following parameters specified in the + code:StdVideoH265SequenceParameterSetVui structure pointed to by + code:StdVideoH265SequenceParameterSet::code:pSequenceParameterSetVui: + ** code:flags.aspect_ratio_info_present_flag + ** code:flags.overscan_info_present_flag + ** code:flags.overscan_appropriate_flag + ** code:flags.video_signal_type_present_flag + ** code:flags.video_full_range_flag + ** code:flags.colour_description_present_flag + ** code:flags.chroma_loc_info_present_flag + ** code:flags.neutral_chroma_indication_flag + ** code:flags.field_seq_flag + ** code:flags.frame_field_info_present_flag + ** code:flags.default_display_window_flag + ** code:flags.vui_timing_info_present_flag + ** code:flags.vui_poc_proportional_to_timing_flag + ** code:aspect_ratio_idc + ** code:sar_width + ** code:sar_height + ** code:video_format + ** code:colour_primaries + ** code:transfer_characteristics + ** code:matrix_coeffs + ** code:chroma_sample_loc_type_top_field + ** code:chroma_sample_loc_type_bottom_field + ** code:def_disp_win_left_offset + ** code:def_disp_win_right_offset + ** code:def_disp_win_top_offset + ** code:def_disp_win_bottom_offset + ** code:vui_num_units_in_tick + ** code:vui_time_scale + ** code:vui_num_ticks_poc_diff_one_minus1 +endif::VK_KHR_video_maintenance2[] + ifdef::VK_KHR_video_encode_quantization_map[] In case of a <> object created with @@ -1889,7 +1941,14 @@ slink:VkQueueFamilyVideoPropertiesKHR::pname:videoCodecOperations. | pname:maxActiveReferencePictures | 0 | min | **slink:VkVideoEncodeCapabilitiesKHR** | | | pname:flags | - | min -| pname:rateControlModes | - | min +| pname:rateControlModes +ifndef::VK_KHR_video_maintenance2[] +| - +endif::VK_KHR_video_maintenance2[] +ifdef::VK_KHR_video_maintenance2[] +| ename:VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR ^4^ +endif::VK_KHR_video_maintenance2[] +| min | pname:maxBitrate | 128000 | min | pname:maxQualityLevels | 1 | min | pname:encodeInputPictureGranularity | (64,64) | max @@ -1940,3 +1999,9 @@ endif::VK_KHR_video_encode_quantization_map[] If slink:VkVideoCapabilitiesKHR::pname:flags includes ename:VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR, then pname:maxQpDelta must: be greater than pname:minQpDelta. + +ifdef::VK_KHR_video_maintenance2[] +4:: + If the <> feature is + supported. +endif::VK_KHR_video_maintenance2[] diff --git a/chapters/videocoding.adoc b/chapters/videocoding.adoc index 32f931268..1fe214d60 100644 --- a/chapters/videocoding.adoc +++ b/chapters/videocoding.adoc @@ -1363,6 +1363,17 @@ ifdef::VK_KHR_video_maintenance1[] ename:VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR, then <> must: be enabled endif::VK_KHR_video_maintenance1[] +ifdef::VK_KHR_video_maintenance2+VK_KHR_video_decode_queue[] + * [[VUID-VkVideoSessionCreateInfoKHR-flags-10398]] + If pname:flags includes + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then + <> must: be enabled + * [[VUID-VkVideoSessionCreateInfoKHR-flags-10399]] + If pname:flags includes + ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, then + pname:pVideoProfile->videoCodecOperation must: specify a decode + operation +endif::VK_KHR_video_maintenance2+VK_KHR_video_decode_queue[] ifdef::VK_KHR_video_encode_quantization_map[] * [[VUID-VkVideoSessionCreateInfoKHR-flags-10264]] If pname:flags includes @@ -1569,6 +1580,12 @@ ifdef::VK_KHR_video_encode_quantization_map[] specifies that the video session can: be used to encode pictures with <>. endif::VK_KHR_video_encode_quantization_map[] +ifdef::VK_KHR_video_maintenance2+VK_KHR_video_decode_queue[] + * ename:VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR + specifies that the application can: specify video session parameters + inline with video decode operations instead of sourcing them from the + bound <> object. +endif::VK_KHR_video_maintenance2+VK_KHR_video_decode_queue[] -- [open,refpage='VkVideoSessionCreateFlagsKHR',desc='Bitmask of VkVideoSessionCreateFlagBitsKHR',type='flags'] @@ -3549,18 +3566,30 @@ ifdef::VK_KHR_video_decode_h264[] If pname:videoSession was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR, then pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE +ifdef::VK_KHR_video_maintenance2[] + , unless <> is + enabled +endif::VK_KHR_video_maintenance2[] endif::VK_KHR_video_decode_h264[] ifdef::VK_KHR_video_decode_h265[] * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07248]] If pname:videoSession was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR, then pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE +ifdef::VK_KHR_video_maintenance2[] + , unless <> is + enabled +endif::VK_KHR_video_maintenance2[] endif::VK_KHR_video_decode_h265[] ifdef::VK_KHR_video_decode_av1[] * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-09261]] If pname:videoSession was created with the video codec operation ename:VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR, then pname:videoSessionParameters must: not be dname:VK_NULL_HANDLE +ifdef::VK_KHR_video_maintenance2[] + , unless <> is + enabled +endif::VK_KHR_video_maintenance2[] endif::VK_KHR_video_decode_av1[] ifdef::VK_KHR_video_encode_h264[] * [[VUID-VkVideoBeginCodingInfoKHR-videoSession-07249]] diff --git a/proposals/VK_EXT_external_memory_metal.adoc b/proposals/VK_EXT_external_memory_metal.adoc index b2dcb6364..3d9f3578e 100644 --- a/proposals/VK_EXT_external_memory_metal.adoc +++ b/proposals/VK_EXT_external_memory_metal.adoc @@ -1,10 +1,11 @@ -// Copyright 2021-2024 The Khronos Group Inc. +// Copyright 2021-2025 The Khronos Group Inc. // // SPDX-License-Identifier: CC-BY-4.0 = VK_EXT_external_memory_metal :toc: left -:refpage: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/ +:docs: https://docs.vulkan.org/spec/latest/ +:extensions: {docs}appendices/extensions.html# :sectnums: This extension allows memory sharing through imports from or export to Metal resource handles. @@ -15,26 +16,30 @@ An application may wish to reference device memory in multiple Vulkan device ins This extension enables an application to export non-Vulkan handles from Vulkan memory objects such that the underlying resources can be referenced outside the scope of the Vulkan device instance that created them. -While link:{refpage}VK_EXT_metal_objects.html[VK_EXT_metal_objects] provides a way to expose underlying Metal resources, +@@link:{extensions}VK_KHR_external_memory[VK_KHR_external_memory]. + +While link:{extensions}VK_EXT_metal_objects.html[VK_EXT_metal_objects] provides a way to expose underlying Metal resources, when importing an image from an `id` handle, said images and their backing memory will be imported at -link:{refpage}VkImage.html[VkImage] creation. +link:{docs}chapters/resources.html#VkImage[VkImage] creation. According to point link:https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#resources-association[12.8 Memory Resource Association] resources are created as _virtual allocations_ with no backing memory. This leads to having to treat imported images through -link:{refpage}VK_EXT_metal_objects.html[VK_EXT_metal_objects] differently. +link:{extensions}VK_EXT_metal_objects.html[VK_EXT_metal_objects] differently. -This extension aims to import both resources through link:{refpage}VkDeviceMemory.html[VkDeviceMemory] so that later can be bound -to a existing link:{refpage}VkImage.html[VkImage] or link:{refpage}VkBuffer.html[VkBuffer] respectively. +This extension aims to import both resources through link:{docs}chapters/memory.html#VkDeviceMemory[VkDeviceMemory] +so that later can be bound to a existing +link:{docs}chapters/resources.html#VkImage[VkImage] or +link:{docs}chapters/resources.html#VkBuffer[VkBuffer] respectively. == Proposal This extension aims to standardize memory imports and exports of Vulkan resources using -link:{refpage}VK_KHR_external_memory.html[VK_KHR_external_memory] as baseline to conform to what other platforms have done with -extensions like link:{refpage}VK_KHR_external_memory_win32.html[VK_KHR_external_memory_win32] and -link:{refpage}VK_ANDROID_external_memory_android_hardware_buffer.html[VK_ANDROID_external_memory_android_hardware_buffer] to name a few. +link:{extensions}VK_KHR_external_memory.html[VK_KHR_external_memory] as baseline to conform to what other platforms have done with +extensions like link:{extensions}VK_KHR_external_memory_win32.html[VK_KHR_external_memory_win32] and +link:{extensions}VK_ANDROID_external_memory_android_hardware_buffer.html[VK_ANDROID_external_memory_android_hardware_buffer] to name a few. -This means that external Metal resources will be imported through link:{refpage}VkDeviceMemory.html[VkDeviceMemory] to later be bound. +This means that external Metal resources will be imported through link:{extensions}VkDeviceMemory.html[VkDeviceMemory] to later be bound. -3 new bit values will be added to link:{refpage}VkExternalMemoryHandleTypeFlagBits.html[VkExternalMemoryHandleTypeFlagBits]: +3 new bit values will be added to link:{docs}chapters/capabilities.html#VkExternalMemoryHandleTypeFlagBits.html[VkExternalMemoryHandleTypeFlagBits]: - `VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLBUFFER_BIT_EXT` to accommodate for Metal buffers (MTLBuffer) - `VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT` to accommodate for Metal textures (MTLTexture) @@ -43,8 +48,10 @@ This means that external Metal resources will be imported through link:{refpage} Due to MTLTexture's semantics in Metal API roughly align with that of an image with a dedicated allocation in Vulkan, implementations will be required to report `VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT` for `VK_EXTERNAL_MEMORY_HANDLE_TYPE_MTLTEXTURE_BIT_EXT`. When importing a MTLTexture through the creation of a -link:{refpage}VkDeviceMemory.html[VkDeviceMemory], the link:{refpage}VkImage.html[VkImage] it will be bound to -must have the same creation parameters as the MTLTexture used at import. +link:{docs}chapters/memory.html#VkDeviceMemory[VkDeviceMemory], the +link:{docs}chapters/resources.html#VkImage[VkImage] +link:{docs}chapters/resources.html#VkImage[VkImage] it will be bound to must have the same +creation parameters as the MTLTexture used at import. == Examples @@ -107,4 +114,4 @@ if (result == VK_SUCCESS) { == Issues -None identified. \ No newline at end of file +None identified. diff --git a/proposals/VK_KHR_video_maintenance2.adoc b/proposals/VK_KHR_video_maintenance2.adoc new file mode 100644 index 000000000..fdc630592 --- /dev/null +++ b/proposals/VK_KHR_video_maintenance2.adoc @@ -0,0 +1,225 @@ +// Copyright 2023-2025 The Khronos Group Inc. +// +// SPDX-License-Identifier: CC-BY-4.0 + += VK_KHR_video_maintenance2 +:toc: left +:docs: https://docs.vulkan.org/spec/latest/ +:extensions: {docs}appendices/extensions.html# +:sectnums: + +This proposal details and addresses the issues solved by the `VK_KHR_video_maintenance2` extension. + +== Problem Statement + +Over time, a collection of minor features, none of which would warrant an entire extension of their own, requires the creation of a maintenance extension specific to video related functionalities in Vulkan. + +The following is a list of issues considered in this proposal: + + * Relax the requirement of having to specify a video session parameters object when calling `vkCmdBeginVideoCodingKHR` with a video decode session + * Allow applications to specify codec-specific parameter sets inline for each decode operation instead of having to construct video session parameters objects (this may simplify the workflow for decoder applications when the parameter sets show low chance of reuse or are received each frame at the potential cost of redundant parameter parsing by the implementation) + * Require support for `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR` in all applicable video encode profiles + * Provide additional guarantees on Video Std parameters that the encoder implementation will not override + +== Proposal + +=== New features + +The following features are exposed: + +[source,c] +---- +typedef struct VkPhysicalDeviceVideoMaintenance2FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 videoMaintenance2; +} VkPhysicalDeviceVideoMaintenance2FeaturesKHR; +---- + +Where the `videoMaintenance2` feature indicates support for all the individual sub-features defined in this proposal. + + +=== Relaxed requirements on video session parameters objects + +Before this proposal, the application is required to specify a video session parameters object to bind when beginning a video coding scope with the `vkCmdBeginVideoCodingKHR` command in case the used video codec operation has codec-specific parameter sets that are sourced from these objects. This is unnecessarily restrictive, particularly when considering the new inline video session parameter specification support introduced in this extension. + +Accordingly, this proposal relaxes the need for specifying a video session parameters object when calling the `vkCmdBeginVideoCodingKHR` command with a video decode session. This also enables application to record video session reset operations without the need to have to construct a placeholder video session parameters object that would not otherwise be necessary. This proposal does that by moving the valid usage requirements related to the need for a bound video session parameters object from the `vkCmdBeginVideoCodingKHR` command to the `vkCmdDecodeVideoKHR` command when the new `videoMaintenance2` feature is enabled. Those valid usage requirements are then further relaxed when all codec-specific parameter sets are specified inline, when applicable, as described later. + + +=== Inline video session parameters + +There are certain cases where having to record codec-specific parameter sets into video session parameters objects is unnecessary overhead/complexity for application developers. In particular, having a way to specify these codec-specific parameter sets inline to the actual video coding operations thus may be preferred in one of the following scenarios: + + * When the codec-specific parameter set is not expected to be reused across multiple video coding commands + * When the codec-specific parameter sets change at a very high frequency that their reuse across multiple video coding commands is unlikely + * For debugging purposes + +This proposal suggests the addition of new APIs that enable the application to opt in to using inline video session parameters in these cases to eliminate frequent updates and the creation of video session parameters objects. + +In case of video encode sessions, however, video session parameters objects may also contain additional information beyond just the codec-specific parameter sets such as the used video encode quality level that may have an effect on parameter overrides. More importantly, in case of video encoding, the video session parameters objects are used to construct and encode the final codec-specific parameter sets to include in the bitstream so they are needed for purposes beyond just specifying the parameters as input to the actual picture encoding commands. Accordingly, this proposal only allows inline video session parameters for video decode sessions. + +The application can opt in to allow the use of inline video session parameters in video decode sessions using the new `VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR` video session creation flag. This new creation flag can only be used when the `videoMaintenance2` feature is enabled. + +When creating a video decode session with this new flag, the application can use one of the newly introduced codec-specific structures to specify the codec-specific parameter set(s) used by the video decode operations issued in response to a `vkCmdDecodeVideoKHR` command by including them in the `pNext` chain of the `pDecodeInfo` parameter of the command. + +The proposed API allows mixing and matching codec-specific parameter sets specified inline and sourced from video session parameters objects. This may be useful when the application would like to continue to source sequence level parameters (e.g. H.264 SPS) from video session parameters object but would like to specify other parameter sets inline (e.g. H.264 PPS). + +It is important to note that applications should still prefer to store and source all codec-specific parameter sets in/from video session parameters objects, as parsing the parameter sets inline can be expensive and cannot be amortized across multiple decode commands without the use of video session parameters objects. + +For H.264 decode sessions created with `VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR`, the following new structure can be included in the `pNext` chain of `VkVideoDecodeInfoKHR` to specify inline video session parameters: + +[source,c] +---- +typedef struct VkVideoDecodeH264InlineSessionParametersInfoKHR { + VkStructureType sType; + void* pNext; + const StdVideoH264SequenceParameterSet* pStdSPS; + const StdVideoH264PictureParameterSet* pStdPPS; +} VkVideoDecodeH264InlineSessionParametersInfoKHR; +---- + +When the `pStdSPS` and/or `pStdPPS` members are not `NULL`, the H.264 SPS and/or PPS, respectively, specified through the structures pointed to by them will be used by the video decode operations instead of those parameter sets being sourced from the bound video session parameters object. When both are non-`NULL`, a bound video session parameters object is not even required by the video decode command. + +For H.265 decode sessions created with `VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR`, the following new structure can be included in the `pNext` chain of `VkVideoDecodeInfoKHR` to specify inline video session parameters: + +[source,c] +---- +typedef struct VkVideoDecodeH265InlineSessionParametersInfoKHR { + VkStructureType sType; + void* pNext; + const StdVideoH265VideoParameterSet* pStdVPS; + const StdVideoH265SequenceParameterSet* pStdSPS; + const StdVideoH265PictureParameterSet* pStdPPS; +} VkVideoDecodeH265InlineSessionParametersInfoKHR; +---- + +When the `pStdVPS`, `pStdSPS`, and/or `pStdPPS` members are not `NULL`, the H.265 VPS, SPS, and/or PPS, respectively, specified through the structures pointed to by them will be used by the video decode operations instead of those parameter sets being sourced from the bound video session parameters object. When all three are non-`NULL`, a bound video session parameters object is not even required by the video decode command. + +For AV1 decode sessions created with `VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR`, the following new structure can be included in the `pNext` chain of `VkVideoDecodeInfoKHR` to specify inline video session parameters: + +[source,c] +---- +typedef struct VkVideoDecodeAV1InlineSessionParametersInfoKHR { + VkStructureType sType; + void* pNext; + const StdVideoAV1SequenceHeader* pStdSequenceHeader; +} VkVideoDecodeAV1InlineSessionParametersInfoKHR; +---- + +When the `pStdSequenceHeader` member is not `NULL`, the AV1 sequence header specified through the structure pointed to by it will be used by the video decode operations instead of the AV1 sequence header being sourced from the bound video session parameters object. When `pStdSequenceHeader` is not `NULL`, a bound video session parameters object is not even required by the video decode command. + + +== Examples + +=== Reset a video decode session that uses video session parameters objects without binding one + +[source,c] +---- +// Begin video coding scope with given video session but no parameters object +VkVideoBeginCodingInfoKHR beginInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR, + .pNext = NULL, + .flags = 0, + .videoSession = videoSession, + .videoSessionParameters = VK_NULL_HANDLE, // can always be VK_NULL_HANDLE for all codecs if videoMaintenance2 is enabled + ... +}; + +vkCmdBeginVideoCodingKHR(commandBuffer, &beginInfo); + +// Reset video session before starting to use it for video coding operations +VkVideoCodingControlInfoKHR controlInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR, + .pNext = NULL, + .flags = VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR +}; + +vkCmdControlVideoCodingKHR(commandBuffer, &controlInfo); + +vkCmdEndVideoCodingKHR(commandBuffer, &endInfo); +---- + + +=== Decode H.264 frame with inline PPS + +[source,c] +---- +// Create a video session with inline session parameters support +VkVideoSessionKHR videoSession = VK_NULL_HANDLE; + +VkVideoSessionCreateInfoKHR createInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR, + .pNext = NULL, + .flags = VK_VIDEO_SESSION_CREATE_INLINE_SESSION_PARAMETERS_BIT_KHR, + ... +}; + +vkCreateVideoSessionKHR(device, &createInfo, NULL, &videoSession); + +... + +// Begin video coding scope with video session parameters object but we will only source the SPS from there +VkVideoBeginCodingInfoKHR beginInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR, + .pNext = NULL, + .flags = 0, + .videoSession = videoSession, + .videoSessionParameters = videoSessionParameters, + ... +}; + +vkCmdBeginVideoCodingKHR(commandBuffer, &beginInfo); + +// We will use an inline PPS +StdVideoH264PictureParameterSet pps = { ... }; + +VkVideoDecodeH264InlineSessionParametersInfoKHR decodeH264ParamsInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_INFO_KHR, + .pNext = NULL, + .pStdSPS = NULL, // source SPS from the bound video session parameters object + .pStdPPS = &pps // use inline PPS +}; + +VkVideoDecodeH264PictureInfoKHR decodeH264PictureInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR, + .pNext = &decodeH264ParamsInfo, + ... +}; + +VkVideoDecodeInfoKHR decodeInfo = { + .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR, + .pNext = &decodeH264PictureInfo, + ... +}; + +vkCmdDecodeVideoKHR(commandBuffer, &decodeInfo); + +vkCmdEndVideoCodingKHR(commandBuffer, ...); +---- + + +== Issues + +=== RESOLVED: Do we want to relax the requirements for a bound video session parameters object for video encode sessions? + +Not in this extension. While being able to reset or perform other control operations on video encode sessions without a bound video session parameters object could be useful/convenient, this proposal only relaxes the requirements for video decode sessions. + + +=== RESOLVED: Do we want to support inline video session parameters in video encode sessions? + +No. Video session parameters objects created against a video encode session contain additional information that may affect implementation parameter overrides such as the used video encode quality level and are also used to encode the codec-specific parameter sets which would make specifying inline video session parameters in video encode sessions problematic. Inline video session parameters are anyway expected to only be handy in video decoding use cases so this proposal only allows using them in video decode sessions. + + +=== RESOLVED: Which codec-specific parameter set is used if a matching one is available in the bound video session parameters object but the application also specifies one using the new inline parameter specification APIs? + +The codec-specific parameter sets specified inline are used. This enables the application to override the parameter sets available in the bound video session parameters object for each command. + + +=== RESOLVED: Should we require `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR` for all video encode profiles? + +For all existing video encode profiles. We still want to reserve the right to not require `VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR` for any future video encode profile if the mode is not applicable for the video codec. + + +== Further Functionality + +None. diff --git a/xml/vk.xml b/xml/vk.xml old mode 100644 new mode 100755 index 7baaf6cab..76eb084d1 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -179,7 +179,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 305 +#define VK_HEADER_VERSION 306 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) // Version of this file @@ -7216,6 +7216,11 @@ typedef void* MTLSharedEvent_id; void* pNext VkBool32 videoMaintenance1 + + VkStructureType sType + void* pNext + VkBool32 videoMaintenance2 + VkStructureType sType const void* pNext @@ -7259,6 +7264,12 @@ typedef void* MTLSharedEvent_id; uint32_t maxStdPPSCount const VkVideoDecodeH264SessionParametersAddInfoKHR* pParametersAddInfo + + VkStructureType sType + const void* pNext + const StdVideoH264SequenceParameterSet* pStdSPS + const StdVideoH264PictureParameterSet* pStdPPS + VkStructureType sType const void* pNext @@ -7308,6 +7319,13 @@ typedef void* MTLSharedEvent_id; uint32_t maxStdPPSCount const VkVideoDecodeH265SessionParametersAddInfoKHR* pParametersAddInfo + + VkStructureType sType + const void* pNext + const StdVideoH265VideoParameterSet* pStdVPS + const StdVideoH265SequenceParameterSet* pStdSPS + const StdVideoH265PictureParameterSet* pStdPPS + VkStructureType sType const void* pNext @@ -7343,6 +7361,11 @@ typedef void* MTLSharedEvent_id; const void* pNext const StdVideoAV1SequenceHeader* pStdSequenceHeader + + VkStructureType sType + const void* pNext + const StdVideoAV1SequenceHeader* pStdSequenceHeader + VkStructureType sType const void* pNext @@ -19088,7 +19111,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23187,7 +23210,7 @@ typedef void* MTLSharedEvent_id; - + @@ -24350,7 +24373,7 @@ typedef void* MTLSharedEvent_id; - + @@ -24635,7 +24658,7 @@ typedef void* MTLSharedEvent_id; - + @@ -24698,7 +24721,7 @@ typedef void* MTLSharedEvent_id; - + @@ -25334,7 +25357,7 @@ typedef void* MTLSharedEvent_id; - + @@ -25918,7 +25941,7 @@ typedef void* MTLSharedEvent_id; - + @@ -25944,6 +25967,7 @@ typedef void* MTLSharedEvent_id; + @@ -26341,12 +26365,28 @@ typedef void* MTLSharedEvent_id; - + - - - - + + + + + + + + + + + + + + + + + + + + @@ -26545,7 +26585,13 @@ typedef void* MTLSharedEvent_id; - + + + + + + +