diff --git a/Makefile b/Makefile index f368649c..336683d1 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,7 @@ VERBOSE = # EXTRAATTRIBS sets additional attributes, if passed to make # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -PATCHVERSION = 79 +PATCHVERSION = 80 ifneq (,$(findstring VK_VERSION_1_1,$(VERSIONS))) SPECREVISION = 1.1.$(PATCHVERSION) else diff --git a/appendices/VK_EXT_conditional_rendering.txt b/appendices/VK_EXT_conditional_rendering.txt new file mode 100644 index 00000000..92de8016 --- /dev/null +++ b/appendices/VK_EXT_conditional_rendering.txt @@ -0,0 +1,80 @@ +include::meta/VK_EXT_conditional_rendering.txt[] + +*Last Modified Date*:: + 2018-05-21 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Vikram Kushwaha, NVIDIA + - Daniel Rakos, AMD + - Jesse Hall, Google + - Jeff Bolz, NVIDIA + - Piers Daniell, NVIDIA + - Stuart Smith, Imagination Technologies + +This extension allows the execution of one or more rendering commands to be +conditional on a value in buffer memory. +This may help an application reduce the latency by conditionally discarding +rendering commands without application intervention. +The conditional rendering commands are limited to draws, compute dispatches +and clearing attachments within a conditional rendering block. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkAccessFlagBits: + ** ename:VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT + * Extending elink:VkBufferUsageFlagBits: + ** ename:VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT + * Extending elink:VkPipelineStageFlagBits: + ** ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT + +=== New Enums + + * elink:VkConditionalRenderingFlagBitsEXT + +=== New Structures + + * slink:VkConditionalRenderingBeginInfoEXT + * Extending slink:VkCommandBufferInheritanceInfo: + ** slink:VkCommandBufferInheritanceConditionalRenderingInfoEXT + * Extending slink:VkPhysicalDeviceFeatures2: + ** slink:VkPhysicalDeviceConditionalRenderingFeaturesEXT + +None. + +=== New Functions + + * flink:vkCmdBeginConditionalRenderingEXT + * flink:vkCmdEndConditionalRenderingEXT + +=== Issues + +1) Should conditional rendering affect copy and blit commands? + +RESOLVED: Conditional rendering should not affect copies and blits. + +2) Should secondary command buffers be allowed to execute while conditional +rendering is active in the primary command buffer? + +RESOLVED: The rendering commands in secondary command buffer will be +affected by an active conditional rendering in primary command buffer if the +pname:conditionalRenderingEnable is set to ename:VK_TRUE. +Conditional rendering must: not be active in the primary command buffer if +pname:conditionalRenderingEnable is ename:VK_FALSE. + +=== Examples + +None. + +=== Version History + + * Revision 1, 2018-04-19 (Vikram Kushwaha) + - First Version + + * Revision 2, 2018-05-21 (Vikram Kushwaha) + - Add new pipeline stage, access flags and limit conditional rendering + to a subpass or entire renderpass. diff --git a/appendices/VK_IMG_format_pvrtc.txt b/appendices/VK_IMG_format_pvrtc.txt new file mode 100644 index 00000000..e69de29b diff --git a/appendices/VK_KHR_8bit_storage.txt b/appendices/VK_KHR_8bit_storage.txt new file mode 100644 index 00000000..9065b22b --- /dev/null +++ b/appendices/VK_KHR_8bit_storage.txt @@ -0,0 +1,48 @@ +// Copyright (c) 2017-2018 Khronos Group. This work is licensed under a +// Creative Commons Attribution 4.0 International License; see +// http://creativecommons.org/licenses/by/4.0/ + +include::meta/VK_KHR_8bit_storage.txt[] + +*Last Modified Date*:: + 2018-02-05 +*IP Status*:: + No known IP claims. +*Interactions and External Dependencies*:: + - This extension requires + https://www.khronos.org/registry/spir-v/extensions/KHR/SPV_KHR_8bit_storage.html[+SPV_KHR_8bit_storage+] +*Contributors*:: + - Alexander Galazin, Arm + +The +VK_KHR_8bit_storage+ extension allows use of 8-bit types in uniform and +storage buffers, and push constant blocks. +This extension introduces several new optional features which map to SPIR-V +capabilities and allow access to 8-bit data in code:Block-decorated objects +in the code:Uniform and the code:StorageBuffer storage classes, and objects +in the code:PushConstant storage class. + +The code:StorageBuffer8BitAccess capability must: be supported by all +implementations of this extension. +The other capabilities are optional. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR + +=== New Structures + + * slink:VkPhysicalDevice8BitStorageFeaturesKHR + +=== New SPIR-V Capabilities + + * <> + * <> + * <> + +=== Issues + +=== Version History + + * Revision 1, 2018-02-05 (Alexander Galazin) + - Initial draft diff --git a/appendices/VK_KHR_create_renderpass2.txt b/appendices/VK_KHR_create_renderpass2.txt new file mode 100644 index 00000000..cb2e68b8 --- /dev/null +++ b/appendices/VK_KHR_create_renderpass2.txt @@ -0,0 +1,56 @@ +// Copyright (c) 2016-2017 Khronos Group. This work is licensed under a +// Creative Commons Attribution 4.0 International License; see +// http://creativecommons.org/licenses/by/4.0/ + +include::meta/VK_KHR_create_renderpass2.txt[] + +Last Modified Date:: + 2018-02-07 +Contributors:: + - Tobias Hector + - Jeff Bolz + +This extension provides a new entry point to create render passes in a way +that can be easily extended by other extensions through the substructures of +render pass creation. +The Vulkan 1.0 render pass creation sub-structures do not include +ptext:sType/ptext:pNext members. +Additionally, the renderpass begin/next/end commands have been augmented +with new extensible structures for passing additional subpass information. + +Parameters from the <> and <> +extensions which previously extended slink:VkRenderPassCreateInfo are folded +into the new structures in more appropriate locations. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR + ** ename:VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR + ** ename:VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR + ** ename:VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR + ** ename:VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR + ** ename:VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR + ** ename:VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR + +=== New Structures + + * slink:VkAttachmentDescription2KHR + * slink:VkAttachmentReference2KHR + * slink:VkSubpassDescription2KHR + * slink:VkSubpassDependency2KHR + * slink:VkRenderPassCreateInfo2KHR + * slink:VkSubpassBeginInfoKHR + * slink:VkSubpassEndInfoKHR + +=== New Functions + + * flink:vkCreateRenderPass2KHR + * flink:vkCmdBeginRenderPass2KHR + * flink:vkCmdNextSubpass2KHR + * flink:vkCmdEndRenderPass2KHR + +=== Version History + + * Revision 1, 2018-02-07 (Tobias Hector) + - Internal revisions diff --git a/appendices/glossary.txt b/appendices/glossary.txt index ace580d8..3e4126f8 100644 --- a/appendices/glossary.txt +++ b/appendices/glossary.txt @@ -44,10 +44,6 @@ Allocation Scope:: as the parent object is freed or destroyed, or during the parent command. -API Order:: - A set of ordering rules that govern how primitives in draw commands - affect the framebuffer. - Aspect (Image):: An image may: contain multiple kinds, or aspects, of data for each pixel, where each aspect is used in a particular way by the pipeline and diff --git a/appendices/spirvenv.txt b/appendices/spirvenv.txt index efeb4c88..3fdda700 100755 --- a/appendices/spirvenv.txt +++ b/appendices/spirvenv.txt @@ -53,6 +53,9 @@ endif::VK_VERSION_1_1,VK_KHR_device_group[] ifdef::VK_VERSION_1_1,VK_KHR_multiview[] * [[spirvenv-capabilities-multiview]] code:MultiView endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_KHR_8bit_storage[] + * code:StorageBuffer8BitAccess +endif::VK_KHR_8bit_storage[] If the implementation supports any of the optional: features described in the <> chapter, then the capability operand(s) @@ -198,6 +201,12 @@ endif::VK_EXT_descriptor_indexing[] ifdef::VK_AMD_gpu_shader_half_float[] | code:Float16 | `<>` endif::VK_AMD_gpu_shader_half_float[] +ifdef::VK_KHR_8bit_storage[] +[[spirvenv-capabilities-table-8bitstorage]] +| code:StorageBuffer8BitAccess | <> +| code:UniformAndStorageBuffer8BitAccess | <> +| code:StoragePushConstant8 | <> +endif::VK_KHR_8bit_storage[] |==== ifdef::VK_VERSION_1_1,VK_KHR_variable_pointers[] @@ -255,6 +264,11 @@ The application can: pass a SPIR-V module to flink:vkCreateShaderModule that uses the `SPV_KHR_shader_draw_parameters` SPIR-V extension. endif::VK_VERSION_1_1,VK_KHR_shader_draw_parameters[] +ifdef::VK_KHR_8bit_storage[] +The application can: pass a SPIR-V module to flink:vkCreateShaderModule that +uses the +SPV_KHR_8bit_storage+ SPIR-V extension. +endif::VK_KHR_8bit_storage[] + ifdef::VK_VERSION_1_1,VK_KHR_16bit_storage[] The application can: pass a SPIR-V module to flink:vkCreateShaderModule that uses the diff --git a/chapters/cmdbuffers.txt b/chapters/cmdbuffers.txt index 2e600283..a01625cb 100644 --- a/chapters/cmdbuffers.txt +++ b/chapters/cmdbuffers.txt @@ -784,6 +784,48 @@ ename:VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT not set. After the implicit reset, pname:commandBuffer is moved to the <>. +ifdef::VK_EXT_conditional_rendering[] + +[open,refpage='VkCommandBufferInheritanceConditionalRenderingInfoEXT',desc='Structure specifying command buffer inheritance info',type='structs'] +-- + +If the pname:pNext chain of slink:VkCommandBufferInheritanceInfo includes a +sname:VkCommandBufferInheritanceConditionalRenderingInfoEXT structure, then +that structure controls whether a command buffer can: be executed while +conditional rendering is <> in the +primary command buffer. + +The sname:VkCommandBufferInheritanceConditionalRenderingInfoEXT structure is +defined as: + +include::../api/structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.txt[] + + * pname:sType is the type of this structure + * pname:pNext is `NULL` or a pointer to an extension-specific structure + * pname:conditionalRenderingEnable specifies whether the command buffer + can: be executed while conditional rendering is active in the primary + command buffer. + If this is ename:VK_TRUE, then this command buffer can: be executed + whether the primary command buffer has active conditional rendering or + not. + If this is ename:VK_FALSE, then the primary command buffer must: not + have conditional rendering active. + +If this structure is not present, the behavior is as if +pname:conditionalRenderingEnable is ename:VK_FALSE. + +.Valid Usage +**** + * [[VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-conditionalRenderingEnable-01977]] + If the <> feature is not enabled, + pname:conditionalRenderingEnable must: be ename:VK_FALSE +**** + +include::../validity/structs/VkCommandBufferInheritanceConditionalRenderingInfoEXT.txt[] +-- + +endif::VK_EXT_conditional_rendering[] Once recording starts, an application records a sequence of commands (ftext:vkCmd*) to set state in the command buffer, draw, dispatch, and other commands. @@ -821,6 +863,11 @@ executable state>>. * [[VUID-vkEndCommandBuffer-commandBuffer-00061]] All queries made <> during the recording of pname:commandBuffer must: have been made inactive +ifdef::VK_EXT_conditional_rendering[] + * [[VUID-vkEndCommandBuffer-None-01978]] + Conditional rendering must not be + <> +endif::VK_EXT_conditional_rendering[] ifdef::VK_EXT_debug_utils[] * [[VUID-vkEndCommandBuffer-commandBuffer-01815]] If pname:commandBuffer is a secondary command buffer, there must: not be diff --git a/chapters/descriptorsets.txt b/chapters/descriptorsets.txt index 0b65301e..dc9d422b 100644 --- a/chapters/descriptorsets.txt +++ b/chapters/descriptorsets.txt @@ -3213,7 +3213,7 @@ in the sets being bound. The effective offset used for dynamic uniform and storage buffer bindings is the sum of the relative offset taken from pname:pDynamicOffsets, and the base address of the buffer plus base offset in the descriptor set. -The length of the dynamic uniform and storage buffer bindings is the buffer +The range of the dynamic uniform and storage buffer bindings is the buffer range as specified in the descriptor set. Each of the pname:pDescriptorSets must: be compatible with the pipeline @@ -3274,6 +3274,11 @@ descriptor set. binding with type ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must: be a multiple of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment + * [[VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979]] + For each dynamic uniform or storage buffer binding in + pname:pDescriptorSets, the sum of the effective offset, as defined + above, and the range of the binding must: be less than or equal to the + size of the buffer **** include::../validity/protos/vkCmdBindDescriptorSets.txt[] diff --git a/chapters/drawing.txt b/chapters/drawing.txt index 1f3ab690..2d074233 100644 --- a/chapters/drawing.txt +++ b/chapters/drawing.txt @@ -2339,3 +2339,154 @@ include::../validity/protos/vkCmdDrawIndexedIndirectCountAMD.txt[] -- endif::VK_AMD_draw_indirect_count[] + +ifdef::VK_EXT_conditional_rendering[] + +[[drawing-conditional-rendering]] +== Conditional Rendering +Certain rendering commands can: be executed conditionally based on a value +in buffer memory. +These rendering commands are limited to <>, +<>, and clearing attachments with +flink:vkCmdClearAttachments within a conditional rendering block which is +defined by commands flink:vkCmdBeginConditionalRenderingEXT and +flink:vkCmdEndConditionalRenderingEXT. +Other rendering commands remain unaffected by conditional rendering. + +[[active-conditional-rendering]] +After beginning conditional rendering, it is considered _active_ within the +command buffer it was called until it is ended with +flink:vkCmdEndConditionalRenderingEXT. + +Conditional rendering must: begin and end in the same command buffer. +When conditional rendering is active, a primary command buffer can: execute +secondary command buffers if the +<> feature is enabled. +For a secondary command buffer to be executed while conditional rendering is +active in the primary command buffer, it must: set the +pname:conditionalRenderingEnable flag of +slink:VkCommandBufferInheritanceConditionalRenderingInfoEXT, as described in +the <> section. + +Conditional rendering must: also either begin and end inside the same +subpass of a render pass instance, or must: both begin and end outside of a +render pass instance (i.e. contain entire render pass instances). + +[open,refpage='vkCmdBeginConditionalRenderingEXT',desc='Define the beginning of a conditional rendering block',type='protos'] +-- + +To begin conditional rendering, call: + +include::../api/protos/vkCmdBeginConditionalRenderingEXT.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:pConditionalRenderingBegin is a pointer to an instance of the + slink:VkConditionalRenderingBeginInfoEXT structure specifying the + parameters of conditional rendering. + +.Valid Usage +**** + * [[VUID-vkCmdBeginConditionalRenderingEXT-None-01980]] + Conditional rendering must: not already be + <> +**** + +include::../validity/protos/vkCmdBeginConditionalRenderingEXT.txt[] +-- + +[open,refpage='VkConditionalRenderingBeginInfoEXT',desc='Structure specifying conditional rendering begin info',type='structs'] +-- + +The sname:VkConditionalRenderingBeginInfoEXT structure is defined as: + +include::../api/structs/VkConditionalRenderingBeginInfoEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:buffer is a buffer containing the predicate for conditional + rendering. + * pname:offset is the byte offset into pname:buffer where the predicate is + located. + * pname:flags is a bitmask of elink:VkConditionalRenderingFlagsEXT + specifying the behavior of conditional rendering. + +If the 32-bit value at pname:offset in pname:buffer memory is zero, then the +rendering commands are discarded, otherwise they are executed as normal. +If the value of the predicate in buffer memory changes while conditional +rendering is active, the rendering commands may: be discarded in an +implementation-dependent way. +Some implementations may latch the value of the predicate upon beginning +conditional rendering while others may read it before every rendering +command. + +.Valid Usage +**** + * [[VUID-VkConditionalRenderingBeginInfoEXT-buffer-01981]] + If pname:buffer is non-sparse then it must: be bound completely and + contiguously to a single sname:VkDeviceMemory object + * [[VUID-VkConditionalRenderingBeginInfoEXT-buffer-01982]] + pname:buffer must: have been created with the + ename:VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT bit set + * [[VUID-VkConditionalRenderingBeginInfoEXT-offset-01983]] + pname:offset must: be less than the size of pname:buffer by at least 32 + bits. + * [[VUID-VkConditionalRenderingBeginInfoEXT-offset-01984]] + pname:offset must: be a multiple of 4 +**** + +[open,refpage='VkConditionalRenderingFlagBitsEXT',desc='Specify the behavior of conditional rendering',type='enums'] +-- + +Bits which can: be set in +flink:vkCmdBeginConditionalRenderingEXT::pname:flags specifying the behavior +of conditional rendering are: + +include::../api/enums/VkConditionalRenderingFlagBitsEXT.txt[] + + * ename:VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT specifies the condition + used to determine whether to discard rendering commands or not. + That is, if the 32-bit predicate read from pname:buffer memory at + pname:offset is zero, the rendering commands are not discarded, and if + non zero, then they are discarded. + +-- + +[open,refpage='VkConditionalRenderingFlagsEXT',desc='Bitmask of VkConditionalRenderingFlagBitsEXT',type='enums'] +-- +include::../api/flags/VkConditionalRenderingFlagsEXT.txt[] + +sname:VkConditionalRenderingFlagsEXT is a bitmask type for setting a mask of +zero or more slink:VkConditionalRenderingFlagBitsEXT. + +[open,refpage='vkCmdEndConditionalRenderingEXT',desc='Define the end of a conditional rendering block',type='protos'] +-- + +To end conditional rendering, call: + +include::../api/protos/vkCmdEndConditionalRenderingEXT.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + +Once ended, conditional rendering becomes inactive. + +.Valid Usage +**** + * [[VUID-vkCmdEndConditionalRenderingEXT-None-01985]] + Conditional rendering must: be <> + * [[VUID-vkCmdEndConditionalRenderingEXT-None-01986]] + If conditional rendering was made + <> outside of a render pass + instance, it must not be ended inside a render pass instance + * [[VUID-vkCmdEndConditionalRenderingEXT-None-01987]] + If conditional rendering was made + <> within a subpass it must be + ended in the same subpass +**** + +include::../validity/protos/vkCmdEndConditionalRenderingEXT.txt[] +-- + +endif::VK_EXT_conditional_rendering[] diff --git a/chapters/features.txt b/chapters/features.txt index 6718399f..3c442fed 100755 --- a/chapters/features.txt +++ b/chapters/features.txt @@ -871,6 +871,54 @@ include::../validity/structs/VkPhysicalDeviceMultiviewFeatures.txt[] endif::VK_VERSION_1_1,VK_KHR_multiview[] +ifdef::VK_KHR_8bit_storage[] +[open,refpage='VkPhysicalDevice8BitStorageFeaturesKHR',desc='Structure describing features supported by VK_KHR_8bit_storage',type='structs'] +-- + +To query 8-bit storage features additionally supported call +flink:vkGetPhysicalDeviceFeatures2 with a +sname:VkPhysicalDevice8BitStorageFeaturesKHR structure included in the +pname:pNext chain of its pname:pFeatures parameter. +The sname:VkPhysicalDevice8BitStorageFeaturesKHR structure can: also be in +the pname:pNext chain of a slink:VkDeviceCreateInfo structure, in which case +it controls which additional features are enabled in the device. + +The slink:VkPhysicalDevice8BitStorageFeaturesKHR structure is defined as: + +include::../api/structs/VkPhysicalDevice8BitStorageFeaturesKHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * [[features-features-storageBuffer8BitAccess]] + pname:storageBuffer8BitAccess indicates whether objects in the + code:StorageBuffer storage class with the code:Block decoration can: + have 8-bit integer members. + If this feature is not enabled, 8-bit integer members must: not be used + in such objects. + This also indicates whether shader modules can: declare the + code:StorageBuffer8BitAccess capability. + * [[features-features-uniformAndStorageBuffer8BitAccess]] + pname:uniformAndStorageBuffer8BitAccess indicates whether objects in + the code:Uniform storage class with the code:Block decoration and in + the code:StorageBuffer storage class with the same decoration can: have + 8-bit integer members. + If this feature is not enabled, 8-bit integer members must: not be used + in such objects. + This also indicates whether shader modules can: declare the + code:UniformAndStorageBuffer8BitAccess capability. + * [[features-features-storagePushConstant8]] pname:storagePushConstant8 + indicates whether objects in the code:PushConstant storage class can: + have 8-bit integer members. + If this feature is not enabled, 8-bit integer members must: not be used + in such objects. + This also indicates whether shader modules can: declare the + code:StoragePushConstant8 capability. + +include::../validity/structs/VkPhysicalDevice8BitStorageFeaturesKHR.txt[] + +-- +endif::VK_KHR_8bit_storage[] + ifdef::VK_VERSION_1_1,VK_KHR_16bit_storage[] [open,refpage='VkPhysicalDevice16BitStorageFeatures',desc='Structure describing features supported by VK_KHR_16bit_storage',type='structs'] -- @@ -1021,6 +1069,36 @@ include::../validity/structs/VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT.t endif::VK_EXT_blend_operation_advanced[] +ifdef::VK_EXT_conditional_rendering[] + +[open,refpage='VkPhysicalDeviceConditionalRenderingFeaturesEXT',desc='Structure describing if a secondary command buffer can be executed if conditional rendering is active in the primary command buffer',type='structs'] +-- +The sname:VkPhysicalDeviceConditionalRenderingFeaturesEXT structure is +defined as: + +include::../api/structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * [[features-features-conditionalRendering]] pname:conditionalRendering + specifies whether conditional rendering is supported. + * [[features-features-inheritedConditionalRendering]] + pname:inheritedConditionalRendering specifies whether a secondary + command buffer can: be executed while conditional rendering is active in + the primary command buffer. + +If the sname:VkPhysicalDeviceConditionalRenderingFeaturesEXT structure is +included in the pname:pNext chain of flink:VkPhysicalDeviceFeatures2, it is +filled with values indicating the implementation-dependent behavior. +sname:VkPhysicalDeviceConditionalRenderingFeaturesEXT can: also be used in +pname:pNext chain of slink:VkDeviceCreateInfo to enable the features. + +include::../validity/structs/VkPhysicalDeviceConditionalRenderingFeaturesEXT.txt[] + +-- + +endif::VK_EXT_conditional_rendering[] + ifdef::VK_VERSION_1_1[] [open,refpage='VkPhysicalDeviceShaderDrawParameterFeatures',desc='Structure describing shader draw parameter features that can be supported by an implementation',type='structs'] -- @@ -1253,6 +1331,11 @@ ifdef::VK_VERSION_1_1,VK_KHR_variable_pointers[] pname:variablePointersStorageBuffer>>, if the `<>` extension is supported. endif::VK_VERSION_1_1,VK_KHR_variable_pointers[] +ifdef::VK_KHR_8bit_storage[] + * <>, if the `<>` + extension is supported. +endif::VK_KHR_8bit_storage[] ifdef::VK_EXT_descriptor_indexing[] * If the `<>` extension is supported: ** <> chapter. + * pname:pRenderPass points to a sname:VkRenderPass handle in which the + resulting render pass object is returned. + +This command is functionally identical to flink:vkCreateRenderPass, but +includes extensible sub-structures that include pname:sType and pname:pNext +parameters, allowing them to be more easily extended. + +include::../validity/protos/vkCreateRenderPass2KHR.txt[] +-- + +[open,refpage='VkRenderPassCreateInfo2KHR',desc='Structure specifying parameters of a newly created render pass',type='structs'] +-- + +The sname:VkRenderPassCreateInfo2KHR structure is defined as: + +include::../api/structs/VkRenderPassCreateInfo2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:attachmentCount is the number of attachments used by this render + pass. + * pname:pAttachments points to an array of pname:attachmentCount + slink:VkAttachmentDescription2KHR structures describing the attachments + used by the render pass. + * pname:subpassCount is the number of subpasses to create. + * pname:pSubpasses points to an array of pname:subpassCount + slink:VkSubpassDescription2KHR structures describing each subpass. + * pname:dependencyCount is the number of dependencies between pairs of + subpasses. + * pname:pDependencies points to an array of pname:dependencyCount + slink:VkSubpassDependency2KHR structures describing dependencies between + pairs of subpasses. + * pname:correlatedViewMaskCount is the number of correlation masks. + * pname:pCorrelatedViewMasks is an array of view masks indicating sets of + views that may: be more efficient to render concurrently. + +Parameters defined by this structure with the same name as those in +slink:VkRenderPassCreateInfo have the identical effect to those parameters; +the child structures are variants of those used in +slink:VkRenderPassCreateInfo which include pname:sType and pname:pNext +parameters, allowing them to be extended. + +If the slink:VkSubpassDescription2KHR::pname:viewMask member of any element +of pname:pSubpasses is not zero, _multiview_ functionality is considered to +be enabled for this render pass. + +pname:correlatedViewMaskCount and pname:pCorrelatedViewMasks have the same +effect as slink:VkRenderPassMultiviewCreateInfo::pname:correlationMaskCount +and slink:VkRenderPassMultiviewCreateInfo::pname:pCorrelationMasks, +respectively. + +.Valid Usage +**** + * [[VUID-VkRenderPassCreateInfo2KHR-None-03049]] + If any two subpasses operate on attachments with overlapping ranges of + the same sname:VkDeviceMemory object, and at least one subpass writes to + that area of sname:VkDeviceMemory, a subpass dependency must: be + included (either directly or via some intermediate subpasses) between + them + * [[VUID-VkRenderPassCreateInfo2KHR-attachment-03050]] + If the pname:attachment member of any element of + pname:pInputAttachments, pname:pColorAttachments, + pname:pResolveAttachments or pname:pDepthStencilAttachment, or the + attachment indexed by any element of pname:pPreserveAttachments in any + given element of pname:pSubpasses is bound to a range of a + sname:VkDeviceMemory object that overlaps with any other attachment in + any subpass (including the same subpass), the + sname:VkAttachmentDescription2KHR structures describing them must: + include ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in pname:flags + * [[VUID-VkRenderPassCreateInfo2KHR-attachment-03051]] + If the pname:attachment member of any element of + pname:pInputAttachments, pname:pColorAttachments, + pname:pResolveAttachments or pname:pDepthStencilAttachment, or any + element of pname:pPreserveAttachments in any given element of + pname:pSubpasses is not ename:VK_ATTACHMENT_UNUSED, it must: be less + than pname:attachmentCount + * [[VUID-VkRenderPassCreateInfo2KHR-pPreserveAttachments-03052]] + The value of any element of the pname:pPreserveAttachments member in any + given element of pname:pSubpasses must: not be + ename:VK_ATTACHMENT_UNUSED + * [[VUID-VkRenderPassCreateInfo2KHR-pAttachments-03053]] + For any member of pname:pAttachments with a pname:loadOp equal to + ename:VK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment + must: not specify a pname:layout equal to + pname:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL or + pname:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. + * [[VUID-VkRenderPassCreateInfo2KHR-pDependencies-03054]] + For any element of pname:pDependencies, if the pname:srcSubpass is not + ename:VK_SUBPASS_EXTERNAL, all stage flags included in the + pname:srcStageMask member of that dependency must: be a pipeline stage + supported by the <> + identified by the pname:pipelineBindPoint member of the source subpass. + * [[VUID-VkRenderPassCreateInfo2KHR-pDependencies-03055]] + For any element of pname:pDependencies, if the pname:dstSubpass is not + ename:VK_SUBPASS_EXTERNAL, all stage flags included in the + pname:dstStageMask member of that dependency must: be a pipeline stage + supported by the <> + identified by the pname:pipelineBindPoint member of the source subpass. + * [[VUID-VkRenderPassCreateInfo2KHR-pCorrelatedViewMasks-03056]] + The set of bits included in any element of pname:pCorrelatedViewMasks + must: not overlap with the set of bits included in any other element of + pname:pCorrelatedViewMasks + * [[VUID-VkRenderPassCreateInfo2KHR-viewMask-03057]] + If the slink:VkSubpassDescription2KHR::pname:viewMask member of all + elements of pname:pSubpasses is `0`, pname:correlatedViewMaskCount must: + be `0` + * [[VUID-VkRenderPassCreateInfo2KHR-viewMask-03058]] + The slink:VkSubpassDescription2KHR::pname:viewMask member of all + elements of pname:pSubpasses must: either all be `0`, or all not be `0` + * [[VUID-VkRenderPassCreateInfo2KHR-viewMask-03059]] + If the slink:VkSubpassDescription2KHR::pname:viewMask member of all + elements of pname:pSubpasses is `0`, the pname:dependencyFlags member of + any element of pname:pDependencies must: not include + ename:VK_DEPENDENCY_VIEW_LOCAL_BIT + * [[VUID-VkRenderPassCreateInfo2KHR-pDependencies-03060]] + For any element of pname:pDependencies where its pname:srcSubpass member + equals its pname:dstSubpass member, if the pname:viewMask member of the + corresponding element of pname:pSubpasses includes more than one bit, + its pname:dependencyFlags member must: include + ename:VK_DEPENDENCY_VIEW_LOCAL_BIT +**** + +include::../validity/structs/VkRenderPassCreateInfo2KHR.txt[] +-- + +[open,refpage='VkAttachmentDescription2KHR',desc='Structure specifying an attachment description',type='structs'] +-- + +The sname:VkAttachmentDescription2KHR structure is defined as: + +include::../api/structs/VkAttachmentDescription2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a bitmask of elink:VkAttachmentDescription2KHRFlagBits + specifying additional properties of the attachment. + * pname:format is a elink:VkFormat value specifying the format of the + image that will be used for the attachment. + * pname:samples is the number of samples of the image as defined in + elink:VkSampleCountFlagBits. + * pname:loadOp is a elink:VkAttachmentLoadOp value specifying how the + contents of color and depth components of the attachment are treated at + the beginning of the subpass where it is first used. + * pname:storeOp is a elink:VkAttachmentStoreOp value specifying how the + contents of color and depth components of the attachment are treated at + the end of the subpass where it is last used. + * pname:stencilLoadOp is a elink:VkAttachmentLoadOp value specifying how + the contents of stencil components of the attachment are treated at the + beginning of the subpass where it is first used. + * pname:stencilStoreOp is a elink:VkAttachmentStoreOp value specifying how + the contents of stencil components of the attachment are treated at the + end of the last subpass where it is used. + * pname:initialLayout is the layout the attachment image subresource will + be in when a render pass instance begins. + * pname:finalLayout is the layout the attachment image subresource will be + transitioned to when a render pass instance ends. + +Parameters defined by this structure with the same name as those in +slink:VkAttachmentDescription have the identical effect to those parameters. + +.Valid Usage +**** + * [[VUID-VkAttachmentDescription2KHR-finalLayout-03061]] + pname:finalLayout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED or + ename:VK_IMAGE_LAYOUT_PREINITIALIZED +**** + +include::../validity/structs/VkAttachmentDescription2KHR.txt[] +-- + +[open,refpage='VkSubpassDescription2KHR',desc='Structure specifying a subpass description',type='structs'] +-- + +The sname:VkSubpassDescription2KHR structure is defined as: + +include::../api/structs/VkSubpassDescription2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a bitmask of elink:VkSubpassDescriptionFlagBits + specifying usage of the subpass. + * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying + the pipeline type supported for this subpass. + * pname:viewMask is a bitfield of view indices describing which views + rendering is broadcast to in this subpass, when multiview is enabled. + * pname:inputAttachmentCount is the number of input attachments. + * pname:pInputAttachments is an array of slink:VkAttachmentReference + structures defining the input attachments for this subpass and their + layouts. + * pname:colorAttachmentCount is the number of color attachments. + * pname:pColorAttachments is an array of slink:VkAttachmentReference + structures defining the color attachments for this subpass and their + layouts. + * pname:pResolveAttachments is an optional array of + pname:colorAttachmentCount slink:VkAttachmentReference structures + defining the resolve attachments for this subpass and their layouts. + * pname:pDepthStencilAttachment is a pointer to a + slink:VkAttachmentReference specifying the depth/stencil attachment for + this subpass and its layout. + * pname:preserveAttachmentCount is the number of preserved attachments. + * pname:pPreserveAttachments is an array of pname:preserveAttachmentCount + render pass attachment indices identifying attachments that are not used + by this subpass, but whose contents must: be preserved throughout the + subpass. + +Parameters defined by this structure with the same name as those in +slink:VkSubpassDescription have the identical effect to those parameters. + +pname:viewMask has the same effect for the described subpass as +slink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks has on each +corresponding subpass. + +.Valid Usage +**** + * [[VUID-VkSubpassDescription2KHR-pipelineBindPoint-03062]] + pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS + * [[VUID-VkSubpassDescription2KHR-colorAttachmentCount-03063]] + pname:colorAttachmentCount must: be less than or equal to + sname:VkPhysicalDeviceLimits::pname:maxColorAttachments + * [[VUID-VkSubpassDescription2KHR-loadOp-03064]] + If the first use of an attachment in this render pass is as an input + attachment, and the attachment is not also used as a color or + depth/stencil attachment in the same subpass, then pname:loadOp must: + not be ename:VK_ATTACHMENT_LOAD_OP_CLEAR + * [[VUID-VkSubpassDescription2KHR-pResolveAttachments-03065]] + If pname:pResolveAttachments is not `NULL`, for each resolve attachment + that does not have the value ename:VK_ATTACHMENT_UNUSED, the + corresponding color attachment must: not have the value + ename:VK_ATTACHMENT_UNUSED + * [[VUID-VkSubpassDescription2KHR-pResolveAttachments-03066]] + If pname:pResolveAttachments is not `NULL`, the sample count of each + element of pname:pColorAttachments must: be anything other than + ename:VK_SAMPLE_COUNT_1_BIT + * [[VUID-VkSubpassDescription2KHR-pResolveAttachments-03067]] + Any given element of pname:pResolveAttachments must: have a sample count + of ename:VK_SAMPLE_COUNT_1_BIT + * [[VUID-VkSubpassDescription2KHR-pResolveAttachments-03068]] + Any given element of pname:pResolveAttachments must: have the same + elink:VkFormat as its corresponding color attachment + * [[VUID-VkSubpassDescription2KHR-pColorAttachments-03069]] + All attachments in pname:pColorAttachments that are not + ename:VK_ATTACHMENT_UNUSED must: have the same sample count +ifdef::VK_AMD_mixed_attachment_samples[] + * [[VUID-VkSubpassDescription2KHR-pColorAttachments-03070]] + All attachments in pname:pColorAttachments that are not + ename:VK_ATTACHMENT_UNUSED must: have a sample count that is smaller + than or equal to the sample count of pname:pDepthStencilAttachment if it + is not ename:VK_ATTACHMENT_UNUSED +endif::VK_AMD_mixed_attachment_samples[] +ifndef::VK_AMD_mixed_attachment_samples[] +ifndef::VK_NV_framebuffer_mixed_samples[] + * [[VUID-VkSubpassDescription2KHR-pDepthStencilAttachment-03071]] + If pname:pDepthStencilAttachment is not ename:VK_ATTACHMENT_UNUSED and + any attachments in pname:pColorAttachments are not + ename:VK_ATTACHMENT_UNUSED, they must: have the same sample count +endif::VK_NV_framebuffer_mixed_samples[] +endif::VK_AMD_mixed_attachment_samples[] + * [[VUID-VkSubpassDescription2KHR-None-03072]] + If any input attachments are ename:VK_ATTACHMENT_UNUSED, then any + pipelines bound during the subpass must: not access those input + attachments from the fragment shader + * [[VUID-VkSubpassDescription2KHR-attachment-03073]] + The pname:attachment member of any element of pname:pPreserveAttachments + must: not be ename:VK_ATTACHMENT_UNUSED + * [[VUID-VkSubpassDescription2KHR-pPreserveAttachments-03074]] + Any given element of pname:pPreserveAttachments must: not also be an + element of any other member of the subpass description + * [[VUID-VkSubpassDescription2KHR-layout-03075]] + If any attachment is used as both an input attachment and a color or + depth/stencil attachment, then each use must: use the same pname:layout +ifdef::VK_NVX_multiview_per_view_attributes[] + * [[VUID-VkSubpassDescription2KHR-flags-03076]] + If pname:flags includes + ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must: + also include ename:VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX. +endif::VK_NVX_multiview_per_view_attributes[] + * [[VUID-VkSubpassDescription2KHR-aspectMask-03175]] + The pname:aspectMask member of any element of pname:pInputAttachments + must: be a valid combination of elink:VkImageAspectFlagBits + * [[VUID-VkSubpassDescription2KHR-aspectMask-03176]] + The pname:aspectMask member of any element of pname:pInputAttachments + must: not be `0` +**** + +include::../validity/structs/VkSubpassDescription2KHR.txt[] +-- + + +[open,refpage='VkAttachmentReference2KHR',desc='Structure specifying an attachment reference',type='structs'] +-- + +The sname:VkAttachmentReference2KHR structure is defined as: + +include::../api/structs/VkAttachmentReference2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:attachment is either an integer value identifying an attachment at + the corresponding index in + slink:VkRenderPassCreateInfo::pname:pAttachments, or + ename:VK_ATTACHMENT_UNUSED to signify that this attachment is not used. + * pname:layout is a elink:VkImageLayout value specifying the layout the + attachment uses during the subpass. + * pname:aspectMask is a mask of which aspect(s) can: be accessed within + the specified subpass as an input attachment. + +Parameters defined by this structure with the same name as those in +slink:VkAttachmentReference have the identical effect to those parameters. + +pname:aspectMask has the same effect for the described attachment as +slink:VkInputAttachmentAspectReference::pname:aspectMask has on each +corresponding attachment. +It is ignored when this structure is used to describe anything other than an +input attachment reference. + +.Valid Usage +**** + * [[VUID-VkAttachmentReference2KHR-layout-03077]] + pname:layout must: not be ename:VK_IMAGE_LAYOUT_UNDEFINED or + ename:VK_IMAGE_LAYOUT_PREINITIALIZED +**** + +include::../validity/structs/VkAttachmentReference2KHR.txt[] +-- + +[open,refpage='VkSubpassDependency2KHR',desc='Structure specifying a subpass dependency',type='structs'] +-- + +The sname:VkSubpassDependency2KHR structure is defined as: + +include::../api/structs/VkSubpassDependency2KHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:srcSubpass is the subpass index of the first subpass in the + dependency, or ename:VK_SUBPASS_EXTERNAL. + * pname:dstSubpass is the subpass index of the second subpass in the + dependency, or ename:VK_SUBPASS_EXTERNAL. + * pname:srcStageMask is a bitmask of elink:VkPipelineStageFlagBits + specifying the <>. + * pname:dstStageMask is a bitmask of elink:VkPipelineStageFlagBits + specifying the <> + * pname:srcAccessMask is a bitmask of elink:VkAccessFlagBits specifying a + <>. + * pname:dstAccessMask is a bitmask of elink:VkAccessFlagBits specifying a + <>. + * pname:dependencyFlags is a bitmask of elink:VkDependencyFlagBits. + * pname:viewOffset controls which views in the source subpass the views in + the destination subpass depend on. + +Parameters defined by this structure with the same name as those in +slink:VkSubpassDependency have the identical effect to those parameters. + +pname:viewOffset has the same effect for the described subpass dependency as +slink:VkRenderPassMultiviewCreateInfo::pname:pViewOffsets has on each +corresponding subpass dependency. + +.Valid Usage +**** + * [[VUID-VkSubpassDependency2KHR-srcSubpass-03078]] + If pname:srcSubpass is not ename:VK_SUBPASS_EXTERNAL, pname:srcStageMask + must: not include ename:VK_PIPELINE_STAGE_HOST_BIT + * [[VUID-VkSubpassDependency2KHR-dstSubpass-03079]] + If pname:dstSubpass is not ename:VK_SUBPASS_EXTERNAL, pname:dstStageMask + must: not include ename:VK_PIPELINE_STAGE_HOST_BIT + * [[VUID-VkSubpassDependency2KHR-srcStageMask-03080]] + If the <> feature is + not enabled, pname:srcStageMask must: not contain + ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + * [[VUID-VkSubpassDependency2KHR-dstStageMask-03081]] + If the <> feature is + not enabled, pname:dstStageMask must: not contain + ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + * [[VUID-VkSubpassDependency2KHR-srcStageMask-03082]] + If the <> + feature is not enabled, pname:srcStageMask must: not contain + ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or + ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + * [[VUID-VkSubpassDependency2KHR-dstStageMask-03083]] + If the <> + feature is not enabled, pname:dstStageMask must: not contain + ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or + ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + * [[VUID-VkSubpassDependency2KHR-srcSubpass-03084]] + pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless + one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies + and ensure a valid execution order + * [[VUID-VkSubpassDependency2KHR-srcSubpass-03085]] + pname:srcSubpass and pname:dstSubpass must: not both be equal to + ename:VK_SUBPASS_EXTERNAL + * [[VUID-VkSubpassDependency2KHR-srcSubpass-03086]] + If pname:srcSubpass is equal to pname:dstSubpass, pname:srcStageMask and + pname:dstStageMask must: only contain one of + ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, + ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, + ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, + ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, + ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, + ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, + ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, + ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, + ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, or + ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT + * [[VUID-VkSubpassDependency2KHR-srcSubpass-03087]] + If pname:srcSubpass is equal to pname:dstSubpass and not all of the + stages in pname:srcStageMask and pname:dstStageMask are + <>, the + <> pipeline + stage in pname:srcStageMask must: be + <> than or + equal to the <> pipeline stage in pname:dstStageMask + * [[VUID-VkSubpassDependency2KHR-srcAccessMask-03088]] + Any access flag included in pname:srcAccessMask must: be supported by + one of the pipeline stages in pname:srcStageMask, as specified in the + <> + * [[VUID-VkSubpassDependency2KHR-dstAccessMask-03089]] + Any access flag included in pname:dstAccessMask must: be supported by + one of the pipeline stages in pname:dstStageMask, as specified in the + <> + * [[VUID-VkSubpassDependency2KHR-dependencyFlags-03090]] + If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT, + pname:srcSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL + * [[VUID-VkSubpassDependency2KHR-dependencyFlags-03091]] + If pname:dependencyFlags includes ename:VK_DEPENDENCY_VIEW_LOCAL_BIT, + pname:dstSubpass must: not be equal to ename:VK_SUBPASS_EXTERNAL + * [[VUID-VkSubpassDependency2KHR-dependencyFlags-03092]] + If pname:dependencyFlags does not include + ename:VK_DEPENDENCY_VIEW_LOCAL_BIT, pname:viewOffset must: be `0` + * [[VUID-VkSubpassDependency2KHR-viewOffset-03093]] + If pname:viewOffset is not `0`, pname:srcSubpass must: not be equal to + pname:dstSubpass. +**** + +include::../validity/structs/VkSubpassDependency2KHR.txt[] +-- + + +endif::VK_KHR_create_renderpass2[] + + [open,refpage='vkDestroyRenderPass',desc='Destroy a render pass object',type='protos'] -- @@ -1788,6 +2257,122 @@ endif::VK_VERSION_1_1,VK_KHR_maintenance2[] include::../validity/protos/vkCmdBeginRenderPass.txt[] -- +ifdef::VK_KHR_create_renderpass2[] +[open,refpage='vkCmdBeginRenderPass2KHR',desc='Begin a new render pass',type='protos'] +-- + +Alternatively to begin a render pass, call: + +include::../api/protos/vkCmdBeginRenderPass2KHR.txt[] + + * pname:commandBuffer is the command buffer in which to record the + command. + * pname:pRenderPassBegin is a pointer to a slink:VkRenderPassBeginInfo + structure (defined below) which indicates the render pass to begin an + instance of, and the framebuffer the instance uses. + * pname:pSubpassBeginInfo is a pointer to a slink:VkSubpassBeginInfoKHR + structure which contains information about the subpass which is about to + begin rendering. + +After beginning a render pass instance, the command buffer is ready to +record the commands for the first subpass of that render pass. + +.Valid Usage +**** + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03094]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL + then the corresponding attachment image subresource of the framebuffer + specified in the pname:framebuffer member of pname:pRenderPassBegin + must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT + set +// The VU below comes in an alternate version when the extension is +// enabled. +ifndef::VK_KHR_maintenance2[] + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03095]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the + corresponding attachment image subresource of the framebuffer specified + in the pname:framebuffer member of pname:pRenderPassBegin must: have + been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +endif::VK_KHR_maintenance2[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_maintenance2[] + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03096]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is +// ifdef::VK_KHR_maintenance2[] + ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, + ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, +// endif::VK_KHR_maintenance2[] + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the + corresponding attachment image subresource of the framebuffer specified + in the pname:framebuffer member of pname:pRenderPassBegin must: have + been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +endif::VK_KHR_maintenance2[] + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03097]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL + then the corresponding attachment image subresource of the framebuffer + specified in the pname:framebuffer member of pname:pRenderPassBegin + must: have been created with ename:VK_IMAGE_USAGE_SAMPLED_BIT or + ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03098]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL + then the corresponding attachment image subresource of the framebuffer + specified in the pname:framebuffer member of pname:pRenderPassBegin + must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT set + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03099]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL + then the corresponding attachment image subresource of the framebuffer + specified in the pname:framebuffer member of pname:pRenderPassBegin + must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT set + * [[VUID-vkCmdBeginRenderPass2KHR-initialLayout-03100]] + If any of the pname:initialLayout members of the + sname:VkAttachmentDescription structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is not ename:VK_IMAGE_LAYOUT_UNDEFINED, then each + such pname:initialLayout must: be equal to the current layout of the + corresponding attachment image subresource of the framebuffer specified + in the pname:framebuffer member of pname:pRenderPassBegin + * [[VUID-vkCmdBeginRenderPass2KHR-srcStageMask-03101]] + The pname:srcStageMask and pname:dstStageMask members of any element of + the pname:pDependencies member of slink:VkRenderPassCreateInfo used to + create pname:renderPass must: be supported by the capabilities of the + queue family identified by the pname:queueFamilyIndex member of the + slink:VkCommandPoolCreateInfo used to create the command pool which + pname:commandBuffer was allocated from. +**** + +include::../validity/protos/vkCmdBeginRenderPass2KHR.txt[] +-- +endif::VK_KHR_create_renderpass2[] + [open,refpage='VkRenderPassBeginInfo',desc='Structure specifying render pass begin info',type='structs'] -- @@ -1982,6 +2567,23 @@ include::../validity/structs/VkSubpassSampleLocationsEXT.txt[] endif::VK_EXT_sample_locations[] +ifdef::VK_KHR_create_renderpass2[] +[open,refpage='VkSubpassBeginInfoKHR',desc='Structure specifying subpass begin info',type='structs'] +-- + +The sname:VkSubpassBeginInfoKHR structure is defined as: + +include::../api/structs/VkSubpassBeginInfoKHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:contents is a elink:VkSubpassContents value specifying how the + commands in the next subpass will be provided. + +include::../validity/structs/VkSubpassBeginInfoKHR.txt[] +-- +endif::VK_KHR_create_renderpass2[] + [open,refpage='VkSubpassContents',desc='Specify how commands in the first subpass of a render pass are provided',type='enums'] -- @@ -2153,6 +2755,42 @@ commands for that subpass. include::../validity/protos/vkCmdNextSubpass.txt[] -- +ifdef::VK_KHR_create_renderpass2[] + +[open,refpage='vkCmdNextSubpass2KHR',desc='Transition to the next subpass of a render pass',type='protos'] +-- + +To transition to the next subpass in the render pass instance after +recording the commands for a subpass, call: + +include::../api/protos/vkCmdNextSubpass2KHR.txt[] + + * pname:commandBuffer is the command buffer in which to record the + command. + * pname:pSubpassBeginInfo is a pointer to a slink:VkSubpassBeginInfoKHR + structure which contains information about the subpass which is about to + begin rendering. + * pname:pSubpassEndInfo is a pointer to a slink:VkSubpassEndInfoKHR + structure which contains information about how the previous subpass will + be ended. + +fname:vkCmdNextSubpass2KHR is semantically identical to +flink:vkCmdNextSubpass, except that it is extensible, and that +pname:contents is provided as part of an extensible structure instead of as +a flat parameter. + +.Valid Usage +**** + * [[VUID-vkCmdNextSubpass2KHR-None-03102]] + The current subpass index must: be less than the number of subpasses in + the render pass minus one +**** + +include::../validity/protos/vkCmdNextSubpass2KHR.txt[] +-- + +endif::VK_KHR_create_renderpass2[] + [open,refpage='vkCmdEndRenderPass',desc='End the current render pass',type='protos'] -- @@ -2177,3 +2815,47 @@ the final subpass. include::../validity/protos/vkCmdEndRenderPass.txt[] -- + +ifdef::VK_KHR_create_renderpass2[] +[open,refpage='vkCmdEndRenderPass2KHR',desc='End the current render pass',type='protos'] +-- + +To record a command to end a render pass instance after recording the +commands for the last subpass, call: + +include::../api/protos/vkCmdEndRenderPass2KHR.txt[] + + * pname:commandBuffer is the command buffer in which to end the current + render pass instance. + * pname:pSubpassEndInfo is a pointer to a slink:VkSubpassEndInfoKHR + structure which contains information about how the previous subpass will + be ended. + +fname:vkCmdEndRenderPass2KHR is semantically identical to +flink:vkCmdEndRenderPass, except that it is extensible. + +.Valid Usage +**** + * [[VUID-vkCmdEndRenderPass2KHR-None-03103]] + The current subpass index must: be equal to the number of subpasses in + the render pass minus one +**** + +include::../validity/protos/vkCmdEndRenderPass2KHR.txt[] +-- + +[open,refpage='VkSubpassEndInfoKHR',desc='Structure specifying subpass end info',type='structs'] +-- + +The sname:VkSubpassEndInfoKHR structure is defined as: + +include::../api/structs/VkSubpassEndInfoKHR.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + +include::../validity/structs/VkSubpassEndInfoKHR.txt[] +-- + +endif::VK_KHR_create_renderpass2[] + diff --git a/chapters/synchronization.txt b/chapters/synchronization.txt index bd4c9d32..64de9700 100644 --- a/chapters/synchronization.txt +++ b/chapters/synchronization.txt @@ -298,6 +298,11 @@ ifdef::VK_NVX_device_generated_commands[] the pipeline where device-side generation of commands via flink:vkCmdProcessCommandsNVX is handled. endif::VK_NVX_device_generated_commands[] +ifdef::VK_EXT_conditional_rendering[] + * ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT specifies the + stage of the pipeline where the predicate of conditional rendering is + consumed. +endif::VK_EXT_conditional_rendering[] * ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT specifies the stage of the pipeline where Draw/DispatchIndirect data structures are consumed. ifdef::VK_NVX_device_generated_commands[] @@ -349,6 +354,9 @@ endif::VK_NVX_device_generated_commands[] * ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of: ** ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT +ifdef::VK_EXT_conditional_rendering[] + ** ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT +endif::VK_EXT_conditional_rendering[] ** ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT ** ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT ** ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT @@ -443,6 +451,9 @@ and <>. |==== |Pipeline stage flag | Required queue capability flag |ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT | None required +ifdef::VK_EXT_conditional_rendering[] +|ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +endif::VK_EXT_conditional_rendering[] |ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT |ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | ename:VK_QUEUE_GRAPHICS_BIT |ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT @@ -537,6 +548,13 @@ guaranteed: * ename:VK_PIPELINE_STAGE_HOST_BIT +ifdef::VK_EXT_conditional_rendering[] +For conditional rendering operations, the pipeline stage where predicate +read happens has no particular order relative to other stages. + + * ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT +endif::VK_EXT_conditional_rendering[] + ifdef::VK_NVX_device_generated_commands[] For the command processing pipeline, the following stages occur in this order: @@ -574,6 +592,10 @@ Access types that can: be set in an access mask include: include::../api/enums/VkAccessFlagBits.txt[] +ifdef::VK_EXT_conditional_rendering[] + * ename:VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT specifies read access + to a predicate as part of conditional rendering. +endif::VK_EXT_conditional_rendering[] * ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT specifies read access to an indirect command structure read as part of an indirect drawing or dispatch command. @@ -673,6 +695,9 @@ perform that type of access. [cols="50,50",options="header"] |==== |Access flag | Supported pipeline stages +ifdef::VK_EXT_conditional_rendering[] +|ename:VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT | ename:VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT +endif::VK_EXT_conditional_rendering[] |ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT | ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT |ename:VK_ACCESS_INDEX_READ_BIT | ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT |ename:VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT diff --git a/config/vu-to-json/extension.rb b/config/vu-to-json/extension.rb index 5ffb1f05..ac66d558 100644 --- a/config/vu-to-json/extension.rb +++ b/config/vu-to-json/extension.rb @@ -191,7 +191,10 @@ class ValidUsageToJsonTreeprocessor < Extensions::Treeprocessor # Print out a list of VUIDs that were not extracted if detected_vuid_list.length != 0 - puts 'The following VUIDs were not successfully extracted from the spec:' + puts 'Some VUIDs were not successfully extracted from the specification.' + puts 'This is usually down to them appearing outside of a refpage (open)' + puts 'block; try checking where they are included.' + puts 'The following VUIDs were not extracted:' detected_vuid_list.each do |vuid| puts "\t * " + vuid end diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index 93aa65b5..06c86070 100644 --- a/include/vulkan/vulkan_core.h +++ b/include/vulkan/vulkan_core.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 79 +#define VK_HEADER_VERSION 80 #define VK_NULL_HANDLE 0 @@ -320,6 +320,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, + VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, @@ -341,6 +344,13 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, + VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR = 1000109000, + VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR = 1000109001, + VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR = 1000109002, + VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR = 1000109003, + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR = 1000109004, + VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR = 1000109005, + VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR = 1000109006, VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, @@ -389,6 +399,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, @@ -1367,6 +1378,7 @@ typedef enum VkPipelineStageFlagBits { VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, + VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000, VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineStageFlagBits; @@ -1455,6 +1467,7 @@ typedef enum VkBufferUsageFlagBits { VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, + VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200, VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkBufferUsageFlagBits; typedef VkFlags VkBufferUsageFlags; @@ -1566,6 +1579,7 @@ typedef enum VkAccessFlagBits { VK_ACCESS_HOST_WRITE_BIT = 0x00004000, VK_ACCESS_MEMORY_READ_BIT = 0x00008000, VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, + VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000, VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, @@ -5435,6 +5449,114 @@ VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( const void* pData); #endif +#define VK_KHR_create_renderpass2 1 +#define VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION 1 +#define VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME "VK_KHR_create_renderpass2" + +typedef struct VkAttachmentDescription2KHR { + VkStructureType sType; + const void* pNext; + VkAttachmentDescriptionFlags flags; + VkFormat format; + VkSampleCountFlagBits samples; + VkAttachmentLoadOp loadOp; + VkAttachmentStoreOp storeOp; + VkAttachmentLoadOp stencilLoadOp; + VkAttachmentStoreOp stencilStoreOp; + VkImageLayout initialLayout; + VkImageLayout finalLayout; +} VkAttachmentDescription2KHR; + +typedef struct VkAttachmentReference2KHR { + VkStructureType sType; + const void* pNext; + uint32_t attachment; + VkImageLayout layout; + VkImageAspectFlags aspectMask; +} VkAttachmentReference2KHR; + +typedef struct VkSubpassDescription2KHR { + VkStructureType sType; + const void* pNext; + VkSubpassDescriptionFlags flags; + VkPipelineBindPoint pipelineBindPoint; + uint32_t viewMask; + uint32_t inputAttachmentCount; + const VkAttachmentReference2KHR* pInputAttachments; + uint32_t colorAttachmentCount; + const VkAttachmentReference2KHR* pColorAttachments; + const VkAttachmentReference2KHR* pResolveAttachments; + const VkAttachmentReference2KHR* pDepthStencilAttachment; + uint32_t preserveAttachmentCount; + const uint32_t* pPreserveAttachments; +} VkSubpassDescription2KHR; + +typedef struct VkSubpassDependency2KHR { + VkStructureType sType; + const void* pNext; + uint32_t srcSubpass; + uint32_t dstSubpass; + VkPipelineStageFlags srcStageMask; + VkPipelineStageFlags dstStageMask; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkDependencyFlags dependencyFlags; + int32_t viewOffset; +} VkSubpassDependency2KHR; + +typedef struct VkRenderPassCreateInfo2KHR { + VkStructureType sType; + const void* pNext; + VkRenderPassCreateFlags flags; + uint32_t attachmentCount; + const VkAttachmentDescription2KHR* pAttachments; + uint32_t subpassCount; + const VkSubpassDescription2KHR* pSubpasses; + uint32_t dependencyCount; + const VkSubpassDependency2KHR* pDependencies; + uint32_t correlatedViewMaskCount; + const uint32_t* pCorrelatedViewMasks; +} VkRenderPassCreateInfo2KHR; + +typedef struct VkSubpassBeginInfoKHR { + VkStructureType sType; + const void* pNext; + VkSubpassContents contents; +} VkSubpassBeginInfoKHR; + +typedef struct VkSubpassEndInfoKHR { + VkStructureType sType; + const void* pNext; +} VkSubpassEndInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass2KHR)(VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); +typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo); +typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassBeginInfoKHR* pSubpassBeginInfo, const VkSubpassEndInfoKHR* pSubpassEndInfo); +typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass2KHR)(VkCommandBuffer commandBuffer, const VkSubpassEndInfoKHR* pSubpassEndInfo); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2KHR( + VkDevice device, + const VkRenderPassCreateInfo2KHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2KHR( + VkCommandBuffer commandBuffer, + const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfoKHR* pSubpassBeginInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2KHR( + VkCommandBuffer commandBuffer, + const VkSubpassBeginInfoKHR* pSubpassBeginInfo, + const VkSubpassEndInfoKHR* pSubpassEndInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR( + VkCommandBuffer commandBuffer, + const VkSubpassEndInfoKHR* pSubpassEndInfo); +#endif + #define VK_KHR_shared_presentable_image 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 #define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" @@ -5843,6 +5965,20 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR( uint32_t stride); #endif +#define VK_KHR_8bit_storage 1 +#define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1 +#define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage" + +typedef struct VkPhysicalDevice8BitStorageFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 storageBuffer8BitAccess; + VkBool32 uniformAndStorageBuffer8BitAccess; + VkBool32 storagePushConstant8; +} VkPhysicalDevice8BitStorageFeaturesKHR; + + + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) @@ -6293,6 +6429,51 @@ typedef struct VkValidationFlagsEXT { #define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" +#define VK_EXT_conditional_rendering 1 +#define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 1 +#define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering" + + +typedef enum VkConditionalRenderingFlagBitsEXT { + VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 0x00000001, + VK_CONDITIONAL_RENDERING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF +} VkConditionalRenderingFlagBitsEXT; +typedef VkFlags VkConditionalRenderingFlagsEXT; + +typedef struct VkConditionalRenderingBeginInfoEXT { + VkStructureType sType; + const void* pNext; + VkBuffer buffer; + VkDeviceSize offset; + VkConditionalRenderingFlagsEXT flags; +} VkConditionalRenderingBeginInfoEXT; + +typedef struct VkPhysicalDeviceConditionalRenderingFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 conditionalRendering; + VkBool32 inheritedConditionalRendering; +} VkPhysicalDeviceConditionalRenderingFeaturesEXT; + +typedef struct VkCommandBufferInheritanceConditionalRenderingInfoEXT { + VkStructureType sType; + const void* pNext; + VkBool32 conditionalRenderingEnable; +} VkCommandBufferInheritanceConditionalRenderingInfoEXT; + + +typedef void (VKAPI_PTR *PFN_vkCmdBeginConditionalRenderingEXT)(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); +typedef void (VKAPI_PTR *PFN_vkCmdEndConditionalRenderingEXT)(VkCommandBuffer commandBuffer); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdBeginConditionalRenderingEXT( + VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT( + VkCommandBuffer commandBuffer); +#endif + #define VK_NVX_device_generated_commands 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) diff --git a/reflow_count.py b/reflow_count.py index 5602c4d7..3a69ff33 100644 --- a/reflow_count.py +++ b/reflow_count.py @@ -1,2 +1,2 @@ # The value to start tagging VU statements at, unless overridden by -nextvu -startVUID = 1977 +startVUID = 1988 diff --git a/xml/vk.xml b/xml/vk.xml index 2a048291..4419c6fb 100644 --- a/xml/vk.xml +++ b/xml/vk.xml @@ -146,7 +146,7 @@ server. // Vulkan 1.1 version number #define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 79 +#define VK_HEADER_VERSION 80 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -305,6 +305,7 @@ server. typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; typedef VkFlags VkDescriptorBindingFlagsEXT; + typedef VkFlags VkConditionalRenderingFlagsEXT; Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) @@ -437,6 +438,7 @@ server. + Extensions @@ -2698,6 +2700,13 @@ server. void* pNext VkBool32 supportsTextureGatherLODBiasAMD + + VkStructureType sType + const void* pNext + VkBuffer buffer + VkDeviceSize offset + VkConditionalRenderingFlagsEXT flags + VkStructureType sType const void* pNext @@ -3049,6 +3058,75 @@ server. void* pNext uint32_t maxVariableDescriptorCount + + VkStructureType sType + const void* pNext + VkAttachmentDescriptionFlags flags + VkFormat format + VkSampleCountFlagBits samples + VkAttachmentLoadOp loadOpLoad operation for color or depth data + VkAttachmentStoreOp storeOpStore operation for color or depth data + VkAttachmentLoadOp stencilLoadOpLoad operation for stencil data + VkAttachmentStoreOp stencilStoreOpStore operation for stencil data + VkImageLayout initialLayout + VkImageLayout finalLayout + + + VkStructureType sType + const void* pNext + uint32_t attachment + VkImageLayout layout + VkImageAspectFlags aspectMask + + + VkStructureType sType + const void* pNext + VkSubpassDescriptionFlags flags + VkPipelineBindPoint pipelineBindPoint + uint32_t viewMask + uint32_t inputAttachmentCount + const VkAttachmentReference2KHR* pInputAttachments + uint32_t colorAttachmentCount + const VkAttachmentReference2KHR* pColorAttachments + const VkAttachmentReference2KHR* pResolveAttachments + const VkAttachmentReference2KHR* pDepthStencilAttachment + uint32_t preserveAttachmentCount + const uint32_t* pPreserveAttachments + + + VkStructureType sType + const void* pNext + uint32_t srcSubpass + uint32_t dstSubpass + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkDependencyFlags dependencyFlags + int32_t viewOffset + + + VkStructureType sType + const void* pNext + VkRenderPassCreateFlags flags + uint32_t attachmentCount + const VkAttachmentDescription2KHR* pAttachments + uint32_t subpassCount + const VkSubpassDescription2KHR* pSubpasses + uint32_t dependencyCount + const VkSubpassDependency2KHR* pDependencies + uint32_t correlatedViewMaskCount + const uint32_t* pCorrelatedViewMasks + + + VkStructureType sType + const void* pNext + VkSubpassContents contents + + + VkStructureType sType + const void* pNext + uint32_t binding uint32_t divisor @@ -3097,11 +3175,29 @@ server. VkChromaLocation suggestedXChromaOffset VkChromaLocation suggestedYChromaOffset + + VkStructureType sType + const void* pNext + VkBool32 conditionalRenderingEnableWhether this secondary command buffer may be executed during an active conditional rendering + VkStructureType sType void* pNext uint64_t externalFormat + + VkStructureType sType + void* pNext + VkBool32 storageBuffer8BitAccess8-bit integer variables supported in StorageBuffer + VkBool32 uniformAndStorageBuffer8BitAccess8-bit integer variables supported in StorageBuffer and Uniform + VkBool32 storagePushConstant88-bit integer variables supported in PushConstant + + + VkStructureType sType + void* pNext + VkBool32 conditionalRendering + VkBool32 inheritedConditionalRendering + Vulkan enumerant (token) definitions @@ -4184,6 +4280,9 @@ server. + + + @@ -5081,6 +5180,15 @@ server. VkQueryPool queryPool uint32_t query + + void vkCmdBeginConditionalRenderingEXT + VkCommandBuffer commandBuffer + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin + + + void vkCmdEndConditionalRenderingEXT + VkCommandBuffer commandBuffer + void vkCmdResetQueryPool VkCommandBuffer commandBuffer @@ -6075,6 +6183,30 @@ server. VkDeviceSize dstOffset uint32_t marker + + VkResult vkCreateRenderPass2KHR + VkDevice device + const VkRenderPassCreateInfo2KHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkRenderPass* pRenderPass + + + void vkCmdBeginRenderPass2KHR + VkCommandBuffer commandBuffer + const VkRenderPassBeginInfo* pRenderPassBegin + const VkSubpassBeginInfoKHR* pSubpassBeginInfo + + + void vkCmdNextSubpass2KHR + VkCommandBuffer commandBuffer + const VkSubpassBeginInfoKHR* pSubpassBeginInfo + const VkSubpassEndInfoKHR* pSubpassEndInfo + + + void vkCmdEndRenderPass2KHR + VkCommandBuffer commandBuffer + const VkSubpassEndInfoKHR* pSubpassEndInfo + VkResult vkGetAndroidHardwareBufferPropertiesANDROID VkDevice device @@ -7535,10 +7667,23 @@ server. - + - - + + + + + + + + + + + + + + + @@ -7847,10 +7992,21 @@ server. - + - - + + + + + + + + + + + + + @@ -8608,10 +8764,12 @@ server. - + - - + + + + @@ -8838,5 +8996,17 @@ server. + + + + + + + + + + + +