diff options
Diffstat (limited to 'chapters/pipelines.adoc')
-rw-r--r-- | chapters/pipelines.adoc | 183 |
1 files changed, 68 insertions, 115 deletions
diff --git a/chapters/pipelines.adoc b/chapters/pipelines.adoc index 5dfee39a..2d88b2e5 100644 --- a/chapters/pipelines.adoc +++ b/chapters/pipelines.adoc @@ -305,20 +305,18 @@ include::{chapters}/commonvalidity/compute_graph_pipeline_create_info_common.ado stage must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxPerStageResources ifdef::VK_KHR_pipeline_library[] -ifndef::VK_AMDX_shader_enqueue[] - * [[VUID-VkComputePipelineCreateInfo-flags-03364]] - pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR -endif::VK_AMDX_shader_enqueue[] -endif::VK_KHR_pipeline_library[] -ifdef::VK_AMDX_shader_enqueue[] * [[VUID-VkComputePipelineCreateInfo-shaderEnqueue-09177]] +ifdef::VK_AMDX_shader_enqueue[] If <<features-shaderEnqueue,pname:shaderEnqueue>> is not enabled, +endif::VK_AMDX_shader_enqueue[] pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR +ifdef::VK_AMDX_shader_enqueue[] * [[VUID-VkComputePipelineCreateInfo-flags-09178]] If pname:flags does not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the shader specified by pname:stage must: not declare the code:ShaderEnqueueAMDX capability endif::VK_AMDX_shader_enqueue[] +endif::VK_KHR_pipeline_library[] ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] * [[VUID-VkComputePipelineCreateInfo-pipelineStageCreationFeedbackCount-06566]] If @@ -563,19 +561,15 @@ ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set, the <<features-computeFullSubgroups, pname:computeFullSubgroups>> feature must: be enabled -ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] * [[VUID-VkPipelineShaderStageCreateInfo-flags-08988]] If pname:flags includes ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, - pname:stage must: be one of ename:VK_SHADER_STAGE_MESH_BIT_EXT, - ename:VK_SHADER_STAGE_TASK_BIT_EXT, or ename:VK_SHADER_STAGE_COMPUTE_BIT -endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] -ifndef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] - * [[VUID-VkPipelineShaderStageCreateInfo-flags-08989]] - If pname:flags includes - ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, - pname:stage must: be ename:VK_SHADER_STAGE_COMPUTE_BIT + pname:stage must: be +ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] + one of ename:VK_SHADER_STAGE_MESH_BIT_EXT, + ename:VK_SHADER_STAGE_TASK_BIT_EXT, or endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] + ename:VK_SHADER_STAGE_COMPUTE_BIT * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02754]] If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pname:pNext chain, pname:flags must: not have the @@ -628,74 +622,55 @@ ifdef::VK_KHR_cooperative_matrix[] <<limits-subgroup-size,pname:subgroupSize>>. endif::VK_KHR_cooperative_matrix[] endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] -ifndef::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-module-06716]] + + * [[VUID-VkPipelineShaderStageCreateInfo-stage-08771]] +ifdef::VK_EXT_shader_module_identifier[] + If a shader module identifier is not specified for this pname:stage, +endif::VK_EXT_shader_module_identifier[] pname:module must: be a valid slink:VkShaderModule -endif::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] +ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] + if none of the following features are enabled: +ifdef::VK_EXT_graphics_pipeline_library[] + ** <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>> +endif::VK_EXT_graphics_pipeline_library[] +ifdef::VK_KHR_maintenance5[] + ** <<features-maintenance5, pname:maintenance5>> +endif::VK_KHR_maintenance5[] +endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] + +ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] + * [[VUID-VkPipelineShaderStageCreateInfo-stage-06845]] +ifdef::VK_EXT_shader_module_identifier[] + If a shader module identifier is not specified for this pname:stage, + pname:module must: be a valid slink:VkShaderModule, or +endif::VK_EXT_shader_module_identifier[] +ifndef::VK_EXT_shader_module_identifier[] + If pname:module is dlink:VK_NULL_HANDLE] +endif::VK_EXT_shader_module_identifier[] + there must: be a valid slink:VkShaderModuleCreateInfo structure in the + pname:pNext chain +endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] + ifdef::VK_EXT_shader_module_identifier[] ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] * [[VUID-VkPipelineShaderStageCreateInfo-stage-06844]] If a shader module identifier is specified for this pname:stage, a slink:VkShaderModuleCreateInfo structure must: not be present in the pname:pNext chain - * [[VUID-VkPipelineShaderStageCreateInfo-stage-06845]] - If a shader module identifier is not specified for this pname:stage, - pname:module must: be a valid slink:VkShaderModule or there must: be a - valid slink:VkShaderModuleCreateInfo structure in the pname:pNext chain -ifndef::VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-stage-06846]] - If a shader module identifier is not specified for this pname:stage, and - the <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>> - feature is not enabled, pname:module must: be a valid - slink:VkShaderModule -endif::VK_KHR_maintenance5[] -ifdef::VK_EXT_graphics_pipeline_library+VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-stage-08771]] - If a shader module identifier is not specified for this pname:stage, and - neither the <<features-maintenance5, pname:maintenance5>> nor - <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>> - feature are enabled, pname:module must: be a valid slink:VkShaderModule -endif::VK_EXT_graphics_pipeline_library+VK_KHR_maintenance5[] -ifndef::VK_EXT_graphics_pipeline_library[] - * [[VUID-VkPipelineShaderStageCreateInfo-stage-08772]] - If a shader module identifier is not specified for this pname:stage, and - the <<features-maintenance5, pname:maintenance5>> feature is not - enabled, pname:module must: be a valid slink:VkShaderModule -endif::VK_EXT_graphics_pipeline_library[] -endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] -ifndef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-stage-06847]] - If a shader identifier is not specified for this pname:stage, - pname:module must: be a valid slink:VkShaderModule endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] * [[VUID-VkPipelineShaderStageCreateInfo-stage-06848]] If a shader module identifier is specified for this pname:stage, pname:module must: be dlink:VK_NULL_HANDLE +endif::VK_EXT_shader_module_identifier[] * [[VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849]] - If a shader module identifier is not specified, the shader code used by - the pipeline must: be valid as described by the <<spirv-spec,Khronos - SPIR-V Specification>> after applying the specializations provided in - pname:pSpecializationInfo, if any, and then converting all - specialization constants into fixed constants +ifdef::VK_EXT_shader_module_identifier[] + If a shader module identifier is not specified, the endif::VK_EXT_shader_module_identifier[] -ifndef::VK_EXT_shader_module_identifier[] -ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] -ifndef::VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-graphicsPipelineLibrary-06717]] - If the <<features-graphicsPipelineLibrary, - pname:graphicsPipelineLibrary>> feature is not enabled, pname:module - must: be a valid slink:VkShaderModule -endif::VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-module-06718]] - If pname:module is dlink:VK_NULL_HANDLE, there must: be a valid - slink:VkShaderModuleCreateInfo structure in the pname:pNext chain -endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] - * [[VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06719]] - The shader code used by the pipeline must: be valid as described by the +ifndef::VK_EXT_shader_module_identifier[The] + shader code used by the pipeline must: be valid as described by the <<spirv-spec,Khronos SPIR-V Specification>> after applying the specializations provided in pname:pSpecializationInfo, if any, and then converting all specialization constants into fixed constants -endif::VK_EXT_shader_module_identifier[] **** include::{generated}/validity/structs/VkPipelineShaderStageCreateInfo.adoc[] @@ -1814,11 +1789,12 @@ endif::VKSC_VERSION_1_0[] **** :pipelineType: graphics include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[] -ifndef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] - * [[VUID-VkGraphicsPipelineCreateInfo-stage-00727]] + * [[VUID-VkGraphicsPipelineCreateInfo-stage-02096]] If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader state>> the pname:stage member of one element of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT +ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] + or ename:VK_SHADER_STAGE_MESH_BIT_EXT endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02095]] @@ -1831,11 +1807,6 @@ ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or ename:VK_SHADER_STAGE_GEOMETRY_BIT) - * [[VUID-VkGraphicsPipelineCreateInfo-stage-02096]] - If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, - pre-rasterization shader state>> the pname:stage member of one element - of pname:pStages must: be either ename:VK_SHADER_STAGE_VERTEX_BIT or - ename:VK_SHADER_STAGE_MESH_BIT_EXT endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] ifdef::VK_NV_mesh_shader+VK_EXT_mesh_shader[] * [[VUID-VkGraphicsPipelineCreateInfo-TaskNV-07063]] @@ -1854,23 +1825,18 @@ endif::VK_NV_mesh_shader+VK_EXT_mesh_shader[] pre-rasterization shader state>> and pname:pStages includes a tessellation evaluation shader stage, it must: include a tessellation control shader stage -ifndef::VK_EXT_extended_dynamic_state3[] - * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00731]] - If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, - pre-rasterization shader state>> and pname:pStages includes a - tessellation control shader stage and a tessellation evaluation shader - stage, pname:pTessellationState must: be a valid pointer to a valid - slink:VkPipelineTessellationStateCreateInfo structure -endif::VK_EXT_extended_dynamic_state3[] -ifdef::VK_EXT_extended_dynamic_state3[] * [[VUID-VkGraphicsPipelineCreateInfo-pStages-09022]] If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader state>> and pname:pStages includes a - tessellation control shader stage, and the - `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled or the - ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state is not - set, pname:pTessellationState must: be a valid pointer to a valid + tessellation control shader stage, +ifdef::VK_EXT_extended_dynamic_state3[] + and the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled + or the ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state is + not set, +endif::VK_EXT_extended_dynamic_state3[] + pname:pTessellationState must: be a valid pointer to a valid slink:VkPipelineTessellationStateCreateInfo structure +ifdef::VK_EXT_extended_dynamic_state3[] * [[VUID-VkGraphicsPipelineCreateInfo-pTessellationState-09023]] If pname:pTessellationState is not `NULL` it must: be a pointer to a valid slink:VkPipelineTessellationStateCreateInfo structure @@ -1899,45 +1865,32 @@ endif::VK_EXT_extended_dynamic_state3[] shader stages, and the shader code of both contain an code:OpExecutionMode instruction specifying the out patch size in the pipeline, they must: both specify the same patch size -ifndef::VK_EXT_extended_dynamic_state3[] - * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00736]] - If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, - pre-rasterization shader state>> and - <<pipelines-graphics-subsets-vertex-input, vertex input state>> and - pname:pStages includes tessellation shader stages, the pname:topology - member of pname:pInputAssembly must: be - ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - * [[VUID-VkGraphicsPipelineCreateInfo-topology-00737]] - If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, - pre-rasterization shader state>> and - <<pipelines-graphics-subsets-vertex-input, vertex input state>> and the - pname:topology member of pname:pInputAssembly is - ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, pname:pStages must: include - tessellation shader stages -endif::VK_EXT_extended_dynamic_state3[] -ifdef::VK_EXT_extended_dynamic_state3[] * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08888]] If the pipeline is being created with <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader state>> and <<pipelines-graphics-subsets-vertex-input, vertex input - state>> and pname:pStages includes tessellation shader stages, and - either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not - enabled or + state>> and pname:pStages includes tessellation shader stages, +ifdef::VK_EXT_extended_dynamic_state3[] + and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is + not enabled or <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> - is ename:VK_FALSE, the pname:topology member of pname:pInputAssembly - must: be ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST + is ename:VK_FALSE, +endif::VK_EXT_extended_dynamic_state3[] + the pname:topology member of pname:pInputAssembly must: be + ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST * [[VUID-VkGraphicsPipelineCreateInfo-topology-08889]] If the pipeline is being created with <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader state>> and <<pipelines-graphics-subsets-vertex-input, vertex input state>> and the pname:topology member of pname:pInputAssembly is - ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, and either - ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not enabled - or + ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, +ifdef::VK_EXT_extended_dynamic_state3[] + and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is + not enabled or <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> - is ename:VK_FALSE, then pname:pStages must: include tessellation shader - stages + is ename:VK_FALSE, endif::VK_EXT_extended_dynamic_state3[] + then pname:pStages must: include tessellation shader stages * [[VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723]] If the pipeline is being created with a code:TessellationEvaluation {ExecutionModel}, no code:Geometry {ExecutionModel}, uses the @@ -8692,7 +8645,7 @@ endif::VK_NV_device_generated_commands[] ifdef::VK_EXT_shader_object[] [[pipelines-shader-object-interaction]] -=== Interaction with Shader Objects +=== Interaction With Shader Objects If the <<features-shaderObject, pname:shaderObject>> feature is enabled, applications can: use both pipelines and <<shaders-objects, shader objects>> |