1// Copyright 2015-2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[[pipelines]] 6= Pipelines 7 8The following <<pipelines-block-diagram,figure>> shows a block diagram of 9the Vulkan pipelines. 10Some Vulkan commands specify geometric objects to be drawn or computational 11work to be performed, while others specify state controlling how objects are 12handled by the various pipeline stages, or control data transfer between 13memory organized as images and buffers. 14Commands are effectively sent through a processing pipeline, either a 15_graphics pipeline_, 16ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 17a _ray tracing pipeline_, 18endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 19or a _compute pipeline_. 20 21ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 22The graphics pipeline can be operated in two modes, as either _primitive 23shading_ or _mesh shading_ pipeline. 24 25*Primitive Shading* 26 27endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 28 29The first stage of the <<pipelines-graphics,graphics pipeline>> 30(<<drawing,Input Assembler>>) assembles vertices to form geometric 31primitives such as points, lines, and triangles, based on a requested 32primitive topology. 33In the next stage (<<shaders-vertex,Vertex Shader>>) vertices can: be 34transformed, computing positions and attributes for each vertex. 35If <<tessellation,tessellation>> and/or <<geometry,geometry>> shaders are 36supported, they can: then generate multiple primitives from a single input 37primitive, possibly changing the primitive topology or generating additional 38attribute data in the process. 39 40ifdef::VK_HUAWEI_cluster_culling_shader[] 41*Cluster Culling Shading* 42 43When using the Cluster Culling Shader, a compute-like shader will perform 44cluster-based culling, a set of new built-in output variables are used to 45express visible cluster, in addition, a new built-in function is used to 46emit these variables from the cluster culling shader to the Input 47Assembler(IA) stage, then IA can use these variables to fetches vertices of 48visible cluster and drive vertex shader to work. 49 50endif::VK_HUAWEI_cluster_culling_shader[] 51 52ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 53*Mesh Shading* 54 55When using the <<mesh,_mesh shading_>> pipeline input primitives are not 56assembled implicitly, but explicitly through the (<<shaders-mesh,Mesh 57Shader>>). 58The work on the mesh pipeline is initiated by the application 59<<drawing-mesh-shading,drawing>> a set of mesh tasks. 60 61If an optional (<<shaders-task,Task Shader>>) is active, each task triggers 62the execution of a task shader workgroup that will generate a new set of 63tasks upon completion. 64Each of these spawned tasks, or each of the original dispatched tasks if no 65task shader is present, triggers the execution of a mesh shader workgroup 66that produces an output mesh with a variable-sized number of primitives 67assembled from vertices stored in the output mesh. 68 69*Common* 70endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 71 72The final resulting primitives are <<vertexpostproc-clipping,clipped>> to a 73clip volume in preparation for the next stage, <<primsrast,Rasterization>>. 74The rasterizer produces a series of _fragments_ associated with a region of 75the framebuffer, from a two-dimensional description of a point, line 76segment, or triangle. 77These fragments are processed by <<fragops,fragment operations>> to 78determine whether generated values will be written to the framebuffer. 79<<fragops-shader, Fragment shading>> determines the values to be written to 80the framebuffer attachments. 81Framebuffer operations then read and write the color and depth/stencil 82attachments of the framebuffer for a given subpass of a <<renderpass,render 83pass instance>>. 84The attachments can: be used as input attachments in the fragment shader in 85a later subpass of the same render pass. 86 87The <<pipelines-compute,compute pipeline>> is a separate pipeline from the 88graphics pipeline, which operates on one-, two-, or three-dimensional 89workgroups which can: read from and write to buffer and image memory. 90 91This ordering is meant only as a tool for describing Vulkan, not as a strict 92rule of how Vulkan is implemented, and we present it only as a means to 93organize the various operations of the pipelines. 94Actual ordering guarantees between pipeline stages are explained in detail 95in the <<synchronization-pipeline-stages-order, synchronization chapter>>. 96 97[[pipelines-block-diagram]] 98ifndef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 99image::{images}/pipeline.svg[title="Block diagram of the Vulkan pipeline",align="center",opts="{imageopts}"] 100endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 101ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 102image::{images}/pipelinemesh.svg[title="Block diagram of the Vulkan pipeline",align="center",opts="{imageopts}"] 103endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 104 105Each pipeline is controlled by a monolithic object created from a 106description of all of the shader stages and any relevant fixed-function 107stages. 108<<interfaces,Linking>> the whole pipeline together allows the optimization 109of shaders based on their input/outputs and eliminates expensive draw time 110state validation. 111 112A pipeline object is bound to the current state using 113flink:vkCmdBindPipeline. 114Any pipeline object state that is specified as <<pipelines-dynamic-state, 115dynamic>> is not applied to the current state when the pipeline object is 116bound, but is instead set by dynamic state setting commands. 117 118No state, including dynamic state, is inherited from one command buffer to 119another. 120 121 122[open,refpage='VkPipeline',desc='Opaque handle to a pipeline object',type='handles'] 123-- 124Compute, 125ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 126ray tracing, 127endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 128and graphics pipelines are each represented by sname:VkPipeline handles: 129 130include::{generated}/api/handles/VkPipeline.adoc[] 131-- 132 133 134[[pipelines-compute]] 135== Compute Pipelines 136 137Compute pipelines consist of a single static compute shader stage and the 138pipeline layout. 139 140The compute pipeline represents a compute shader and is created by calling 141fname:vkCreateComputePipelines 142ifndef::VKSC_VERSION_1_0[] 143with pname:module and pname:pName selecting an entry point from a shader 144module, where that entry point defines a valid compute shader, in the 145slink:VkPipelineShaderStageCreateInfo structure contained within the 146slink:VkComputePipelineCreateInfo structure. 147endif::VKSC_VERSION_1_0[] 148ifdef::VKSC_VERSION_1_0[] 149with an offline compiled pipeline provided in pname:pipelineCache and the 150pipeline identified by slink:VkPipelineOfflineCreateInfo structure in the 151pname:pNext chain of slink:VkComputePipelineCreateInfo structure. 152endif::VKSC_VERSION_1_0[] 153 154 155[open,refpage='vkCreateComputePipelines',desc='Creates a new compute pipeline object',type='protos'] 156-- 157:refpage: vkCreateComputePipelines 158:objectnameplural: compute pipelines 159:objectnamecamelcase: computePipeline 160:objectcount: pname:createInfoCount 161 162To create compute pipelines, call: 163 164include::{generated}/api/protos/vkCreateComputePipelines.adoc[] 165 166 * pname:device is the logical device that creates the compute pipelines. 167ifndef::VKSC_VERSION_1_0[] 168 * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that 169 pipeline caching is disabled; or the handle of a valid 170 <<pipelines-cache,pipeline cache>> object, in which case use of that 171 cache is enabled for the duration of the command. 172endif::VKSC_VERSION_1_0[] 173ifdef::VKSC_VERSION_1_0[] 174 * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline 175 cache>> object. 176endif::VKSC_VERSION_1_0[] 177 * pname:createInfoCount is the length of the pname:pCreateInfos and 178 pname:pPipelines arrays. 179 * pname:pCreateInfos is a pointer to an array of 180 slink:VkComputePipelineCreateInfo structures. 181 * pname:pAllocator controls host memory allocation as described in the 182 <<memory-allocation, Memory Allocation>> chapter. 183 * pname:pPipelines is a pointer to an array of slink:VkPipeline handles in 184 which the resulting compute pipeline objects are returned. 185ifdef::editing-notes[] 186+ 187[NOTE] 188.editing-note 189==== 190TODO (Jon) - Should we say something like "`the i'th element of the 191pname:pPipelines array is created based on the corresponding element of the 192pname:pCreateInfos array`"? Also for flink:vkCreateGraphicsPipelines below. 193==== 194endif::editing-notes[] 195 196ifdef::VKSC_VERSION_1_0[] 197If a pipeline creation fails due to: 198 199 * The identified pipeline not being present in pname:pipelineCache 200 * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo 201 structure 202 203the operation will continue as specified in <<pipelines-multiple, Multiple 204Pipeline Creation>> and the command will return 205ename:VK_ERROR_NO_PIPELINE_MATCH. 206ifdef::hidden[] 207// tag::scdeviation[] 208 * flink:vkCreateComputePipelines returns ename:VK_ERROR_NO_PIPELINE_MATCH 209 if the slink:VkComputePipelineCreateInfo::pname:pNext chain does not 210 include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>. 211// end::scdeviation[] 212endif::hidden[] 213endif::VKSC_VERSION_1_0[] 214 215include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[] 216 217.Valid Usage 218**** 219ifndef::VKSC_VERSION_1_0[] 220 * [[VUID-vkCreateComputePipelines-flags-00695]] 221 If the pname:flags member of any element of pname:pCreateInfos contains 222 the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the 223 pname:basePipelineIndex member of that same element is not `-1`, 224 pname:basePipelineIndex must: be less than the index into 225 pname:pCreateInfos that corresponds to that element 226 * [[VUID-vkCreateComputePipelines-flags-00696]] 227 If the pname:flags member of any element of pname:pCreateInfos contains 228 the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline 229 must: have been created with the 230 ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set 231endif::VKSC_VERSION_1_0[] 232ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 233 * [[VUID-vkCreateComputePipelines-pipelineCache-02873]] 234 If pname:pipelineCache was created with 235 ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access 236 to pname:pipelineCache must: be 237 <<fundamentals-threadingbehavior,externally synchronized>> 238endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 239include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[] 240**** 241ifdef::VKSC_VERSION_1_0[] 242ifdef::hidden[] 243// tag::scdeviation[] 244 * flink:vkCreateComputePipelines::pname:pipelineCache must: not be 245 dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>. 246// end::scdeviation[] 247endif::hidden[] 248endif::VKSC_VERSION_1_0[] 249 250include::{generated}/validity/protos/vkCreateComputePipelines.adoc[] 251-- 252 253[open,refpage='VkComputePipelineCreateInfo',desc='Structure specifying parameters of a newly created compute pipeline',type='structs'] 254-- 255:refpage: VkComputePipelineCreateInfo 256 257The sname:VkComputePipelineCreateInfo structure is defined as: 258 259include::{generated}/api/structs/VkComputePipelineCreateInfo.adoc[] 260 261 * pname:sType is a elink:VkStructureType value identifying this structure. 262 * pname:pNext is `NULL` or a pointer to a structure extending this 263 structure. 264 * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying 265 how the pipeline will be generated. 266 * pname:stage is a slink:VkPipelineShaderStageCreateInfo structure 267 describing the compute shader. 268 * pname:layout is the description of binding locations used by both the 269 pipeline and descriptor sets used with the pipeline. 270 * pname:basePipelineHandle is a pipeline to derive from. 271ifdef::VKSC_VERSION_1_0[] 272 This is not used in Vulkan SC <<SCID-8>>. 273endif::VKSC_VERSION_1_0[] 274 * pname:basePipelineIndex is an index into the pname:pCreateInfos 275 parameter to use as a pipeline to derive from. 276ifdef::VKSC_VERSION_1_0[] 277 This is not used in Vulkan SC <<SCID-8>>. 278endif::VKSC_VERSION_1_0[] 279 280The parameters pname:basePipelineHandle and pname:basePipelineIndex are 281described in more detail in <<pipelines-pipeline-derivatives,Pipeline 282Derivatives>>. 283 284ifdef::VK_KHR_maintenance5[] 285If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the 286pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags 287from that structure is used instead of pname:flags from this structure. 288endif::VK_KHR_maintenance5[] 289 290.Valid Usage 291**** 292:pipelineType: compute 293include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[] 294include::{chapters}/commonvalidity/compute_graph_pipeline_create_info_common.adoc[] 295 * [[VUID-VkComputePipelineCreateInfo-stage-00701]] 296 The pname:stage member of pname:stage must: be 297 ename:VK_SHADER_STAGE_COMPUTE_BIT 298 * [[VUID-VkComputePipelineCreateInfo-stage-00702]] 299 The shader code for the entry point identified by pname:stage and the 300 rest of the state identified by this structure must: adhere to the 301 pipeline linking rules described in the <<interfaces,Shader Interfaces>> 302 chapter 303 * [[VUID-VkComputePipelineCreateInfo-layout-01687]] 304 The number of resources in pname:layout accessible to the compute shader 305 stage must: be less than or equal to 306 sname:VkPhysicalDeviceLimits::pname:maxPerStageResources 307ifdef::VK_KHR_pipeline_library[] 308 * [[VUID-VkComputePipelineCreateInfo-shaderEnqueue-09177]] 309ifdef::VK_AMDX_shader_enqueue[] 310 If <<features-shaderEnqueue,pname:shaderEnqueue>> is not enabled, 311endif::VK_AMDX_shader_enqueue[] 312 pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 313ifdef::VK_AMDX_shader_enqueue[] 314 * [[VUID-VkComputePipelineCreateInfo-flags-09178]] 315 If pname:flags does not include 316 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the shader specified by 317 pname:stage must: not declare the code:ShaderEnqueueAMDX capability 318endif::VK_AMDX_shader_enqueue[] 319endif::VK_KHR_pipeline_library[] 320ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 321 * [[VUID-VkComputePipelineCreateInfo-pipelineStageCreationFeedbackCount-06566]] 322 If 323 slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount 324 is not `0`, it must: be `1` 325endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 326ifdef::VK_EXT_opacity_micromap[] 327 * [[VUID-VkComputePipelineCreateInfo-flags-07367]] 328 pname:flags must: not include 329 ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT 330endif::VK_EXT_opacity_micromap[] 331ifdef::VK_NV_displacement_micromap[] 332 * [[VUID-VkComputePipelineCreateInfo-flags-07996]] 333 pname:flags must: not include 334 ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 335endif::VK_NV_displacement_micromap[] 336**** 337ifdef::VKSC_VERSION_1_0[] 338ifdef::hidden[] 339// tag::scdeviation[] 340 * slink:VkComputePipelineCreateInfo::pname:basePipelineHandle must: be 341 dlink:VK_NULL_HANDLE <<SCID-8>>. 342 * slink:VkComputePipelineCreateInfo::pname:basePipelineIndex must: be zero 343 <<SCID-8>>. 344// end::scdeviation[] 345endif::hidden[] 346endif::VKSC_VERSION_1_0[] 347 348include::{generated}/validity/structs/VkComputePipelineCreateInfo.adoc[] 349-- 350 351[open,refpage='VkPipelineShaderStageCreateInfo',desc='Structure specifying parameters of a newly created pipeline shader stage',type='structs'] 352-- 353The sname:VkPipelineShaderStageCreateInfo structure is defined as: 354 355include::{generated}/api/structs/VkPipelineShaderStageCreateInfo.adoc[] 356 357 * pname:sType is a elink:VkStructureType value identifying this structure. 358 * pname:pNext is `NULL` or a pointer to a structure extending this 359 structure. 360 * pname:flags is a bitmask of elink:VkPipelineShaderStageCreateFlagBits 361 specifying how the pipeline shader stage will be generated. 362 * pname:stage is a elink:VkShaderStageFlagBits value specifying a single 363 pipeline stage. 364ifdef::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] 365 * pname:module is optionally a slink:VkShaderModule object containing the 366 shader code for this stage. 367endif::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] 368ifndef::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] 369 * pname:module is a slink:VkShaderModule object containing the shader code 370 for this stage. 371endif::VK_EXT_graphics_pipeline_library,VK_EXT_shader_module_identifier,VK_KHR_maintenance5[] 372ifdef::VKSC_VERSION_1_0[] 373 This is not used in Vulkan SC <<SCID-8>>. 374endif::VKSC_VERSION_1_0[] 375 * pname:pName is a pointer to a null-terminated UTF-8 string specifying 376 the entry point name of the shader for this stage. 377 * pname:pSpecializationInfo is a pointer to a slink:VkSpecializationInfo 378 structure, as described in 379 <<pipelines-specialization-constants,Specialization Constants>>, or 380 `NULL`. 381 382ifdef::VKSC_VERSION_1_0[] 383In Vulkan SC, the pipeline compilation process occurs 384<<pipelines-offline-compilation,offline>> and the pname:module, pname:pName, 385and pname:pSpecializationInfo parameters are not used at runtime and should: 386be ignored by the implementation. 387If provided, the application must: set the pname:pName and 388pname:pSpecializationInfo parameters to the values that were specified for 389the offline compilation of this pipeline. 390endif::VKSC_VERSION_1_0[] 391 392ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 393If pname:module is not dlink:VK_NULL_HANDLE, the shader code used by the 394pipeline is defined by pname:module. 395If pname:module is dlink:VK_NULL_HANDLE, the shader code is defined by the 396chained slink:VkShaderModuleCreateInfo if present. 397endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 398ifndef::VKSC_VERSION_1_0,VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 399The shader code used by the pipeline is defined by pname:module. 400endif::VKSC_VERSION_1_0,VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 401 402ifdef::VK_EXT_shader_module_identifier[] 403If the <<features-shaderModuleIdentifier, pname:shaderModuleIdentifier>> 404feature is enabled, applications can: omit shader code for pname:stage and 405instead provide a module identifier. 406This is done by including a 407slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT struct with 408pname:identifierSize not equal to 0 in the pname:pNext chain. 409A shader stage created in this way is equivalent to one created using a 410shader module with the same identifier. 411The identifier allows an implementation to look up a pipeline without 412consuming a valid SPIR-V module. 413If a pipeline is not found, pipeline compilation is not possible and the 414implementation must: fail as specified by 415ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT. 416 417When an identifier is used in lieu of a shader module, implementations may: 418fail pipeline compilation with ename:VK_PIPELINE_COMPILE_REQUIRED for any 419reason. 420 421[NOTE] 422.Note 423==== 424The rationale for the relaxed requirement on implementations to return a 425pipeline with slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT is 426that layers or tools may intercept pipeline creation calls and require the 427full SPIR-V context to operate correctly. 428ICDs are not expected to fail pipeline compilation if the pipeline exists in 429a cache somewhere. 430==== 431 432ifdef::VK_KHR_pipeline_library[] 433Applications can: use identifiers when creating pipelines with 434ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR. 435When creating such pipelines, ename:VK_SUCCESS may: be returned, but 436subsequently fail when referencing the pipeline in a 437slink:VkPipelineLibraryCreateInfoKHR struct. 438Applications must: allow pipeline compilation to fail during link steps with 439ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT as it may: 440not be possible to determine if a pipeline can: be created from identifiers 441until the link step. 442endif::VK_KHR_pipeline_library[] 443endif::VK_EXT_shader_module_identifier[] 444 445.Valid Usage 446**** 447 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00704]] 448 If the <<features-geometryShader, pname:geometryShader>> feature is not 449 enabled, pname:stage must: not be ename:VK_SHADER_STAGE_GEOMETRY_BIT 450 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00705]] 451 If the <<features-tessellationShader, pname:tessellationShader>> feature 452 is not enabled, pname:stage must: not be 453 ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or 454 ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT 455ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 456 * [[VUID-VkPipelineShaderStageCreateInfo-stage-02091]] 457 If the <<features-meshShader, pname:meshShaders>> feature is not 458 enabled, pname:stage must: not be ename:VK_SHADER_STAGE_MESH_BIT_EXT 459 * [[VUID-VkPipelineShaderStageCreateInfo-stage-02092]] 460 If the <<features-taskShader, pname:taskShaders>> feature is not 461 enabled, pname:stage must: not be ename:VK_SHADER_STAGE_TASK_BIT_EXT 462endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 463 464ifdef::VK_HUAWEI_cluster_culling_shader[] 465 * [[VUID-VkPipelineShaderStageCreateInfo-clustercullingShader-07813]] 466 If the <<features-clustercullingShader, pname:clustercullingShader>> 467 feature is not enabled, pname:stage must: not be 468 ename:VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI 469endif::VK_HUAWEI_cluster_culling_shader[] 470 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00706]] 471 pname:stage must: not be ename:VK_SHADER_STAGE_ALL_GRAPHICS, or 472 ename:VK_SHADER_STAGE_ALL 473ifdef::VKSC_VERSION_1_0[] 474 * [[VUID-VkPipelineShaderStageCreateInfo-module-05026]] 475 pname:module must: be dlink:VK_NULL_HANDLE. 476 * [[VUID-VkPipelineShaderStageCreateInfo-pName-05027]] 477 If pname:pName is not `NULL`, it must: be the name of an 478 code:OpEntryPoint in the SPIR-V shader module used for offline 479 compilation of this pipeline with an execution model that matches 480 pname:stage 481endif::VKSC_VERSION_1_0[] 482ifndef::VKSC_VERSION_1_0[] 483 * [[VUID-VkPipelineShaderStageCreateInfo-pName-00707]] 484 pname:pName must: be the name of an code:OpEntryPoint in pname:module 485 with an execution model that matches pname:stage 486endif::VKSC_VERSION_1_0[] 487 * [[VUID-VkPipelineShaderStageCreateInfo-maxClipDistances-00708]] 488 If the identified entry point includes any variable in its interface 489 that is declared with the code:ClipDistance code:BuiltIn decoration, 490 that variable must: not have an array size greater than 491 sname:VkPhysicalDeviceLimits::pname:maxClipDistances 492 * [[VUID-VkPipelineShaderStageCreateInfo-maxCullDistances-00709]] 493 If the identified entry point includes any variable in its interface 494 that is declared with the code:CullDistance code:BuiltIn decoration, 495 that variable must: not have an array size greater than 496 sname:VkPhysicalDeviceLimits::pname:maxCullDistances 497 * [[VUID-VkPipelineShaderStageCreateInfo-maxCombinedClipAndCullDistances-00710]] 498 If the identified entry point includes any variables in its interface 499 that are declared with the code:ClipDistance or code:CullDistance 500 code:BuiltIn decoration, those variables must: not have array sizes 501 which sum to more than 502 sname:VkPhysicalDeviceLimits::pname:maxCombinedClipAndCullDistances 503 * [[VUID-VkPipelineShaderStageCreateInfo-maxSampleMaskWords-00711]] 504 If the identified entry point includes any variable in its interface 505 that is declared with the code:SampleMask code:BuiltIn decoration, that 506 variable must: not have an array size greater than 507 sname:VkPhysicalDeviceLimits::pname:maxSampleMaskWords 508 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00713]] 509 If pname:stage is ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or 510 ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified 511 entry point has an code:OpExecutionMode instruction specifying a patch 512 size with code:OutputVertices, the patch size must: be greater than `0` 513 and less than or equal to 514 sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize 515 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00714]] 516 If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified 517 entry point must: have an code:OpExecutionMode instruction specifying a 518 maximum output vertex count that is greater than `0` and less than or 519 equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryOutputVertices 520 * [[VUID-VkPipelineShaderStageCreateInfo-stage-00715]] 521 If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified 522 entry point must: have an code:OpExecutionMode instruction specifying an 523 invocation count that is greater than `0` and less than or equal to 524 sname:VkPhysicalDeviceLimits::pname:maxGeometryShaderInvocations 525 * [[VUID-VkPipelineShaderStageCreateInfo-stage-02596]] 526 If pname:stage is either ename:VK_SHADER_STAGE_VERTEX_BIT, 527 ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, 528 ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or 529 ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point 530 writes to code:Layer for any primitive, it must: write the same value to 531 code:Layer for all vertices of a given primitive 532 * [[VUID-VkPipelineShaderStageCreateInfo-stage-02597]] 533 If pname:stage is either ename:VK_SHADER_STAGE_VERTEX_BIT, 534 ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, 535 ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or 536 ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point 537 writes to code:ViewportIndex for any primitive, it must: write the same 538 value to code:ViewportIndex for all vertices of a given primitive 539 * [[VUID-VkPipelineShaderStageCreateInfo-stage-06685]] 540 If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified 541 entry point writes to code:FragDepth in any execution path, all 542 execution paths that are not exclusive to helper invocations must: 543 either discard the fragment, or write or initialize the value of 544 code:FragDepth 545ifdef::VK_EXT_shader_stencil_export[] 546 * [[VUID-VkPipelineShaderStageCreateInfo-stage-06686]] 547 If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified 548 entry point writes to code:FragStencilRefEXT in any execution path, all 549 execution paths that are not exclusive to helper invocations must: 550 either discard the fragment, or write or initialize the value of 551 code:FragStencilRefEXT 552endif::VK_EXT_shader_stencil_export[] 553ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 554 * [[VUID-VkPipelineShaderStageCreateInfo-flags-02784]] 555 If pname:flags has the 556 ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT 557 flag set, the <<features-subgroupSizeControl, 558 pname:subgroupSizeControl>> feature must: be enabled 559 * [[VUID-VkPipelineShaderStageCreateInfo-flags-02785]] 560 If pname:flags has the 561 ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag 562 set, the <<features-computeFullSubgroups, pname:computeFullSubgroups>> 563 feature must: be enabled 564 * [[VUID-VkPipelineShaderStageCreateInfo-flags-08988]] 565 If pname:flags includes 566 ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, 567 pname:stage must: be 568ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 569 one of ename:VK_SHADER_STAGE_MESH_BIT_EXT, 570 ename:VK_SHADER_STAGE_TASK_BIT_EXT, or 571endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 572 ename:VK_SHADER_STAGE_COMPUTE_BIT 573 * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02754]] 574 If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure 575 is included in the pname:pNext chain, pname:flags must: not have the 576 ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT 577 flag set 578 * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02755]] 579 If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure 580 is included in the pname:pNext chain, the 581 <<features-subgroupSizeControl, pname:subgroupSizeControl>> feature 582 must: be enabled, and pname:stage must: be a valid bit specified in 583 <<limits-requiredSubgroupSizeStages, pname:requiredSubgroupSizeStages>> 584 * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02756]] 585 If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure 586 is included in the pname:pNext chain and pname:stage is 587 ename:VK_SHADER_STAGE_COMPUTE_BIT, 588ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[ename:VK_SHADER_STAGE_MESH_BIT_EXT, or ename:VK_SHADER_STAGE_TASK_BIT_EXT,] 589 the local workgroup size of the shader must: be less than or equal to 590 the product of 591 slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::pname:requiredSubgroupSize 592 and <<limits-maxComputeWorkgroupSubgroups, 593 pname:maxComputeWorkgroupSubgroups>> 594 * [[VUID-VkPipelineShaderStageCreateInfo-pNext-02757]] 595 If a slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure 596 is included in the pname:pNext chain, and pname:flags has the 597 ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag 598 set, the local workgroup size in the X dimension of the pipeline must: 599 be a multiple of 600 slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::pname:requiredSubgroupSize 601 * [[VUID-VkPipelineShaderStageCreateInfo-flags-02758]] 602 If pname:flags has both the 603 ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT and 604 ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT 605 flags set, the local workgroup size in the X dimension of the pipeline 606 must: be a multiple of <<limits-maxSubgroupSize, pname:maxSubgroupSize>> 607 * [[VUID-VkPipelineShaderStageCreateInfo-flags-02759]] 608 If pname:flags has the 609 ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag 610 set and pname:flags does not have the 611 ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT 612 flag set and no 613 slink:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is 614 included in the pname:pNext chain, the local workgroup size in the X 615 dimension of the pipeline must: be a multiple of <<limits-subgroup-size, 616 pname:subgroupSize>> 617ifdef::VK_KHR_cooperative_matrix[] 618 * [[VUID-VkPipelineShaderStageCreateInfo-module-08987]] 619 If pname:module uses the code:OpTypeCooperativeMatrixKHR instruction 620 with a code:Scope equal to code:Subgroup, then the local workgroup size 621 in the X dimension of the pipeline must: be a multiple of 622 <<limits-subgroup-size,pname:subgroupSize>>. 623endif::VK_KHR_cooperative_matrix[] 624endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 625 626 * [[VUID-VkPipelineShaderStageCreateInfo-stage-08771]] 627ifdef::VK_EXT_shader_module_identifier[] 628 If a shader module identifier is not specified for this pname:stage, 629endif::VK_EXT_shader_module_identifier[] 630 pname:module must: be a valid slink:VkShaderModule 631ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 632 if none of the following features are enabled: 633ifdef::VK_EXT_graphics_pipeline_library[] 634 ** <<features-graphicsPipelineLibrary, pname:graphicsPipelineLibrary>> 635endif::VK_EXT_graphics_pipeline_library[] 636ifdef::VK_KHR_maintenance5[] 637 ** <<features-maintenance5, pname:maintenance5>> 638endif::VK_KHR_maintenance5[] 639endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 640 641ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 642 * [[VUID-VkPipelineShaderStageCreateInfo-stage-06845]] 643ifdef::VK_EXT_shader_module_identifier[] 644 If a shader module identifier is not specified for this pname:stage, 645 pname:module must: be a valid slink:VkShaderModule, or 646endif::VK_EXT_shader_module_identifier[] 647ifndef::VK_EXT_shader_module_identifier[] 648 If pname:module is dlink:VK_NULL_HANDLE] 649endif::VK_EXT_shader_module_identifier[] 650 there must: be a valid slink:VkShaderModuleCreateInfo structure in the 651 pname:pNext chain 652endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 653 654ifdef::VK_EXT_shader_module_identifier[] 655ifdef::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 656 * [[VUID-VkPipelineShaderStageCreateInfo-stage-06844]] 657 If a shader module identifier is specified for this pname:stage, a 658 slink:VkShaderModuleCreateInfo structure must: not be present in the 659 pname:pNext chain 660endif::VK_EXT_graphics_pipeline_library,VK_KHR_maintenance5[] 661 * [[VUID-VkPipelineShaderStageCreateInfo-stage-06848]] 662 If a shader module identifier is specified for this pname:stage, 663 pname:module must: be dlink:VK_NULL_HANDLE 664endif::VK_EXT_shader_module_identifier[] 665 * [[VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849]] 666ifdef::VK_EXT_shader_module_identifier[] 667 If a shader module identifier is not specified, the 668endif::VK_EXT_shader_module_identifier[] 669ifndef::VK_EXT_shader_module_identifier[The] 670 shader code used by the pipeline must: be valid as described by the 671 <<spirv-spec,Khronos SPIR-V Specification>> after applying the 672 specializations provided in pname:pSpecializationInfo, if any, and then 673 converting all specialization constants into fixed constants 674**** 675 676include::{generated}/validity/structs/VkPipelineShaderStageCreateInfo.adoc[] 677-- 678 679[open,refpage='VkPipelineShaderStageCreateFlags',desc='Bitmask of VkPipelineShaderStageCreateFlagBits',type='flags'] 680-- 681include::{generated}/api/flags/VkPipelineShaderStageCreateFlags.adoc[] 682 683tname:VkPipelineShaderStageCreateFlags is a bitmask type for setting a mask 684of zero or more elink:VkPipelineShaderStageCreateFlagBits. 685-- 686 687[open,refpage='VkPipelineShaderStageCreateFlagBits',desc='Bitmask controlling how a pipeline shader stage is created',type='enums'] 688-- 689Possible values of the pname:flags member of 690slink:VkPipelineShaderStageCreateInfo specifying how a pipeline shader stage 691is created, are: 692 693include::{generated}/api/enums/VkPipelineShaderStageCreateFlagBits.adoc[] 694 695ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 696 * ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT 697 specifies that the 698 <<interfaces-builtin-variables-sgs,code:SubgroupSize>> may: vary in the 699 shader stage. 700 * ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT 701 specifies that the subgroup sizes must: be launched with all invocations 702 active in the 703ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[task, mesh, or] 704 compute stage. 705 706[NOTE] 707.Note 708==== 709If ename:VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT 710and ename:VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT are 711specified and <<limits-minSubgroupSize, pname:minSubgroupSize>> does not 712equal <<limits-maxSubgroupSize, pname:maxSubgroupSize>> and no 713<<pipelines-required-subgroup-size, required subgroup size>> is specified, 714then the only way to guarantee that the 'X' dimension of the local workgroup 715size is a multiple of <<interfaces-builtin-variables-sgs, 716code:SubgroupSize>> is to make it a multiple of pname:maxSubgroupSize. 717Under these conditions, you are guaranteed full subgroups but not any 718particular subgroup size. 719==== 720 721endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 722-- 723 724[open,refpage='VkShaderStageFlagBits',desc='Bitmask specifying a pipeline stage',type='enums'] 725-- 726Bits which can: be set by commands and structures, specifying one or more 727shader stages, are: 728 729include::{generated}/api/enums/VkShaderStageFlagBits.adoc[] 730 731 * ename:VK_SHADER_STAGE_VERTEX_BIT specifies the vertex stage. 732 * ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT specifies the 733 tessellation control stage. 734 * ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT specifies the 735 tessellation evaluation stage. 736 * ename:VK_SHADER_STAGE_GEOMETRY_BIT specifies the geometry stage. 737 * ename:VK_SHADER_STAGE_FRAGMENT_BIT specifies the fragment stage. 738 * ename:VK_SHADER_STAGE_COMPUTE_BIT specifies the compute stage. 739 * ename:VK_SHADER_STAGE_ALL_GRAPHICS is a combination of bits used as 740 shorthand to specify all graphics stages defined above (excluding the 741 compute stage). 742 * ename:VK_SHADER_STAGE_ALL is a combination of bits used as shorthand to 743 specify all shader stages supported by the device, including all 744 additional stages which are introduced by extensions. 745ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 746 * ename:VK_SHADER_STAGE_TASK_BIT_EXT specifies the task stage. 747 * ename:VK_SHADER_STAGE_MESH_BIT_EXT specifies the mesh stage. 748endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 749ifdef::VK_HUAWEI_cluster_culling_shader[] 750 * ename:VK_SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEI specifies the cluster 751 culling stage. 752endif::VK_HUAWEI_cluster_culling_shader[] 753ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 754 * ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR specifies the ray generation stage. 755 * ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR specifies the any-hit stage. 756 * ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR specifies the closest hit 757 stage. 758 * ename:VK_SHADER_STAGE_MISS_BIT_KHR specifies the miss stage. 759 * ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR specifies the intersection 760 stage. 761 * ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR specifies the callable stage. 762endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 763 764[NOTE] 765.Note 766==== 767ename:VK_SHADER_STAGE_ALL_GRAPHICS only includes the original five graphics 768stages included in Vulkan 1.0, and not any stages added by extensions. 769Thus, it may not have the desired effect in all cases. 770==== 771-- 772 773[open,refpage='VkShaderStageFlags',desc='Bitmask of VkShaderStageFlagBits',type='flags'] 774-- 775include::{generated}/api/flags/VkShaderStageFlags.adoc[] 776 777tname:VkShaderStageFlags is a bitmask type for setting a mask of zero or 778more elink:VkShaderStageFlagBits. 779-- 780 781ifdef::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 782[open,refpage='VkPipelineShaderStageRequiredSubgroupSizeCreateInfo',desc='Structure specifying the required subgroup size of a newly created pipeline shader stage',type='structs',alias='VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT'] 783-- 784The sname:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is 785defined as: 786 787include::{generated}/api/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.adoc[] 788 789ifdef::VK_EXT_subgroup_size_control[] 790or the equivalent 791 792include::{generated}/api/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.adoc[] 793endif::VK_EXT_subgroup_size_control[] 794 795ifdef::VK_EXT_shader_object[] 796or the equiavlent 797 798include::{generated}/api/structs/VkShaderRequiredSubgroupSizeCreateInfoEXT.adoc[] 799endif::VK_EXT_shader_object[] 800 801 * pname:sType is a elink:VkStructureType value identifying this structure. 802 * pname:pNext is `NULL` or a pointer to a structure extending this 803 structure. 804 * [[pipelines-required-subgroup-size]] pname:requiredSubgroupSize is an 805 unsigned integer value specifying the required subgroup size for the 806 newly created pipeline shader stage. 807 808If a sname:VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is 809included in the pname:pNext chain of slink:VkPipelineShaderStageCreateInfo, 810it specifies that the pipeline shader stage being compiled has a required 811subgroup size. 812 813ifdef::VK_EXT_shader_object[] 814If a sname:VkShaderRequiredSubgroupSizeCreateInfoEXT structure is included 815in the pname:pNext chain of slink:VkShaderCreateInfoEXT, it specifies that 816the shader being compiled has a required subgroup size. 817endif::VK_EXT_shader_object[] 818 819.Valid Usage 820**** 821 * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02760]] 822 pname:requiredSubgroupSize must: be a power-of-two integer 823 * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02761]] 824 pname:requiredSubgroupSize must: be greater or equal to 825 <<limits-minSubgroupSize, pname:minSubgroupSize>> 826 * [[VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-requiredSubgroupSize-02762]] 827 pname:requiredSubgroupSize must: be less than or equal to 828 <<limits-maxSubgroupSize, pname:maxSubgroupSize>> 829**** 830 831include::{generated}/validity/structs/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo.adoc[] 832-- 833endif::VK_VERSION_1_3,VK_EXT_subgroup_size_control[] 834 835ifdef::VK_HUAWEI_subpass_shading[] 836[open,refpage='VkSubpassShadingPipelineCreateInfoHUAWEI',desc='Structure specifying parameters of a newly created subpass shading pipeline',type='structs'] 837-- 838A subpass shading pipeline is a compute pipeline which must: be called only 839in a subpass of a render pass with work dimensions specified by render area 840size. 841The subpass shading pipeline shader is a compute shader allowed to access 842input attachments specified in the calling subpass. 843To create a subpass shading pipeline, call flink:vkCreateComputePipelines 844with slink:VkSubpassShadingPipelineCreateInfoHUAWEI in the pname:pNext chain 845of slink:VkComputePipelineCreateInfo. 846 847The sname:VkSubpassShadingPipelineCreateInfoHUAWEI structure is defined as: 848 849include::{generated}/api/structs/VkSubpassShadingPipelineCreateInfoHUAWEI.adoc[] 850 851 * pname:sType is a elink:VkStructureType value identifying this structure. 852 * pname:pNext is `NULL` or a pointer to a structure extending this 853 structure. 854 * pname:renderPass is a handle to a render pass object describing the 855 environment in which the pipeline will be used. 856 The pipeline must: only be used with a render pass instance compatible 857 with the one provided. 858 See <<renderpass-compatibility,Render Pass Compatibility>> for more 859 information. 860 * pname:subpass is the index of the subpass in the render pass where this 861 pipeline will be used. 862 863.Valid Usage 864**** 865 * [[VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-subpass-04946]] 866 pname:subpass must: be created with 867 ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI bind point 868**** 869 870include::{generated}/validity/structs/VkSubpassShadingPipelineCreateInfoHUAWEI.adoc[] 871-- 872 873[open,refpage='vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI',desc='Query maximum supported subpass shading workgroup size for a give render pass',type='protos'] 874-- 875A subpass shading pipeline's workgroup size is a 2D vector with number of 876power-of-two in width and height. 877The maximum number of width and height is implementation-dependent, and may: 878vary for different formats and sample counts of attachments in a render 879pass. 880 881To query the maximum workgroup size, call: 882 883include::{generated}/api/protos/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.adoc[] 884 885 * pname:device is a handle to a local device object that was used to 886 create the given render pass. 887 * pname:renderPass is a handle to a render pass object describing the 888 environment in which the pipeline will be used. 889 The pipeline must: only be used with a render pass instance compatible 890 with the one provided. 891 See <<renderpass-compatibility,Render Pass Compatibility>> for more 892 information. 893 * pname:pMaxWorkgroupSize is a pointer to a slink:VkExtent2D structure. 894 895include::{generated}/validity/protos/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.adoc[] 896-- 897endif::VK_HUAWEI_subpass_shading[] 898 899ifdef::VK_EXT_pipeline_robustness[] 900[open,refpage='VkPipelineRobustnessCreateInfoEXT',desc='Structure controlling the robustness of a newly created pipeline shader stage',type='structs'] 901-- 902The sname:VkPipelineRobustnessCreateInfoEXT structure is defined as: 903 904include::{generated}/api/structs/VkPipelineRobustnessCreateInfoEXT.adoc[] 905 906 * pname:sType is a elink:VkStructureType value identifying this structure. 907 * pname:pNext is `NULL` or a pointer to a structure extending this 908 structure. 909 * pname:storageBuffers sets the behaviour of out of bounds accesses made 910 to resources bound as: 911 ** ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER 912 ** ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER 913 ** ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC 914 * pname:uniformBuffers describes the behaviour of out of bounds accesses 915 made to resources bound as: 916 ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER 917 ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER 918 ** ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC 919ifdef::VK_VERSION_1_3,VK_EXT_inline_uniform_block[] 920 ** ename:VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK 921endif::VK_VERSION_1_3,VK_EXT_inline_uniform_block[] 922 * pname:vertexInputs describes the behaviour of out of bounds accesses 923 made to vertex input attributes 924 * pname:images describes the behaviour of out of bounds accesses made to 925 resources bound as: 926 ** ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE 927 ** ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE 928 929ifdef::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[] 930Resources bound as ename:VK_DESCRIPTOR_TYPE_MUTABLE_EXT will have the 931robustness behavior that covers its active descriptor type. 932endif::VK_EXT_mutable_descriptor_type,VK_VALVE_mutable_descriptor_type[] 933 934The scope of the effect of sname:VkPipelineRobustnessCreateInfoEXT depends 935on which structure's pname:pNext chain it is included in. 936 937 * sname:VkGraphicsPipelineCreateInfo, 938ifdef::VK_KHR_ray_tracing_pipeline[sname:VkRayTracingPipelineCreateInfoKHR,] 939 sname:VkComputePipelineCreateInfo: + 940 The robustness behavior described by 941 sname:VkPipelineRobustnessCreateInfoEXT applies to all accesses through 942 this pipeline 943 * sname:VkPipelineShaderStageCreateInfo: + 944 The robustness behavior described by 945 sname:VkPipelineRobustnessCreateInfoEXT applies to all accesses 946 emanating from the shader code of this shader stage 947 948If sname:VkPipelineRobustnessCreateInfoEXT is specified for both a pipeline 949and a pipeline stage, the sname:VkPipelineRobustnessCreateInfoEXT specified 950for the pipeline stage will take precedence. 951 952ifdef::VK_KHR_pipeline_library[] 953When sname:VkPipelineRobustnessCreateInfoEXT is specified for a pipeline, it 954only affects the subset of the pipeline that is specified by the create 955info, as opposed to subsets linked from pipeline libraries. 956ifdef::VK_EXT_graphics_pipeline_library[] 957For slink:VkGraphicsPipelineCreateInfo, that subset is specified by 958slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags. 959endif::VK_EXT_graphics_pipeline_library[] 960ifdef::VK_KHR_ray_tracing_pipeline[] 961For slink:VkRayTracingPipelineCreateInfoKHR, that subset is specified by the 962specific stages in slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages. 963endif::VK_KHR_ray_tracing_pipeline[] 964endif::VK_KHR_pipeline_library[] 965 966.Valid Usage 967**** 968 * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06926]] 969 If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature 970 is not enabled, pname:storageBuffers must: be 971 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT 972 * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06927]] 973 If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature 974 is not enabled, pname:uniformBuffers must: be 975 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT 976 * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06928]] 977 If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature 978 is not enabled, pname:vertexInputs must: be 979 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT 980 * [[VUID-VkPipelineRobustnessCreateInfoEXT-pipelineRobustness-06929]] 981 If the <<features-pipelineRobustness, pname:pipelineRobustness>> feature 982 is not enabled, pname:images must: be 983 ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT 984 * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustImageAccess-06930]] 985 If the <<features-robustImageAccess, pname:robustImageAccess>> feature 986 is not supported, pname:images must: not be 987 ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT 988 * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06931]] 989 If the <<features-robustBufferAccess2, pname:robustBufferAccess2>> 990 feature is not supported, pname:storageBuffers must: not be 991 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT 992 * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06932]] 993 If the <<features-robustBufferAccess2, pname:robustBufferAccess2>> 994 feature is not supported, pname:uniformBuffers must: not be 995 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT 996 * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustBufferAccess2-06933]] 997 If the <<features-robustBufferAccess2, pname:robustBufferAccess2>> 998 feature is not supported, pname:vertexInputs must: not be 999 ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT 1000 * [[VUID-VkPipelineRobustnessCreateInfoEXT-robustImageAccess2-06934]] 1001 If the <<features-robustImageAccess2, pname:robustImageAccess2>> feature 1002 is not supported, pname:images must: not be 1003 ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT 1004**** 1005 1006include::{generated}/validity/structs/VkPipelineRobustnessCreateInfoEXT.adoc[] 1007-- 1008 1009[open,refpage='VkPipelineRobustnessBufferBehaviorEXT',desc='Enum controlling the robustness of buffer accesses in a pipeline stage',type='enums'] 1010-- 1011Possible values of the pname:storageBuffers, pname:uniformBuffers, and 1012pname:vertexInputs members of slink:VkPipelineRobustnessCreateInfoEXT are: 1013 1014include::{generated}/api/enums/VkPipelineRobustnessBufferBehaviorEXT.adoc[] 1015 1016 * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT 1017 specifies that this pipeline stage follows the behavior of robustness 1018 features that are enabled on the device that created this pipeline 1019 * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT specifies that 1020 buffer accesses by this pipeline stage to the relevant resource types 1021 must: not be out of bounds 1022 * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT 1023 specifies that out of bounds accesses by this pipeline stage to the 1024 relevant resource types behave as if the <<features-robustBufferAccess, 1025 pname:robustBufferAccess>> feature is enabled 1026 * ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT 1027 specifies that out of bounds accesses by this pipeline stage to the 1028 relevant resource types behave as if the <<features-robustBufferAccess2, 1029 pname:robustBufferAccess2>> feature is enabled 1030-- 1031 1032[open,refpage='VkPipelineRobustnessImageBehaviorEXT',desc='Enum controlling the robustness of image accesses in a pipeline stage',type='enums'] 1033-- 1034Possible values of the pname:images member of 1035slink:VkPipelineRobustnessCreateInfoEXT are: 1036 1037include::{generated}/api/enums/VkPipelineRobustnessImageBehaviorEXT.adoc[] 1038 1039 * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT specifies 1040 that this pipeline stage follows the behavior of robustness features 1041 that are enabled on the device that created this pipeline 1042 * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT specifies that 1043 image accesses by this pipeline stage to the relevant resource types 1044 must: not be out of bounds 1045 * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT 1046 specifies that out of bounds accesses by this pipeline stage to images 1047 behave as if the <<features-robustImageAccess, pname:robustImageAccess>> 1048 feature is enabled 1049 * ename:VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT 1050 specifies that out of bounds accesses by this pipeline stage to images 1051 behave as if the <<features-robustImageAccess2, 1052 pname:robustImageAccess2>> feature is enabled 1053-- 1054endif::VK_EXT_pipeline_robustness[] 1055 1056ifdef::VK_EXT_shader_module_identifier[] 1057[open,refpage='VkPipelineShaderStageModuleIdentifierCreateInfoEXT',desc='Structure specifying an identifier for a shader module',type='structs'] 1058-- 1059An identifier can: be provided instead of shader code in an attempt to 1060compile pipelines without providing complete SPIR-V to the implementation. 1061 1062The sname:VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure is 1063defined as: 1064 1065include::{generated}/api/structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.adoc[] 1066 1067 * pname:sType is a elink:VkStructureType value identifying this structure. 1068 * pname:pNext is `NULL` or a pointer to a structure extending this 1069 structure. 1070 * pname:identifierSize is the size, in bytes, of the buffer pointed to by 1071 pname:pIdentifier. 1072 * pname:pIdentifier is a pointer to a buffer of opaque data specifying an 1073 identifier. 1074 1075Any identifier can: be used. 1076If the pipeline being created with identifier requires compilation to 1077complete the pipeline creation call, pipeline compilation must: fail as 1078defined by ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT. 1079 1080pname:pIdentifier and pname:identifierSize can: be obtained from an 1081slink:VkShaderModuleIdentifierEXT queried earlier. 1082 1083.Valid Usage 1084**** 1085 * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06850]] 1086 If this structure is included in a pname:pNext chain and 1087 pname:identifierSize is not equal to 0, the 1088 <<features-shaderModuleIdentifier, pname:shaderModuleIdentifier>> 1089 feature must: be enabled 1090 * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pNext-06851]] 1091 If this struct is included in a pname:pNext chain of 1092 slink:VkPipelineShaderStageCreateInfo and pname:identifierSize is not 1093 equal to 0, the pipeline must: be created with the 1094 ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag set 1095 * [[VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-identifierSize-06852]] 1096 pname:identifierSize must: be less-or-equal to 1097 ename:VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT 1098**** 1099 1100include::{generated}/validity/structs/VkPipelineShaderStageModuleIdentifierCreateInfoEXT.adoc[] 1101-- 1102endif::VK_EXT_shader_module_identifier[] 1103 1104ifdef::VK_NV_device_generated_commands_compute[] 1105If a compute pipeline is going to be used in <<device-generated-commands, 1106Device-Generated Commands>> by specifying its pipeline token with 1107slink:VkBindPipelineIndirectCommandNV, then that pipeline's associated 1108metadata must: be saved at a specified buffer device address for later use 1109in indirect command generation. 1110The buffer device address must: be specified at the time of compute pipeline 1111creation with slink:VkComputePipelineIndirectBufferInfoNV structure in the 1112pname:pNext chain of slink:VkComputePipelineCreateInfo. 1113 1114[open,refpage='VkComputePipelineIndirectBufferInfoNV',desc='Structure describing the device address where pipeline\'s metadata will be saved',type='structs'] 1115-- 1116The sname:VkComputePipelineIndirectBufferInfoNV structure is defined as: 1117 1118include::{generated}/api/structs/VkComputePipelineIndirectBufferInfoNV.adoc[] 1119 * pname:sType is a elink:VkStructureType value identifying this structure. 1120 * pname:pNext is `NULL` or a pointer to a structure extending this 1121 structure. 1122 * pname:deviceAddress is the address where the pipeline's metadata will be 1123 stored. 1124 * pname:size is the size of pipeline's metadata that was queried using 1125 flink:vkGetPipelineIndirectMemoryRequirementsNV. 1126 * pname:pipelineDeviceAddressCaptureReplay is the device address where 1127 pipeline's metadata was originally saved and can now be used to 1128 re-populate pname:deviceAddress for replay. 1129 1130If pname:pipelineDeviceAddressCaptureReplay is zero, no specific address is 1131requested. 1132If pname:pipelineDeviceAddressCaptureReplay is not zero, then it must: be an 1133address retrieved from an identically created pipeline on the same 1134implementation. 1135The pipeline metadata must: also be placed on an identically created buffer 1136and at the same offset using the flink:vkCmdUpdatePipelineIndirectBufferNV 1137command. 1138 1139.Valid Usage 1140**** 1141 * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceGeneratedComputePipelines-09009]] 1142 The <<features-deviceGeneratedComputePipelines, 1143 sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputePipelines>> 1144 feature must: be enabled 1145 * [[VUID-VkComputePipelineIndirectBufferInfoNV-flags-09010]] 1146 The pipeline creation flags in 1147 slink:VkComputePipelineCreateInfo::pname:flags must: include 1148 ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV 1149 * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09011]] 1150 pname:deviceAddress must: be aligned to the 1151 slink:VkMemoryRequirements2::pname:alignment, as returned by 1152 flink:vkGetPipelineIndirectMemoryRequirementsNV 1153 * [[VUID-VkComputePipelineIndirectBufferInfoNV-deviceAddress-09012]] 1154 pname:deviceAddress must: have been allocated from a buffer that was 1155 created with usage ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT and 1156 ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT 1157 * [[VUID-VkComputePipelineIndirectBufferInfoNV-size-09013]] 1158 pname:size must: be greater than or equal to the 1159 slink:VkMemoryRequirements2::pname:size, as returned by 1160 flink:vkGetPipelineIndirectMemoryRequirementsNV 1161 * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09014]] 1162 If pname:pipelineDeviceAddressCaptureReplay is non-zero then the 1163 <<features-deviceGeneratedComputePipelines, 1164 sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputeCaptureReplay>> 1165 feature must: be enabled 1166 * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09015]] 1167 If pname:pipelineDeviceAddressCaptureReplay is non-zero then that 1168 address must: have been allocated with flag 1169 ename:VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT set 1170 * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09016]] 1171 If pname:pipelineDeviceAddressCaptureReplay is non-zero, the 1172 pname:pipeline must: have been recreated for replay 1173 * [[VUID-VkComputePipelineIndirectBufferInfoNV-pipelineDeviceAddressCaptureReplay-09017]] 1174 pname:pipelineDeviceAddressCaptureReplay must: satisfy the 1175 pname:alignment and pname:size requirements similar to 1176 pname:deviceAddress 1177**** 1178 1179include::{generated}/validity/structs/VkComputePipelineIndirectBufferInfoNV.adoc[] 1180-- 1181 1182[open,refpage='vkCmdUpdatePipelineIndirectBufferNV',desc='Update the indirect compute pipeline\'s metadata',type='protos'] 1183-- 1184To save a compute pipeline's metadata at a device address call: 1185 1186include::{generated}/api/protos/vkCmdUpdatePipelineIndirectBufferNV.adoc[] 1187 1188 * pname:commandBuffer is the command buffer into which the command will be 1189 recorded. 1190 * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying 1191 the type of pipeline whose metadata will be saved. 1192 * pname:pipeline is the pipeline whose metadata will be saved. 1193 1194fname:vkCmdUpdatePipelineIndirectBufferNV is only allowed outside of a 1195render pass. 1196This command is treated as a "`transfer`" operation for the purposes of 1197synchronization barriers. 1198The writes to the address must: be synchronized using stages 1199ename:VK_PIPELINE_STAGE_2_COPY_BIT and 1200ename:VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV and with access masks 1201ename:VK_ACCESS_MEMORY_WRITE_BIT and 1202ename:VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV respectively before using the 1203results in preprocessing. 1204 1205.Valid Usage 1206**** 1207 * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipelineBindPoint-09018]] 1208 pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_COMPUTE 1209 * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09019]] 1210 pname:pipeline must: have been created with 1211 ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV flag set 1212 * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-pipeline-09020]] 1213 pname:pipeline must: have been created with 1214 slink:VkComputePipelineIndirectBufferInfoNV structure specifying a valid 1215 address where its metadata will be saved 1216 * [[VUID-vkCmdUpdatePipelineIndirectBufferNV-deviceGeneratedComputePipelines-09021]] 1217 The <<features-deviceGeneratedComputePipelines, 1218 sname:VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::pname:deviceGeneratedComputePipelines>> 1219 feature must: be enabled 1220**** 1221 1222include::{generated}/validity/protos/vkCmdUpdatePipelineIndirectBufferNV.adoc[] 1223-- 1224 1225endif::VK_NV_device_generated_commands_compute[] 1226 1227[[pipelines-graphics]] 1228== Graphics Pipelines 1229 1230Graphics pipelines consist of multiple shader stages, multiple 1231fixed-function pipeline stages, and a pipeline layout. 1232 1233[open,refpage='vkCreateGraphicsPipelines',desc='Create graphics pipelines',type='protos'] 1234-- 1235:refpage: vkCreateGraphicsPipelines 1236:objectnameplural: graphics pipelines 1237:objectnamecamelcase: graphicsPipeline 1238:objectcount: pname:createInfoCount 1239 1240To create graphics pipelines, call: 1241 1242include::{generated}/api/protos/vkCreateGraphicsPipelines.adoc[] 1243 1244 * pname:device is the logical device that creates the graphics pipelines. 1245ifndef::VKSC_VERSION_1_0[] 1246 * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that 1247 pipeline caching is disabled; or the handle of a valid 1248 <<pipelines-cache,pipeline cache>> object, in which case use of that 1249 cache is enabled for the duration of the command. 1250endif::VKSC_VERSION_1_0[] 1251ifdef::VKSC_VERSION_1_0[] 1252 * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline 1253 cache>> object. 1254endif::VKSC_VERSION_1_0[] 1255 * pname:createInfoCount is the length of the pname:pCreateInfos and 1256 pname:pPipelines arrays. 1257 * pname:pCreateInfos is a pointer to an array of 1258 slink:VkGraphicsPipelineCreateInfo structures. 1259 * pname:pAllocator controls host memory allocation as described in the 1260 <<memory-allocation, Memory Allocation>> chapter. 1261 * pname:pPipelines is a pointer to an array of slink:VkPipeline handles in 1262 which the resulting graphics pipeline objects are returned. 1263 1264The slink:VkGraphicsPipelineCreateInfo structure includes an array of 1265slink:VkPipelineShaderStageCreateInfo structures for each of the desired 1266active shader stages, as well as creation information for all relevant 1267fixed-function stages, and a pipeline layout. 1268 1269ifdef::VKSC_VERSION_1_0[] 1270If a pipeline creation fails due to: 1271 1272 * The identified pipeline not being present in pname:pipelineCache 1273 * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo 1274 structure 1275 1276the operation will continue as specified in <<pipelines-multiple, Multiple 1277Pipeline Creation>> and the command will return 1278ename:VK_ERROR_NO_PIPELINE_MATCH. 1279ifdef::hidden[] 1280// tag::scdeviation[] 1281 * flink:vkCreateGraphicsPipelines returns ename:VK_ERROR_NO_PIPELINE_MATCH 1282 if the slink:VkGraphicsPipelineCreateInfo::pname:pNext chain does not 1283 include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>. 1284// end::scdeviation[] 1285endif::hidden[] 1286endif::VKSC_VERSION_1_0[] 1287 1288include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[] 1289 1290.Valid Usage 1291**** 1292ifndef::VKSC_VERSION_1_0[] 1293 * [[VUID-vkCreateGraphicsPipelines-flags-00720]] 1294 If the pname:flags member of any element of pname:pCreateInfos contains 1295 the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the 1296 pname:basePipelineIndex member of that same element is not `-1`, 1297 pname:basePipelineIndex must: be less than the index into 1298 pname:pCreateInfos that corresponds to that element 1299 * [[VUID-vkCreateGraphicsPipelines-flags-00721]] 1300 If the pname:flags member of any element of pname:pCreateInfos contains 1301 the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline 1302 must: have been created with the 1303 ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set 1304endif::VKSC_VERSION_1_0[] 1305ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 1306 * [[VUID-vkCreateGraphicsPipelines-pipelineCache-02876]] 1307 If pname:pipelineCache was created with 1308 ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access 1309 to pname:pipelineCache must: be 1310 <<fundamentals-threadingbehavior,externally synchronized>> 1311endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 1312include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[] 1313**** 1314ifdef::VKSC_VERSION_1_0[] 1315ifdef::hidden[] 1316// tag::scdeviation[] 1317 * flink:vkCreateGraphicsPipelines::pname:pipelineCache must: not be 1318 dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>. 1319// end::scdeviation[] 1320endif::hidden[] 1321endif::VKSC_VERSION_1_0[] 1322 1323ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 1324[NOTE] 1325.Note 1326==== 1327An implicit cache may be provided by the implementation or a layer. 1328For this reason, it is still valid to set 1329ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT on 1330pname:flags for any element of pname:pCreateInfos while passing 1331dlink:VK_NULL_HANDLE for pname:pipelineCache. 1332==== 1333endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 1334 1335include::{generated}/validity/protos/vkCreateGraphicsPipelines.adoc[] 1336-- 1337 1338[open,refpage='VkGraphicsPipelineCreateInfo',desc='Structure specifying parameters of a newly created graphics pipeline',type='structs'] 1339-- 1340:refpage: VkGraphicsPipelineCreateInfo 1341 1342The sname:VkGraphicsPipelineCreateInfo structure is defined as: 1343 1344include::{generated}/api/structs/VkGraphicsPipelineCreateInfo.adoc[] 1345 1346 * pname:sType is a elink:VkStructureType value identifying this structure. 1347 * pname:pNext is `NULL` or a pointer to a structure extending this 1348 structure. 1349 * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying 1350 how the pipeline will be generated. 1351 * pname:stageCount is the number of entries in the pname:pStages array. 1352 * pname:pStages is a pointer to an array of pname:stageCount 1353 slink:VkPipelineShaderStageCreateInfo structures describing the set of 1354 the shader stages to be included in the graphics pipeline. 1355 * pname:pVertexInputState is a pointer to a 1356 slink:VkPipelineVertexInputStateCreateInfo structure. 1357ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1358 It is ignored if the pipeline includes a mesh shader stage. 1359endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1360ifdef::VK_EXT_vertex_input_dynamic_state[] 1361 It can: be `NULL` if the pipeline is created with the 1362 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state set. 1363endif::VK_EXT_vertex_input_dynamic_state[] 1364 * pname:pInputAssemblyState is a pointer to a 1365 slink:VkPipelineInputAssemblyStateCreateInfo structure which determines 1366 input assembly behavior for vertex shading, as described in <<drawing, 1367 Drawing Commands>>. 1368ifdef::VK_EXT_extended_dynamic_state3[] 1369 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1370 can: be `NULL` if the pipeline is created with both 1371 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, and 1372 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic states set and 1373 <<limits-dynamicPrimitiveTopologyUnrestricted, 1374 pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_TRUE. 1375endif::VK_EXT_extended_dynamic_state3[] 1376ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1377 It is ignored if the pipeline includes a mesh shader stage. 1378endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1379 * pname:pTessellationState is a pointer to a 1380 slink:VkPipelineTessellationStateCreateInfo structure defining 1381 tessellation state used by tessellation shaders. 1382ifdef::VK_EXT_extended_dynamic_state2[] 1383 It can: be `NULL` if the pipeline is created with the 1384 ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state set. 1385endif::VK_EXT_extended_dynamic_state2[] 1386 * pname:pViewportState is a pointer to a 1387 slink:VkPipelineViewportStateCreateInfo structure defining viewport 1388 state used when rasterization is enabled. 1389ifdef::VK_EXT_extended_dynamic_state3[] 1390 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1391 can: be `NULL` if the pipeline is created with both 1392 ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, and 1393 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic states set. 1394endif::VK_EXT_extended_dynamic_state3[] 1395 * pname:pRasterizationState is a pointer to a 1396 slink:VkPipelineRasterizationStateCreateInfo structure defining 1397 rasterization state. 1398ifdef::VK_EXT_extended_dynamic_state3[] 1399 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1400 can: be `NULL` if the pipeline is created with all of 1401 ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT, 1402 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, 1403 ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT, 1404 ename:VK_DYNAMIC_STATE_CULL_MODE, ename:VK_DYNAMIC_STATE_FRONT_FACE, 1405 ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, 1406 ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and ename:VK_DYNAMIC_STATE_LINE_WIDTH 1407 dynamic states set. 1408endif::VK_EXT_extended_dynamic_state3[] 1409 * pname:pMultisampleState is a pointer to a 1410 slink:VkPipelineMultisampleStateCreateInfo structure defining 1411 multisample state used when rasterization is enabled. 1412ifdef::VK_EXT_extended_dynamic_state3[] 1413 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1414 can: be `NULL` if the pipeline is created with all of 1415 ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, 1416 ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, and 1417 ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states set, 1418 and either <<features-alphaToOne,alphaToOne>> is disabled on the device 1419 or ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is set, in which case 1420 slink:VkPipelineMultisampleStateCreateInfo::pname:sampleShadingEnable is 1421 assumed to be ename:VK_FALSE. 1422endif::VK_EXT_extended_dynamic_state3[] 1423 * pname:pDepthStencilState is a pointer to a 1424 slink:VkPipelineDepthStencilStateCreateInfo structure defining 1425 depth/stencil state used when rasterization is enabled for depth or 1426 stencil attachments accessed during rendering. 1427ifdef::VK_EXT_extended_dynamic_state3[] 1428 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1429 can: be `NULL` if the pipeline is created with all of 1430 ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, 1431 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, 1432 ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, 1433 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, 1434 ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, 1435 ename:VK_DYNAMIC_STATE_STENCIL_OP, and 1436 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states set. 1437endif::VK_EXT_extended_dynamic_state3[] 1438 * pname:pColorBlendState is a pointer to a 1439 slink:VkPipelineColorBlendStateCreateInfo structure defining color blend 1440 state used when rasterization is enabled for any color attachments 1441 accessed during rendering. 1442ifdef::VK_EXT_extended_dynamic_state3[] 1443 If the `apiext:VK_EXT_extended_dynamic_state3` extension is enabled, it 1444 can: be `NULL` if the pipeline is created with all of 1445 ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, 1446 ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT, 1447 ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, 1448 ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, 1449 ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and 1450 ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states set. 1451endif::VK_EXT_extended_dynamic_state3[] 1452 * pname:pDynamicState is a pointer to a 1453 slink:VkPipelineDynamicStateCreateInfo structure defining which 1454 properties of the pipeline state object are dynamic and can: be changed 1455 independently of the pipeline state. 1456 This can: be `NULL`, which means no state in the pipeline is considered 1457 dynamic. 1458 * pname:layout is the description of binding locations used by both the 1459 pipeline and descriptor sets used with the pipeline. 1460 * pname:renderPass is a handle to a render pass object describing the 1461 environment in which the pipeline will be used. 1462 The pipeline must: only be used with a render pass instance compatible 1463 with the one provided. 1464 See <<renderpass-compatibility,Render Pass Compatibility>> for more 1465 information. 1466 * pname:subpass is the index of the subpass in the render pass where this 1467 pipeline will be used. 1468 * pname:basePipelineHandle is a pipeline to derive from. 1469ifdef::VKSC_VERSION_1_0[] 1470 This is not used in Vulkan SC <<SCID-8>>. 1471endif::VKSC_VERSION_1_0[] 1472 * pname:basePipelineIndex is an index into the pname:pCreateInfos 1473 parameter to use as a pipeline to derive from. 1474ifdef::VKSC_VERSION_1_0[] 1475 This is not used in Vulkan SC <<SCID-8>>. 1476endif::VKSC_VERSION_1_0[] 1477 1478The parameters pname:basePipelineHandle and pname:basePipelineIndex are 1479described in more detail in <<pipelines-pipeline-derivatives,Pipeline 1480Derivatives>>. 1481 1482 1483ifdef::VK_NV_glsl_shader[] 1484If any shader stage fails to compile, 1485ifdef::VK_EXT_debug_report[] 1486the compile log will be reported back to the application, and 1487endif::VK_EXT_debug_report[] 1488ename:VK_ERROR_INVALID_SHADER_NV will be generated. 1489endif::VK_NV_glsl_shader[] 1490 1491ifdef::VK_EXT_extended_dynamic_state3[] 1492[NOTE] 1493.Note 1494==== 1495With `apiext:VK_EXT_extended_dynamic_state3`, it is possible that many of 1496the sname:VkGraphicsPipelineCreateInfo members above can: be `NULL` because 1497all their state is dynamic and therefore ignored. 1498This is optional so the application can: still use a valid pointer if it 1499needs to set the pname:pNext or pname:flags fields to specify state for 1500other extensions. 1501==== 1502endif::VK_EXT_extended_dynamic_state3[] 1503 1504[[pipelines-graphics-subsets]] 1505The state required for a graphics pipeline is divided into 1506<<pipelines-graphics-subsets-vertex-input, vertex input state>>, 1507<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader 1508state>>, <<pipelines-graphics-subsets-fragment-shader,fragment shader 1509state>>, and <<pipelines-graphics-subsets-fragment-output,fragment output 1510state>>. 1511 1512[[pipelines-graphics-subsets-vertex-input]] 1513.Vertex Input State 1514Vertex input state is defined by: 1515 1516 * slink:VkPipelineVertexInputStateCreateInfo 1517 * slink:VkPipelineInputAssemblyStateCreateInfo 1518 1519ifndef::VK_EXT_mesh_shader[] 1520This state must: be specified to create a 1521<<pipelines-graphics-subsets-complete,complete graphics pipeline>>. 1522endif::VK_EXT_mesh_shader[] 1523 1524ifdef::VK_EXT_mesh_shader[] 1525If 1526ifdef::VK_EXT_graphics_pipeline_library[] 1527this pipeline specifies 1528<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> 1529either directly or by including it as a pipeline library and its 1530endif::VK_EXT_graphics_pipeline_library[] 1531pname:pStages includes a vertex shader, this state must: be specified to 1532create a <<pipelines-graphics-subsets-complete,complete graphics pipeline>>. 1533endif::VK_EXT_mesh_shader[] 1534 1535ifdef::VK_EXT_graphics_pipeline_library[] 1536If a pipeline includes 1537ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT in 1538slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly 1539or as a default, and either the conditions requiring this state for a 1540<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met 1541or this pipeline does not specify 1542<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in 1543any way, that pipeline must: specify this state directly. 1544endif::VK_EXT_graphics_pipeline_library[] 1545 1546 1547[[pipelines-graphics-subsets-pre-rasterization]] 1548.Pre-Rasterization Shader State 1549Pre-rasterization shader state is defined by: 1550 1551 * slink:VkPipelineShaderStageCreateInfo entries for: 1552 ** Vertex shaders 1553 ** Tessellation control shaders 1554 ** Tessellation evaluation shaders 1555 ** Geometry shaders 1556ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1557 ** Task shaders 1558 ** Mesh shaders 1559endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1560ifdef::VK_EXT_graphics_pipeline_library[] 1561 * Within the slink:VkPipelineLayout, all descriptor sets with 1562 pre-rasterization shader bindings if 1563 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified. 1564 ** If ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not 1565 specified, the full pipeline layout must be specified. 1566endif::VK_EXT_graphics_pipeline_library[] 1567ifndef::VK_EXT_graphics_pipeline_library[] 1568 * Within the slink:VkPipelineLayout, the full pipeline layout must be 1569 specified. 1570endif::VK_EXT_graphics_pipeline_library[] 1571 * slink:VkPipelineViewportStateCreateInfo 1572 * slink:VkPipelineRasterizationStateCreateInfo 1573 * slink:VkPipelineTessellationStateCreateInfo 1574 * slink:VkRenderPass and pname:subpass parameter 1575ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1576 * The pname:viewMask parameter of slink:VkPipelineRenderingCreateInfo 1577 (formats are ignored) 1578endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1579ifdef::VK_EXT_discard_rectangles[] 1580 * slink:VkPipelineDiscardRectangleStateCreateInfoEXT 1581endif::VK_EXT_discard_rectangles[] 1582ifdef::VK_KHR_fragment_shading_rate[] 1583 * slink:VkPipelineFragmentShadingRateStateCreateInfoKHR 1584endif::VK_KHR_fragment_shading_rate[] 1585 1586This state must: be specified to create a 1587<<pipelines-graphics-subsets-complete,complete graphics pipeline>>. 1588 1589ifdef::VK_EXT_graphics_pipeline_library[] 1590If either the pname:pNext chain includes a 1591slink:VkGraphicsPipelineLibraryCreateInfoEXT structure with 1592ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT 1593included in pname:flags, or it is not specified and would default to include 1594that value, this state must: be specified in the pipeline. 1595endif::VK_EXT_graphics_pipeline_library[] 1596 1597 1598[[pipelines-graphics-subsets-fragment-shader]] 1599.Fragment Shader State 1600Fragment shader state is defined by: 1601 1602 * A slink:VkPipelineShaderStageCreateInfo entry for the fragment shader 1603ifdef::VK_EXT_graphics_pipeline_library[] 1604 * Within the slink:VkPipelineLayout, all descriptor sets with fragment 1605 shader bindings if 1606 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was specified. 1607 ** If ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT was not 1608 specified, the full pipeline layout must be specified. 1609endif::VK_EXT_graphics_pipeline_library[] 1610ifndef::VK_EXT_graphics_pipeline_library[] 1611 * Within the slink:VkPipelineLayout, the full pipeline layout must be 1612 specified. 1613endif::VK_EXT_graphics_pipeline_library[] 1614 * slink:VkPipelineMultisampleStateCreateInfo 1615ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1616 if <<primsrast-sampleshading, sample shading>> is enabled or 1617 pname:renderpass is not dlink:VK_NULL_HANDLE 1618endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1619 * slink:VkPipelineDepthStencilStateCreateInfo 1620 * slink:VkRenderPass and pname:subpass parameter 1621ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1622 * The pname:viewMask parameter of slink:VkPipelineRenderingCreateInfo 1623 (formats are ignored) 1624endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1625ifdef::VK_KHR_fragment_shading_rate[] 1626 * slink:VkPipelineFragmentShadingRateStateCreateInfoKHR 1627ifdef::VK_NV_fragment_shading_rate_enums[] 1628 * slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV 1629endif::VK_NV_fragment_shading_rate_enums[] 1630endif::VK_KHR_fragment_shading_rate[] 1631ifdef::VK_NV_representative_fragment_test[] 1632 * slink:VkPipelineRepresentativeFragmentTestStateCreateInfoNV 1633endif::VK_NV_representative_fragment_test[] 1634ifdef::VK_KHR_fragment_shading_rate[] 1635 * Inclusion/omission of the 1636 ename:VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR 1637 flag 1638endif::VK_KHR_fragment_shading_rate[] 1639ifdef::VK_EXT_fragment_density_map[] 1640 * Inclusion/omission of the 1641 ename:VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT 1642 flag 1643endif::VK_EXT_fragment_density_map[] 1644 1645If 1646ifdef::VK_EXT_graphics_pipeline_library[] 1647a pipeline specifies 1648<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> 1649either directly or by including it as a pipeline library and 1650endif::VK_EXT_graphics_pipeline_library[] 1651pname:rasterizerDiscardEnable is set to ename:VK_FALSE 1652ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 1653or ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, 1654endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 1655ifdef::VK_EXT_graphics_pipeline_library[] 1656endif::VK_EXT_graphics_pipeline_library[] 1657this state must: be specified to create a 1658<<pipelines-graphics-subsets-complete,complete graphics pipeline>>. 1659 1660ifdef::VK_EXT_graphics_pipeline_library[] 1661If a pipeline includes 1662ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT in 1663slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly 1664or as a default, and either the conditions requiring this state for a 1665<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met 1666or this pipeline does not specify 1667<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in 1668any way, that pipeline must: specify this state directly. 1669endif::VK_EXT_graphics_pipeline_library[] 1670 1671 1672[[pipelines-graphics-subsets-fragment-output]] 1673.Fragment Output State 1674Fragment output state is defined by: 1675 1676 * slink:VkPipelineColorBlendStateCreateInfo 1677 * slink:VkRenderPass and pname:subpass parameter 1678 * slink:VkPipelineMultisampleStateCreateInfo 1679ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1680 * slink:VkPipelineRenderingCreateInfo 1681ifdef::VK_AMD_mixed_attachment_samples[] 1682 * slink:VkAttachmentSampleCountInfoAMD 1683endif::VK_AMD_mixed_attachment_samples[] 1684ifdef::VK_NV_framebuffer_mixed_samples[] 1685 * slink:VkAttachmentSampleCountInfoNV 1686endif::VK_NV_framebuffer_mixed_samples[] 1687ifdef::VK_ANDROID_external_format_resolve[] 1688 * slink:VkExternalFormatANDROID 1689endif::VK_ANDROID_external_format_resolve[] 1690endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 1691ifdef::VK_EXT_attachment_feedback_loop_layout[] 1692 * Inclusion/omission of the 1693 ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT and 1694 ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 1695 flags 1696endif::VK_EXT_attachment_feedback_loop_layout[] 1697 1698If 1699ifdef::VK_EXT_graphics_pipeline_library[] 1700a pipeline specifies 1701<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> 1702either directly or by including it as a pipeline library and 1703endif::VK_EXT_graphics_pipeline_library[] 1704pname:rasterizerDiscardEnable is set to ename:VK_FALSE 1705ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 1706or ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, 1707endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 1708ifdef::VK_EXT_graphics_pipeline_library[] 1709endif::VK_EXT_graphics_pipeline_library[] 1710this state must: be specified to create a 1711<<pipelines-graphics-subsets-complete,complete graphics pipeline>>. 1712 1713ifdef::VK_EXT_graphics_pipeline_library[] 1714If a pipeline includes 1715ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT in 1716slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags either explicitly 1717or as a default, and either the conditions requiring this state for a 1718<<pipelines-graphics-subsets-complete,complete graphics pipeline>> are met 1719or this pipeline does not specify 1720<<pipelines-graphics-subsets-pre-rasterization,pre-rasterization state>> in 1721any way, that pipeline must: specify this state directly. 1722endif::VK_EXT_graphics_pipeline_library[] 1723 1724 1725[[pipelines-graphics-subsets-dynamic-state]] 1726.Dynamic State 1727Dynamic state values set via pname:pDynamicState must: be ignored if the 1728state they correspond to is not otherwise statically set by one of the state 1729subsets used to create the pipeline. 1730ifdef::VK_EXT_graphics_pipeline_library[] 1731Additionally, setting dynamic state values must: not modify whether state in 1732a linked library is static or dynamic; this is set and unchangeable when the 1733library is created. 1734endif::VK_EXT_graphics_pipeline_library[] 1735For example, if a pipeline only included 1736<<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 1737state>>, then any dynamic state value corresponding to depth or stencil 1738testing has no effect. 1739ifdef::VK_EXT_graphics_pipeline_library[] 1740Any linked library that has dynamic state enabled that same dynamic state 1741must: also be enabled in all the other linked libraries to which that 1742dynamic state applies. 1743endif::VK_EXT_graphics_pipeline_library[] 1744 1745[[pipelines-graphics-subsets-complete]] 1746.Complete Graphics Pipelines 1747 1748A complete graphics pipeline always includes 1749<<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 1750state>>, with other subsets included depending on that state as specified in 1751the above sections. 1752 1753ifdef::VK_EXT_graphics_pipeline_library[] 1754.Graphics Pipeline Library Layouts 1755 1756If different subsets are linked together with pipeline layouts created with 1757ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the final 1758effective pipeline layout is effectively the union of the linked pipeline 1759layouts. 1760When binding descriptor sets for this pipeline, the pipeline layout used 1761must: be compatible with this union. 1762This pipeline layout can: be overridden when linking with 1763ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a 1764slink:VkPipelineLayout that is <<descriptorsets-compatibility,compatible>> 1765with this union other than 1766ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, or when linking 1767without ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing 1768a slink:VkPipelineLayout that is fully 1769<<descriptorsets-compatibility,compatible>> with this union. 1770endif::VK_EXT_graphics_pipeline_library[] 1771 1772ifdef::VK_KHR_maintenance5[] 1773If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the 1774pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags 1775from that structure is used instead of pname:flags from this structure. 1776endif::VK_KHR_maintenance5[] 1777 1778ifdef::VKSC_VERSION_1_0[] 1779In Vulkan SC, the pipeline compilation process occurs 1780<<pipelines-offline-compilation,offline>> and the pname:pStages are not 1781needed at runtime and may: be omitted. 1782If omitted, pname:stageCount must: be set to `0` and pname:pStages must: be 1783`NULL`. 1784If provided, the values must: match the values specified to the offline 1785compiler. 1786endif::VKSC_VERSION_1_0[] 1787 1788.Valid Usage 1789**** 1790:pipelineType: graphics 1791include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[] 1792 * [[VUID-VkGraphicsPipelineCreateInfo-stage-02096]] 1793 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1794 pre-rasterization shader state>> the pname:stage member of one element 1795 of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT 1796ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1797 or ename:VK_SHADER_STAGE_MESH_BIT_EXT 1798endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1799ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1800 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02095]] 1801 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1802 pre-rasterization shader state>> the geometric shader stages provided in 1803 pname:pStages must: be either from the mesh shading pipeline 1804 (pname:stage is ename:VK_SHADER_STAGE_TASK_BIT_EXT or 1805 ename:VK_SHADER_STAGE_MESH_BIT_EXT) or from the primitive shading 1806 pipeline (pname:stage is ename:VK_SHADER_STAGE_VERTEX_BIT, 1807 ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, 1808 ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or 1809 ename:VK_SHADER_STAGE_GEOMETRY_BIT) 1810endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1811ifdef::VK_NV_mesh_shader+VK_EXT_mesh_shader[] 1812 * [[VUID-VkGraphicsPipelineCreateInfo-TaskNV-07063]] 1813 The shader stages for ename:VK_SHADER_STAGE_TASK_BIT_EXT or 1814 ename:VK_SHADER_STAGE_MESH_BIT_EXT must: use either the code:TaskNV and 1815 code:MeshNV {ExecutionModel} or the code:TaskEXT and code:MeshEXT 1816 {ExecutionModel}, but must: not use both 1817endif::VK_NV_mesh_shader+VK_EXT_mesh_shader[] 1818 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00729]] 1819 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1820 pre-rasterization shader state>> and pname:pStages includes a 1821 tessellation control shader stage, it must: include a tessellation 1822 evaluation shader stage 1823 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00730]] 1824 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1825 pre-rasterization shader state>> and pname:pStages includes a 1826 tessellation evaluation shader stage, it must: include a tessellation 1827 control shader stage 1828 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-09022]] 1829 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1830 pre-rasterization shader state>> and pname:pStages includes a 1831 tessellation control shader stage, 1832ifdef::VK_EXT_extended_dynamic_state3[] 1833 and the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled 1834 or the ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state is 1835 not set, 1836endif::VK_EXT_extended_dynamic_state3[] 1837 pname:pTessellationState must: be a valid pointer to a valid 1838 slink:VkPipelineTessellationStateCreateInfo structure 1839ifdef::VK_EXT_extended_dynamic_state3[] 1840 * [[VUID-VkGraphicsPipelineCreateInfo-pTessellationState-09023]] 1841 If pname:pTessellationState is not `NULL` it must: be a pointer to a 1842 valid slink:VkPipelineTessellationStateCreateInfo structure 1843endif::VK_EXT_extended_dynamic_state3[] 1844 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00732]] 1845 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1846 pre-rasterization shader state>> and pname:pStages includes tessellation 1847 shader stages, the shader code of at least one stage must: contain an 1848 code:OpExecutionMode instruction specifying the type of subdivision in 1849 the pipeline 1850 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00733]] 1851 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1852 pre-rasterization shader state>> and pname:pStages includes tessellation 1853 shader stages, and the shader code of both stages contain an 1854 code:OpExecutionMode instruction specifying the type of subdivision in 1855 the pipeline, they must: both specify the same subdivision mode 1856 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00734]] 1857 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1858 pre-rasterization shader state>> and pname:pStages includes tessellation 1859 shader stages, the shader code of at least one stage must: contain an 1860 code:OpExecutionMode instruction specifying the output patch size in the 1861 pipeline 1862 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00735]] 1863 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1864 pre-rasterization shader state>> and pname:pStages includes tessellation 1865 shader stages, and the shader code of both contain an 1866 code:OpExecutionMode instruction specifying the out patch size in the 1867 pipeline, they must: both specify the same patch size 1868 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08888]] 1869 If the pipeline is being created with 1870 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 1871 state>> and <<pipelines-graphics-subsets-vertex-input, vertex input 1872 state>> and pname:pStages includes tessellation shader stages, 1873ifdef::VK_EXT_extended_dynamic_state3[] 1874 and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is 1875 not enabled or 1876 <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> 1877 is ename:VK_FALSE, 1878endif::VK_EXT_extended_dynamic_state3[] 1879 the pname:topology member of pname:pInputAssembly must: be 1880 ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST 1881 * [[VUID-VkGraphicsPipelineCreateInfo-topology-08889]] 1882 If the pipeline is being created with 1883 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 1884 state>> and <<pipelines-graphics-subsets-vertex-input, vertex input 1885 state>> and the pname:topology member of pname:pInputAssembly is 1886 ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, 1887ifdef::VK_EXT_extended_dynamic_state3[] 1888 and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is 1889 not enabled or 1890 <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> 1891 is ename:VK_FALSE, 1892endif::VK_EXT_extended_dynamic_state3[] 1893 then pname:pStages must: include tessellation shader stages 1894 * [[VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723]] 1895 If the pipeline is being created with a code:TessellationEvaluation 1896 {ExecutionModel}, no code:Geometry {ExecutionModel}, uses the 1897 code:PointMode {ExecutionMode}, and 1898 <<features-shaderTessellationAndGeometryPointSize, 1899 pname:shaderTessellationAndGeometryPointSize>> is enabled, a 1900 code:PointSize decorated variable must: be written to 1901ifdef::VK_KHR_maintenance5[] 1902 if <<features-maintenance5, pname:maintenance5>> is not enabled 1903endif::VK_KHR_maintenance5[] 1904 * [[VUID-VkGraphicsPipelineCreateInfo-topology-08773]] 1905 If the pipeline is being created with a code:Vertex {ExecutionModel} and 1906 no code:TessellationEvaluation or code:Geometry {ExecutionModel}, and 1907 the pname:topology member of pname:pInputAssembly is 1908 ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, 1909ifdef::VK_EXT_extended_dynamic_state3[] 1910 and either ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is 1911 not enabled or 1912 <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> 1913 is ename:VK_FALSE, 1914endif::VK_EXT_extended_dynamic_state3[] 1915 a code:PointSize decorated variable must: be written to 1916ifdef::VK_KHR_maintenance5[] 1917 if <<features-maintenance5, pname:maintenance5>> is not enabled 1918endif::VK_KHR_maintenance5[] 1919ifdef::VK_KHR_maintenance5[] 1920 * [[VUID-VkGraphicsPipelineCreateInfo-maintenance5-08775]] 1921 If <<features-maintenance5, pname:maintenance5>> is enabled and a 1922 code:PointSize decorated variable is written to, all execution paths 1923 must: write to a code:PointSize decorated variable 1924endif::VK_KHR_maintenance5[] 1925 * [[VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07724]] 1926 If the pipeline is being created with a code:TessellationEvaluation 1927 {ExecutionModel}, no code:Geometry {ExecutionModel}, uses the 1928 code:PointMode {ExecutionMode}, and 1929 <<features-shaderTessellationAndGeometryPointSize, 1930 pname:shaderTessellationAndGeometryPointSize>> is not enabled, a 1931 code:PointSize decorated variable must: not be written to 1932 * [[VUID-VkGraphicsPipelineCreateInfo-shaderTessellationAndGeometryPointSize-08776]] 1933 If the pipeline is being created with a code:Geometry {ExecutionModel}, 1934 uses the code:OutputPoints {ExecutionMode}, and 1935 <<features-shaderTessellationAndGeometryPointSize, 1936 pname:shaderTessellationAndGeometryPointSize>> is enabled, a 1937 code:PointSize decorated variable must: be written to for every vertex 1938 emitted 1939ifdef::VK_KHR_maintenance5[] 1940 if <<features-maintenance5, pname:maintenance5>> is not enabled 1941endif::VK_KHR_maintenance5[] 1942 * [[VUID-VkGraphicsPipelineCreateInfo-Geometry-07726]] 1943 If the pipeline is being created with a code:Geometry {ExecutionModel}, 1944 uses the code:OutputPoints {ExecutionMode}, and 1945 <<features-shaderTessellationAndGeometryPointSize, 1946 pname:shaderTessellationAndGeometryPointSize>> is not enabled, a 1947 code:PointSize decorated variable must: not be written to 1948 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00738]] 1949 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1950 pre-rasterization shader state>> and pname:pStages includes a geometry 1951 shader stage, and does not include any tessellation shader stages, its 1952 shader code must: contain an code:OpExecutionMode instruction specifying 1953 an input primitive type that is <<shaders-geometry-execution, 1954 compatible>> with the primitive topology specified in 1955 pname:pInputAssembly 1956 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00739]] 1957 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1958 pre-rasterization shader state>> and pname:pStages includes a geometry 1959 shader stage, and also includes tessellation shader stages, its shader 1960 code must: contain an code:OpExecutionMode instruction specifying an 1961 input primitive type that is <<shaders-geometry-execution, compatible>> 1962 with the primitive topology that is output by the tessellation stages 1963 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00740]] 1964 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1965 pre-rasterization shader state>> and 1966 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 1967 it includes both a fragment shader and a geometry shader, and the 1968 fragment shader code reads from an input variable that is decorated with 1969 code:PrimitiveId, then the geometry shader code must: write to a 1970 matching output variable, decorated with code:PrimitiveId, in all 1971 execution paths 1972ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1973 * [[VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264]] 1974 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1975 pre-rasterization shader state>>, it includes a mesh shader and the 1976 fragment shader code reads from an input variable that is decorated with 1977 code:PrimitiveId, then the mesh shader code must: write to a matching 1978 output variable, decorated with code:PrimitiveId, in all execution paths 1979endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 1980 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06038]] 1981 If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is 1982 being created with <<pipelines-graphics-subsets-fragment-shader, 1983 fragment shader state>> the fragment shader must: not read from any 1984 input attachment that is defined as ename:VK_ATTACHMENT_UNUSED in 1985 pname:subpass 1986 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-00742]] 1987 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1988 pre-rasterization shader state>> and multiple pre-rasterization shader 1989 stages are included in pname:pStages, the shader code for the entry 1990 points identified by those pname:pStages and the rest of the state 1991 identified by this structure must: adhere to the pipeline linking rules 1992 described in the <<interfaces,Shader Interfaces>> chapter 1993 * [[VUID-VkGraphicsPipelineCreateInfo-None-04889]] 1994 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 1995 pre-rasterization shader state>> and 1996 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 1997 the fragment shader and last 1998 <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader 1999 stage>> and any relevant state must: adhere to the pipeline linking 2000 rules described in the <<interfaces,Shader Interfaces>> chapter 2001 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06041]] 2002 If pname:renderPass is not dlink:VK_NULL_HANDLE, and the pipeline is 2003 being created with <<pipelines-graphics-subsets-fragment-output, 2004 fragment output interface state>>, then for each color attachment in the 2005 subpass, if the <<potential-format-features,potential format features>> 2006 of the format of the corresponding attachment description do not contain 2007 ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the 2008 pname:blendEnable member of the corresponding element of the 2009 pname:pAttachments member of pname:pColorBlendState must: be 2010 ename:VK_FALSE 2011 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07609]] 2012 If pname:renderPass is not dlink:VK_NULL_HANDLE, and the pipeline is 2013 being created with <<pipelines-graphics-subsets-fragment-output, 2014 fragment output interface state>>, and the pname:pColorBlendState 2015 pointer is not `NULL`, and the subpass uses color attachments, the 2016 pname:attachmentCount member of pname:pColorBlendState must: be equal to 2017 the pname:colorAttachmentCount used to create pname:subpass 2018 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04130]] 2019 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2020 pre-rasterization shader state>>, and pname:pViewportState->pViewports 2021 is not dynamic, then pname:pViewportState->pViewports must: be a valid 2022 pointer to an array of pname:pViewportState->viewportCount valid 2023 sname:VkViewport structures 2024 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04131]] 2025 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2026 pre-rasterization shader state>>, and pname:pViewportState->pScissors is 2027 not dynamic, then pname:pViewportState->pScissors must: be a valid 2028 pointer to an array of pname:pViewportState->scissorCount sname:VkRect2D 2029 structures 2030 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749]] 2031 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2032 pre-rasterization shader state>>, and the <<features-wideLines, 2033 pname:wideLines>> feature is not enabled, and no element of the 2034 pname:pDynamicStates member of pname:pDynamicState is 2035 ename:VK_DYNAMIC_STATE_LINE_WIDTH, the pname:lineWidth member of 2036 pname:pRasterizationState must: be `1.0` 2037ifndef::VK_EXT_extended_dynamic_state3[] 2038 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750]] 2039 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2040 pre-rasterization shader state>>, and the pname:rasterizerDiscardEnable 2041 member of pname:pRasterizationState is ename:VK_FALSE, 2042 pname:pViewportState must: be a valid pointer to a valid 2043 slink:VkPipelineViewportStateCreateInfo structure 2044endif::VK_EXT_extended_dynamic_state3[] 2045ifdef::VK_EXT_extended_dynamic_state3[] 2046 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-09024]] 2047 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2048 pre-rasterization shader state>>, and the 2049 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state is 2050 enabled or the pname:rasterizerDiscardEnable member of 2051 pname:pRasterizationState is ename:VK_FALSE, and either the 2052 `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, or 2053 either the ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT or 2054 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT dynamic states are not set, 2055 pname:pViewportState must: be a valid pointer to a valid 2056 slink:VkPipelineViewportStateCreateInfo structure 2057 * [[VUID-VkGraphicsPipelineCreateInfo-pViewportState-09025]] 2058 If pname:pViewportState is not `NULL` it must: be a valid pointer to a 2059 valid slink:VkPipelineViewportStateCreateInfo structure 2060endif::VK_EXT_extended_dynamic_state3[] 2061ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 2062 * [[VUID-VkGraphicsPipelineCreateInfo-pViewportState-04892]] 2063 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2064 pre-rasterization shader state>>, and the graphics pipeline state was 2065 created with the ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE 2066 dynamic state enabled, pname:pViewportState must: be a valid pointer to 2067 a valid slink:VkPipelineViewportStateCreateInfo structure 2068endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 2069ifndef::VK_EXT_extended_dynamic_state3[] 2070 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751]] 2071 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2072 fragment output interface state>>, pname:pMultisampleState must: be a 2073 valid pointer to a valid slink:VkPipelineMultisampleStateCreateInfo 2074 structure 2075endif::VK_EXT_extended_dynamic_state3[] 2076ifdef::VK_EXT_extended_dynamic_state3[] 2077 * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09026]] 2078 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2079 fragment output interface state>>, and the 2080 `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled or any 2081 of the ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, 2082 ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or 2083 ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states is 2084 not set, or <<features-alphaToOne,alphaToOne>> is enabled on the device 2085 and ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, 2086 pname:pMultisampleState must: be a valid pointer to a valid 2087 slink:VkPipelineMultisampleStateCreateInfo structure 2088 * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027]] 2089 If pname:pMultisampleState is not `NULL` is must: be a valid pointer to 2090 a valid slink:VkPipelineMultisampleStateCreateInfo structure 2091endif::VK_EXT_extended_dynamic_state3[] 2092 * [[VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891]] 2093 If the pipeline is being created with 2094 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 2095 the 2096 slink:VkPipelineMultisampleStateCreateInfo::pname:alphaToCoverageEnable 2097 is not ignored and is ename:VK_TRUE, then the 2098 <<interfaces-fragmentoutput, Fragment Output Interface>> must: contain a 2099 variable for the alpha code:Component word in code:Location 0 at 2100 code:Index 0 2101ifndef::VK_EXT_extended_dynamic_state3[] 2102 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06043]] 2103 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2104 created with <<pipelines-graphics-subsets-fragment-shader, fragment 2105 shader state>>, and pname:subpass uses a depth/stencil attachment, 2106 pname:pDepthStencilState must: be a valid pointer to a valid 2107 slink:VkPipelineDepthStencilStateCreateInfo structure 2108endif::VK_EXT_extended_dynamic_state3[] 2109ifdef::VK_EXT_extended_dynamic_state3[] 2110 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09028]] 2111 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2112 created with <<pipelines-graphics-subsets-fragment-shader, fragment 2113 shader state>>, and pname:subpass uses a depth/stencil attachment, and 2114 the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled or, 2115 any of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, 2116 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, 2117 ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, 2118 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, 2119 ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, 2120 ename:VK_DYNAMIC_STATE_STENCIL_OP, or 2121 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set, 2122 pname:pDepthStencilState must: be a valid pointer to a valid 2123 slink:VkPipelineDepthStencilStateCreateInfo structure 2124 * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09029]] 2125 If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to 2126 a valid slink:VkPipelineDepthStencilStateCreateInfo structure 2127endif::VK_EXT_extended_dynamic_state3[] 2128ifndef::VK_EXT_extended_dynamic_state3[] 2129 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06044]] 2130 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2131 created with <<pipelines-graphics-subsets-fragment-output, fragment 2132 output interface state>>, and pname:subpass uses color attachments, 2133 pname:pColorBlendState must: be a valid pointer to a valid 2134 slink:VkPipelineColorBlendStateCreateInfo structure 2135endif::VK_EXT_extended_dynamic_state3[] 2136ifdef::VK_EXT_extended_dynamic_state3[] 2137 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09030]] 2138 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2139 created with <<pipelines-graphics-subsets-fragment-output, fragment 2140 output interface state>>, and pname:subpass uses color attachments, and 2141 `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, or any 2142 of the ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, 2143 ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT, 2144 ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, 2145 ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, 2146 ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, or 2147 ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states are not set, 2148 pname:pColorBlendState must: be a valid pointer to a valid 2149 slink:VkPipelineColorBlendStateCreateInfo structure 2150endif::VK_EXT_extended_dynamic_state3[] 2151 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754]] 2152 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2153 pre-rasterization shader state>>, the <<features-depthBiasClamp, 2154 pname:depthBiasClamp>> feature is not enabled, no element of the 2155 pname:pDynamicStates member of pname:pDynamicState is 2156 ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and the pname:depthBiasEnable member 2157 of pname:pRasterizationState is ename:VK_TRUE, the pname:depthBiasClamp 2158 member of pname:pRasterizationState must: be `0.0` 2159ifndef::VK_EXT_depth_range_unrestricted[] 2160 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00755]] 2161 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2162 fragment shader state>>, and no element of the pname:pDynamicStates 2163 member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, 2164 and the pname:depthBoundsTestEnable member of pname:pDepthStencilState 2165 is ename:VK_TRUE, the pname:minDepthBounds and pname:maxDepthBounds 2166 members of pname:pDepthStencilState must: be between `0.0` and `1.0`, 2167 inclusive 2168endif::VK_EXT_depth_range_unrestricted[] 2169ifdef::VK_EXT_depth_range_unrestricted[] 2170 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-02510]] 2171 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2172 fragment shader state>>, and the 2173 `apiext:VK_EXT_depth_range_unrestricted` extension is not enabled and no 2174 element of the pname:pDynamicStates member of pname:pDynamicState is 2175 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the pname:depthBoundsTestEnable 2176 member of pname:pDepthStencilState is ename:VK_TRUE, the 2177 pname:minDepthBounds and pname:maxDepthBounds members of 2178 pname:pDepthStencilState must: be between `0.0` and `1.0`, inclusive 2179endif::VK_EXT_depth_range_unrestricted[] 2180ifdef::VK_EXT_sample_locations[] 2181 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07610]] 2182 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2183 fragment shader state>> or <<pipelines-graphics-subsets-fragment-output, 2184 fragment output interface state>>, and pname:rasterizationSamples and 2185 pname:sampleLocationsInfo are not dynamic, and 2186 slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable 2187 included in the pname:pNext chain of pname:pMultisampleState is 2188 ename:VK_TRUE, pname:sampleLocationsInfo.sampleLocationGridSize.width 2189 must: evenly divide 2190 slink:VkMultisamplePropertiesEXT::pname:sampleLocationGridSize.width as 2191 returned by flink:vkGetPhysicalDeviceMultisamplePropertiesEXT with a 2192 pname:samples parameter equaling pname:rasterizationSamples 2193 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07611]] 2194 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2195 fragment shader state>> or <<pipelines-graphics-subsets-fragment-output, 2196 fragment output interface state>>, and pname:rasterizationSamples and 2197 pname:sampleLocationsInfo are not dynamic, and 2198 slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable 2199 the included in the pname:pNext chain of pname:pMultisampleState is 2200 ename:VK_TRUE or ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is 2201 used, pname:sampleLocationsInfo.sampleLocationGridSize.height must: 2202 evenly divide 2203 slink:VkMultisamplePropertiesEXT::pname:sampleLocationGridSize.height as 2204 returned by flink:vkGetPhysicalDeviceMultisamplePropertiesEXT with a 2205 pname:samples parameter equaling pname:rasterizationSamples 2206 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07612]] 2207 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2208 fragment shader state>> or <<pipelines-graphics-subsets-fragment-output, 2209 fragment output interface state>>, and pname:rasterizationSamples and 2210 pname:sampleLocationsInfo are not dynamic, and 2211 slink:VkPipelineSampleLocationsStateCreateInfoEXT::pname:sampleLocationsEnable 2212 included in the pname:pNext chain of pname:pMultisampleState is 2213 ename:VK_TRUE or ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is 2214 used, pname:sampleLocationsInfo.sampleLocationsPerPixel must: equal 2215 pname:rasterizationSamples 2216 * [[VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524]] 2217 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2218 fragment shader state>>, and the pname:sampleLocationsEnable member of a 2219 slink:VkPipelineSampleLocationsStateCreateInfoEXT structure included in 2220 the pname:pNext chain of pname:pMultisampleState is ename:VK_TRUE, the 2221 fragment shader code must: not statically use the extended instruction 2222 code:InterpolateAtSample 2223endif::VK_EXT_sample_locations[] 2224ifdef::VK_EXT_multisampled_render_to_single_sampled[] 2225 * [[VUID-VkGraphicsPipelineCreateInfo-multisampledRenderToSingleSampled-06853]] 2226 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2227 fragment output interface state>>, and none of the 2228 `apiext:VK_AMD_mixed_attachment_samples` extension, the 2229 `apiext:VK_NV_framebuffer_mixed_samples` extension, or the 2230 <<features-multisampledRenderToSingleSampled, 2231 pname:multisampledRenderToSingleSampled>> feature are enabled, 2232 pname:rasterizationSamples is not dynamic, and if pname:subpass uses 2233 color and/or depth/stencil attachments, then the 2234 pname:rasterizationSamples member of pname:pMultisampleState must: be 2235 the same as the sample count for those subpass attachments 2236endif::VK_EXT_multisampled_render_to_single_sampled[] 2237ifdef::VK_AMD_mixed_attachment_samples[] 2238 * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01505]] 2239 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2240 fragment output interface state>>, and the 2241 `apiext:VK_AMD_mixed_attachment_samples` extension is enabled, 2242 pname:rasterizationSamples is not dynamic, and if pname:subpass uses 2243 color and/or depth/stencil attachments, then the 2244 pname:rasterizationSamples member of pname:pMultisampleState must: equal 2245 the maximum of the sample counts of those subpass attachments 2246endif::VK_AMD_mixed_attachment_samples[] 2247ifdef::VK_EXT_multisampled_render_to_single_sampled[] 2248 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06854]] 2249 If pname:renderPass is not dlink:VK_NULL_HANDLE, the 2250 `apiext:VK_EXT_multisampled_render_to_single_sampled` extension is 2251 enabled, pname:rasterizationSamples is not dynamic, and pname:subpass 2252 has a slink:VkMultisampledRenderToSingleSampledInfoEXT structure 2253 included in the slink:VkSubpassDescription2::pname:pNext chain with 2254 pname:multisampledRenderToSingleSampledEnable equal to ename:VK_TRUE, 2255 then the pname:rasterizationSamples member of pname:pMultisampleState 2256 must: be equal to 2257 slink:VkMultisampledRenderToSingleSampledInfoEXT::pname:rasterizationSamples 2258endif::VK_EXT_multisampled_render_to_single_sampled[] 2259ifdef::VK_NV_framebuffer_mixed_samples[] 2260 * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01411]] 2261 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2262 fragment output interface state>>, the 2263 `apiext:VK_NV_framebuffer_mixed_samples` extension is enabled, 2264 pname:rasterizationSamples is not dynamic, and if pname:subpass has a 2265 depth/stencil attachment and depth test, stencil test, or depth bounds 2266 test are enabled, then the pname:rasterizationSamples member of 2267 pname:pMultisampleState must: be the same as the sample count of the 2268 depth/stencil attachment 2269 * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01412]] 2270 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2271 fragment output interface state>>, the 2272 `apiext:VK_NV_framebuffer_mixed_samples` extension is enabled, 2273 pname:rasterizationSamples is not dynamic, and if pname:subpass has any 2274 color attachments, then the pname:rasterizationSamples member of 2275 pname:pMultisampleState must: be greater than or equal to the sample 2276 count for those subpass attachments 2277endif::VK_NV_framebuffer_mixed_samples[] 2278ifdef::VK_NV_coverage_reduction_mode[] 2279 * [[VUID-VkGraphicsPipelineCreateInfo-coverageReductionMode-02722]] 2280 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2281 fragment output interface state>>, the 2282 `apiext:VK_NV_coverage_reduction_mode` extension is enabled, and 2283 pname:rasterizationSamples is not dynamic, the coverage reduction mode 2284 specified by 2285 slink:VkPipelineCoverageReductionStateCreateInfoNV::pname:coverageReductionMode, 2286 the pname:rasterizationSamples member of pname:pMultisampleState and the 2287 sample counts for the color and depth/stencil attachments (if the 2288 subpass has them) must: be a valid combination returned by 2289 fname:vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV 2290endif::VK_NV_coverage_reduction_mode[] 2291 * [[VUID-VkGraphicsPipelineCreateInfo-subpass-00758]] 2292 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 2293 fragment output interface state>>, pname:rasterizationSamples is not 2294 dynamic, and pname:subpass does not use any color and/or depth/stencil 2295 attachments, then the pname:rasterizationSamples member of 2296 pname:pMultisampleState must: follow the rules for a 2297 <<renderpass-noattachments, zero-attachment subpass>> 2298 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06046]] 2299 If pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass must: be 2300 a valid subpass within pname:renderPass 2301ifdef::VK_VERSION_1_1,VK_KHR_multiview[] 2302 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06047]] 2303 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2304 created with <<pipelines-graphics-subsets-pre-rasterization, 2305 pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and 2306 pname:multiviewTessellationShader is not enabled, then pname:pStages 2307 must: not include tessellation shaders 2308 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06048]] 2309 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2310 created with <<pipelines-graphics-subsets-pre-rasterization, 2311 pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and 2312 pname:multiviewGeometryShader is not enabled, then pname:pStages must: 2313 not include a geometry shader 2314 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06049]] 2315 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2316 created with <<pipelines-graphics-subsets-pre-rasterization, 2317 pre-rasterization shader state>>, and pname:subpass viewMask is not `0`, 2318 all of the shaders in the pipeline must: not write to the code:Layer 2319 built-in output 2320 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06050]] 2321 If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is 2322 being created with <<pipelines-graphics-subsets-pre-rasterization, 2323 pre-rasterization shader state>>, and pname:subpass viewMask is not `0`, 2324 then all of the shaders in the pipeline must: not include variables 2325 decorated with the code:Layer built-in decoration in their interfaces 2326 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07717]] 2327 If pname:renderPass is not dlink:VK_NULL_HANDLE and the pipeline is 2328 being created with <<pipelines-graphics-subsets-pre-rasterization, 2329 pre-rasterization shader state>>, and pname:subpass viewMask is not `0`, 2330 then all of the shaders in the pipeline must: not include variables 2331 decorated with the code:ViewMask built-in decoration in their interfaces 2332ifdef::VK_EXT_mesh_shader[] 2333 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07064]] 2334 If pname:renderPass is not dlink:VK_NULL_HANDLE, the pipeline is being 2335 created with <<pipelines-graphics-subsets-pre-rasterization, 2336 pre-rasterization shader state>>, pname:subpass viewMask is not `0`, and 2337 pname:multiviewMeshShader is not enabled, then pname:pStages must: not 2338 include a mesh shader 2339endif::VK_EXT_mesh_shader[] 2340endif::VK_VERSION_1_1,VK_KHR_multiview[] 2341ifdef::VK_VERSION_1_1,VK_KHR_device_group[] 2342 * [[VUID-VkGraphicsPipelineCreateInfo-flags-00764]] 2343 pname:flags must: not contain the ename:VK_PIPELINE_CREATE_DISPATCH_BASE 2344 flag 2345endif::VK_VERSION_1_1,VK_KHR_device_group[] 2346ifdef::VK_VERSION_1_1,VK_KHR_maintenance2,VK_KHR_create_renderpass2[] 2347 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-01565]] 2348 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2349 fragment shader state>> and an input attachment was referenced by an 2350 pname:aspectMask at pname:renderPass creation time, the fragment shader 2351 must: only read from the aspects that were specified for that input 2352 attachment 2353endif::VK_VERSION_1_1,VK_KHR_maintenance2,VK_KHR_create_renderpass2[] 2354 * [[VUID-VkGraphicsPipelineCreateInfo-layout-01688]] 2355 The number of resources in pname:layout accessible to each shader stage 2356 that is used by the pipeline must: be less than or equal to 2357 sname:VkPhysicalDeviceLimits::pname:maxPerStageResources 2358ifdef::VK_NV_clip_space_w_scaling[] 2359 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-01715]] 2360 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2361 pre-rasterization shader state>>, and no element of the 2362 pname:pDynamicStates member of pname:pDynamicState is 2363 ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the 2364 pname:viewportWScalingEnable member of a 2365 slink:VkPipelineViewportWScalingStateCreateInfoNV structure, included in 2366 the pname:pNext chain of pname:pViewportState, is ename:VK_TRUE, the 2367 pname:pViewportWScalings member of the 2368 slink:VkPipelineViewportWScalingStateCreateInfoNV must: be a pointer to 2369 an array of 2370 slink:VkPipelineViewportWScalingStateCreateInfoNV::pname:viewportCount 2371 valid slink:VkViewportWScalingNV structures 2372endif::VK_NV_clip_space_w_scaling[] 2373ifdef::VK_NV_scissor_exclusive[] 2374 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04056]] 2375 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2376 pre-rasterization shader state>>, and no element of the 2377 pname:pDynamicStates member of pname:pDynamicState is 2378 ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV, and if 2379 pname:pViewportState->pNext chain includes a 2380 slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV structure, and 2381 if its pname:exclusiveScissorCount member is not `0`, then its 2382 pname:pExclusiveScissors member must: be a valid pointer to an array of 2383 pname:exclusiveScissorCount slink:VkRect2D structures 2384 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07854]] 2385 If ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV is included in the 2386 pname:pDynamicStates array then the implementation must: support at 2387 least pname:specVersion `2` of the `apiext:VK_NV_scissor_exclusive` 2388 extension 2389endif::VK_NV_scissor_exclusive[] 2390ifdef::VK_NV_shading_rate_image[] 2391 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04057]] 2392 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2393 pre-rasterization shader state>>, and no element of the 2394 pname:pDynamicStates member of pname:pDynamicState is 2395 ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV, and if 2396 pname:pViewportState->pNext chain includes a 2397 slink:VkPipelineViewportShadingRateImageStateCreateInfoNV structure, 2398 then its pname:pShadingRatePalettes member must: be a valid pointer to 2399 an array of pname:viewportCount valid slink:VkShadingRatePaletteNV 2400 structures 2401endif::VK_NV_shading_rate_image[] 2402ifdef::VK_EXT_discard_rectangles[] 2403 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04058]] 2404 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2405 pre-rasterization shader state>>, and no element of the 2406 pname:pDynamicStates member of pname:pDynamicState is 2407 ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, and if pname:pNext chain 2408 includes a slink:VkPipelineDiscardRectangleStateCreateInfoEXT structure, 2409 and if its pname:discardRectangleCount member is not `0`, then its 2410 pname:pDiscardRectangles member must: be a valid pointer to an array of 2411 pname:discardRectangleCount slink:VkRect2D structures 2412 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07855]] 2413 If ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT is included in 2414 the pname:pDynamicStates array then the implementation must: support at 2415 least pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles` 2416 extension 2417 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07856]] 2418 If ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT is included in the 2419 pname:pDynamicStates array then the implementation must: support at 2420 least pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles` 2421 extension 2422endif::VK_EXT_discard_rectangles[] 2423 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02097]] 2424 If the pipeline requires <<pipelines-graphics-subsets-vertex-input, 2425 vertex input state>>, and pname:pVertexInputState is not dynamic, then 2426 pname:pVertexInputState must: be a valid pointer to a valid 2427 slink:VkPipelineVertexInputStateCreateInfo structure 2428 * [[VUID-VkGraphicsPipelineCreateInfo-Input-07904]] 2429 If the pipeline is being created with 2430 <<pipelines-graphics-subsets-vertex-input, vertex input state>> and 2431 pname:pVertexInputState is not dynamic, then all variables with the 2432 code:Input storage class decorated with code:Location in the code:Vertex 2433 {ExecutionModel} code:OpEntryPoint must: contain a location in 2434 slink:VkVertexInputAttributeDescription::pname:location 2435 * [[VUID-VkGraphicsPipelineCreateInfo-Input-08733]] 2436 If the pipeline requires <<pipelines-graphics-subsets-vertex-input, 2437 vertex input state>> and pname:pVertexInputState is not dynamic, then 2438 the numeric type associated with all code:Input variables of the 2439 corresponding code:Location in the code:Vertex {ExecutionModel} 2440 code:OpEntryPoint must: be the same as 2441 slink:VkVertexInputAttributeDescription::pname:format 2442 * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08929]] 2443 If the pipeline is being created with 2444 <<pipelines-graphics-subsets-vertex-input, vertex input state>> and 2445 pname:pVertexInputState is not dynamic, and 2446 slink:VkVertexInputAttributeDescription::pname:format has a 64-bit 2447 component, then the scalar width associated with all code:Input 2448 variables of the corresponding code:Location in the code:Vertex 2449 {ExecutionModel} code:OpEntryPoint must: be 64-bit 2450 * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08930]] 2451 If the pipeline is being created with 2452 <<pipelines-graphics-subsets-vertex-input, vertex input state>> and 2453 pname:pVertexInputState is not dynamic, and the scalar width associated 2454 with a code:Location decorated code:Input variable in the code:Vertex 2455 {ExecutionModel} code:OpEntryPoint is 64-bit, then the corresponding 2456 slink:VkVertexInputAttributeDescription::pname:format must: have a 2457 64-bit component 2458 * [[VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-09198]] 2459 If the pipeline is being created with 2460 <<pipelines-graphics-subsets-vertex-input, vertex input state>> and 2461 pname:pVertexInputState is not dynamic, and 2462 slink:VkVertexInputAttributeDescription::pname:format has a 64-bit 2463 component, then all code:Input variables at the corresponding 2464 code:Location in the code:Vertex {ExecutionModel} code:OpEntryPoint 2465 must: not use components that are not present in the format 2466ifndef::VK_EXT_extended_dynamic_state3[] 2467 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02098]] 2468 If the pipeline requires <<pipelines-graphics-subsets-vertex-input, 2469 vertex input state>>, pname:pInputAssemblyState must: be a valid pointer 2470 to a valid slink:VkPipelineInputAssemblyStateCreateInfo structure 2471endif::VK_EXT_extended_dynamic_state3[] 2472ifdef::VK_EXT_extended_dynamic_state3[] 2473 * [[VUID-VkGraphicsPipelineCreateInfo-dynamicPrimitiveTopologyUnrestricted-09031]] 2474 If the pipeline requires <<pipelines-graphics-subsets-vertex-input, 2475 vertex input state>>, and the `apiext:VK_EXT_extended_dynamic_state3` 2476 extension is not enabled, or either 2477 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or 2478 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic states are not set, or 2479 <<limits-dynamicPrimitiveTopologyUnrestricted, 2480 pname:dynamicPrimitiveTopologyUnrestricted>> is ename:VK_FALSE, 2481 pname:pInputAssemblyState must: be a valid pointer to a valid 2482 slink:VkPipelineInputAssemblyStateCreateInfo structure 2483 * [[VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-09032]] 2484 If pname:pInputAssemblyState is not `NULL` it must: be a valid pointer 2485 to a valid slink:VkPipelineInputAssemblyStateCreateInfo structure 2486endif::VK_EXT_extended_dynamic_state3[] 2487ifdef::VK_EXT_transform_feedback[] 2488 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02317]] 2489 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2490 pre-rasterization shader state>>, the code:Xfb execution mode can: be 2491 specified by no more than one shader stage in pname:pStages 2492 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-02318]] 2493 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2494 pre-rasterization shader state>>, and any shader stage in pname:pStages 2495 specifies code:Xfb execution mode it must: be the last 2496 <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader 2497 stage>> 2498 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02319]] 2499 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2500 pre-rasterization shader state>>, and a 2501 slink:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream 2502 value other than zero is specified, all variables in the output 2503 interface of the entry point being compiled decorated with 2504 code:Position, code:PointSize, code:ClipDistance, or code:CullDistance 2505 must: be decorated with identical code:Stream values that match the 2506 pname:rasterizationStream 2507 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationStream-02320]] 2508 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2509 pre-rasterization shader state>>, and 2510 slink:VkPipelineRasterizationStateStreamCreateInfoEXT::pname:rasterizationStream 2511 is zero, or not specified, all variables in the output interface of the 2512 entry point being compiled decorated with code:Position, code:PointSize, 2513 code:ClipDistance, or code:CullDistance must: be decorated with a 2514 code:Stream value of zero, or must: not specify the code:Stream 2515 decoration 2516 * [[VUID-VkGraphicsPipelineCreateInfo-geometryStreams-02321]] 2517 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2518 pre-rasterization shader state>>, and the last 2519 <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader 2520 stage>> is a geometry shader, and that geometry shader uses the 2521 code:GeometryStreams capability, then 2522 sname:VkPhysicalDeviceTransformFeedbackFeaturesEXT::pname:geometryStreams 2523 feature must: be enabled 2524ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2525 * [[VUID-VkGraphicsPipelineCreateInfo-None-02322]] 2526 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2527 pre-rasterization shader state>>, and there are any mesh shader stages 2528 in the pipeline there must: not be any shader stage in the pipeline with 2529 a code:Xfb execution mode 2530endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2531endif::VK_EXT_transform_feedback[] 2532ifdef::VK_EXT_line_rasterization[] 2533 * [[VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766]] 2534 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2535 pre-rasterization shader state>> and at least one of 2536 <<pipelines-graphics-subsets-fragment-output, fragment output interface 2537 state>> or <<pipelines-graphics-subsets-fragment-shader, fragment shader 2538 state>>, and pname:pMultisampleState is not `NULL`, the 2539 pname:lineRasterizationMode member of a 2540 slink:VkPipelineRasterizationLineStateCreateInfoEXT structure included 2541 in the pname:pNext chain of pname:pRasterizationState is 2542 ename:VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT or 2543 ename:VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then the 2544 pname:alphaToCoverageEnable, pname:alphaToOneEnable, and 2545 pname:sampleShadingEnable members of pname:pMultisampleState must: all 2546 be ename:VK_FALSE 2547 * [[VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767]] 2548 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2549 pre-rasterization shader state>>, the pname:stippledLineEnable member of 2550 slink:VkPipelineRasterizationLineStateCreateInfoEXT is ename:VK_TRUE, 2551 and no element of the pname:pDynamicStates member of pname:pDynamicState 2552 is ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, then the 2553 pname:lineStippleFactor member of 2554 slink:VkPipelineRasterizationLineStateCreateInfoEXT must: be in the 2555 range [eq]#[1,256]# 2556endif::VK_EXT_line_rasterization[] 2557ifdef::VK_KHR_pipeline_library[] 2558ifndef::VK_EXT_graphics_pipeline_library[] 2559 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03371]] 2560 pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 2561endif::VK_EXT_graphics_pipeline_library[] 2562endif::VK_KHR_pipeline_library[] 2563ifdef::VK_KHR_ray_tracing_pipeline[] 2564 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03372]] 2565 pname:flags must: not include 2566 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR 2567 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03373]] 2568 pname:flags must: not include 2569 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR 2570 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03374]] 2571 pname:flags must: not include 2572 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR 2573 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03375]] 2574 pname:flags must: not include 2575 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR 2576 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03376]] 2577 pname:flags must: not include 2578 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR 2579 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03377]] 2580 pname:flags must: not include 2581 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR 2582 * [[VUID-VkGraphicsPipelineCreateInfo-flags-03577]] 2583 pname:flags must: not include 2584 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 2585endif::VK_KHR_ray_tracing_pipeline[] 2586ifdef::VK_NV_ray_tracing_motion_blur[] 2587 * [[VUID-VkGraphicsPipelineCreateInfo-flags-04947]] 2588 pname:flags must: not include 2589 ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV 2590endif::VK_NV_ray_tracing_motion_blur[] 2591ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 2592 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03378]] 2593 If 2594ifdef::VK_EXT_extended_dynamic_state[] 2595 the <<features-extendedDynamicState, pname:extendedDynamicState>> 2596 feature is not enabled, 2597endif::VK_EXT_extended_dynamic_state[] 2598ifdef::VK_VERSION_1_3+VK_EXT_extended_dynamic_state[and] 2599ifdef::VK_VERSION_1_3[] 2600 the value of slink:VkApplicationInfo::pname:apiVersion used to create 2601 the slink:VkInstance is less than Version 1.3 2602endif::VK_VERSION_1_3[] 2603 there must: be no element of the pname:pDynamicStates member of 2604 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_CULL_MODE, 2605 ename:VK_DYNAMIC_STATE_FRONT_FACE, 2606 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, 2607 ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, 2608 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, 2609 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, 2610 ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, 2611 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, 2612 ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, 2613 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, 2614 ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, or 2615 ename:VK_DYNAMIC_STATE_STENCIL_OP 2616 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03379]] 2617 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2618 pre-rasterization shader state>>, and 2619 ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the 2620 pname:pDynamicStates array then pname:viewportCount must: be zero 2621 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03380]] 2622 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2623 pre-rasterization shader state>>, and 2624 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the 2625 pname:pDynamicStates array then pname:scissorCount must: be zero 2626 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132]] 2627 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2628 pre-rasterization shader state>>, and 2629 ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the 2630 pname:pDynamicStates array then ename:VK_DYNAMIC_STATE_VIEWPORT must: 2631 not be present 2632 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133]] 2633 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2634 pre-rasterization shader state>>, and 2635 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the 2636 pname:pDynamicStates array then ename:VK_DYNAMIC_STATE_SCISSOR must: not 2637 be present 2638ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2639 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065]] 2640 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2641 pre-rasterization shader state>>, and includes a mesh shader, there 2642 must: be no element of the pname:pDynamicStates member of 2643 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, or 2644 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE 2645endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2646endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 2647ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 2648 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04868]] 2649 If 2650ifdef::VK_EXT_extended_dynamic_state[] 2651 the <<features-extendedDynamicState2, pname:extendedDynamicState2>> 2652 feature is not enabled, 2653endif::VK_EXT_extended_dynamic_state[] 2654ifdef::VK_VERSION_1_3+VK_EXT_extended_dynamic_state[and] 2655ifdef::VK_VERSION_1_3[] 2656 the value of slink:VkApplicationInfo::pname:apiVersion used to create 2657 the slink:VkInstance is less than Version 1.3 2658endif::VK_VERSION_1_3[] 2659 there must: be no element of the pname:pDynamicStates member of 2660 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, 2661 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or 2662 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE 2663 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04869]] 2664 If the <<features-extendedDynamicState2LogicOp, 2665 pname:extendedDynamicState2LogicOp>> feature is not enabled, there must: 2666 be no element of the pname:pDynamicStates member of pname:pDynamicState 2667 set to ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT 2668 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04870]] 2669 If the <<features-extendedDynamicState2PatchControlPoints, 2670 pname:extendedDynamicState2PatchControlPoints>> feature is not enabled, 2671 there must: be no element of the pname:pDynamicStates member of 2672 pname:pDynamicState set to 2673 ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT 2674ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2675 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07066]] 2676 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2677 pre-rasterization shader state>>, and includes a mesh shader, there 2678 must: be no element of the pname:pDynamicStates member of 2679 pname:pDynamicState set to 2680 ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or 2681 ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT 2682endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2683endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 2684ifdef::VK_NV_device_generated_commands[] 2685 * [[VUID-VkGraphicsPipelineCreateInfo-flags-02877]] 2686 If pname:flags includes 2687 ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then the 2688 <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>> 2689 feature must: be enabled 2690ifdef::VK_EXT_transform_feedback[] 2691 * [[VUID-VkGraphicsPipelineCreateInfo-flags-02966]] 2692 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2693 pre-rasterization shader state>> and pname:flags includes 2694 ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV, then all stages must: 2695 not specify code:Xfb execution mode 2696endif::VK_EXT_transform_feedback[] 2697 * [[VUID-VkGraphicsPipelineCreateInfo-libraryCount-06648]] 2698 If the pipeline is not created with a 2699 <<pipelines-graphics-subsets-complete, complete set of state>>, 2700ifdef::VK_EXT_graphics_pipeline_library[] 2701 or slink:VkPipelineLibraryCreateInfoKHR::pname:libraryCount is not `0`, 2702endif::VK_EXT_graphics_pipeline_library[] 2703 slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount and 2704 slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:pipelineCount 2705 must: be `0` 2706 * [[VUID-VkGraphicsPipelineCreateInfo-libraryCount-06649]] 2707 If the pipeline is created with a <<pipelines-graphics-subsets-complete, 2708 complete set of state>>, 2709ifdef::VK_EXT_graphics_pipeline_library[] 2710 and slink:VkPipelineLibraryCreateInfoKHR::pname:libraryCount is `0`, 2711endif::VK_EXT_graphics_pipeline_library[] 2712 and the pname:pNext chain includes an instance of 2713 slink:VkGraphicsPipelineShaderGroupsCreateInfoNV, 2714 slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount must: 2715 be greater than `0` 2716endif::VK_NV_device_generated_commands[] 2717ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 2718 * [[VUID-VkGraphicsPipelineCreateInfo-pipelineCreationCacheControl-02878]] 2719 If the <<features-pipelineCreationCacheControl, 2720 pname:pipelineCreationCacheControl>> feature is not enabled, pname:flags 2721 must: not include 2722 ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT or 2723 ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT 2724endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 2725ifdef::VK_EXT_pipeline_protected_access[] 2726 * [[VUID-VkGraphicsPipelineCreateInfo-pipelineProtectedAccess-07368]] 2727 If the <<features-pipelineProtectedAccess, 2728 pname:pipelineProtectedAccess>> feature is not enabled, pname:flags 2729 must: not include ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT 2730 or ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT 2731 * [[VUID-VkGraphicsPipelineCreateInfo-flags-07369]] 2732 pname:flags must: not include both 2733 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT and 2734 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT 2735endif::VK_EXT_pipeline_protected_access[] 2736ifdef::VK_KHR_fragment_shading_rate[] 2737 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04494]] 2738 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2739 pre-rasterization shader state>> or 2740 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2741 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2742 pname:pDynamicState->pDynamicStates, 2743 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width 2744 must: be greater than or equal to `1` 2745 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04495]] 2746 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2747 pre-rasterization shader state>> or 2748 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2749 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2750 pname:pDynamicState->pDynamicStates, 2751 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height 2752 must: be greater than or equal to `1` 2753 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04496]] 2754 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2755 pre-rasterization shader state>> or 2756 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2757 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2758 pname:pDynamicState->pDynamicStates, 2759 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width 2760 must: be a power-of-two value 2761 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04497]] 2762 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2763 pre-rasterization shader state>> or 2764 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2765 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2766 pname:pDynamicState->pDynamicStates, 2767 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height 2768 must: be a power-of-two value 2769 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04498]] 2770 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2771 pre-rasterization shader state>> or 2772 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2773 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2774 pname:pDynamicState->pDynamicStates, 2775 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width 2776 must: be less than or equal to `4` 2777 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04499]] 2778 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2779 pre-rasterization shader state>> or 2780 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2781 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2782 pname:pDynamicState->pDynamicStates, 2783 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height 2784 must: be less than or equal to `4` 2785 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04500]] 2786 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2787 pre-rasterization shader state>> or 2788 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2789 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2790 pname:pDynamicState->pDynamicStates, and the 2791 <<features-pipelineFragmentShadingRate, 2792 pname:pipelineFragmentShadingRate>> feature is not enabled, 2793 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.width 2794 and 2795 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:fragmentSize.height 2796 must: both be equal to `1` 2797 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06567]] 2798 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2799 pre-rasterization shader state>> or 2800 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2801 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2802 pname:pDynamicState->pDynamicStates, 2803 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[0] 2804 must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value 2805 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06568]] 2806 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2807 pre-rasterization shader state>> or 2808 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2809 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2810 pname:pDynamicState->pDynamicStates, 2811 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[1] 2812 must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value 2813 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04501]] 2814 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2815 pre-rasterization shader state>> or 2816 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2817 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2818 pname:pDynamicState->pDynamicStates, and the 2819 <<features-primitiveFragmentShadingRate, 2820 pname:primitiveFragmentShadingRate>> feature is not enabled, 2821 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[0] 2822 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR 2823 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04502]] 2824 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2825 pre-rasterization shader state>> or 2826 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 2827 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2828 pname:pDynamicState->pDynamicStates, and the 2829 <<features-attachmentFragmentShadingRate, 2830 pname:attachmentFragmentShadingRate>> feature is not enabled, 2831 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps[1] 2832 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR 2833ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 2834 * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04503]] 2835 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2836 pre-rasterization shader state>> and the 2837 <<limits-primitiveFragmentShadingRateWithMultipleViewports, 2838 pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not 2839 supported, ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is not included in 2840 pname:pDynamicState->pDynamicStates, and 2841 slink:VkPipelineViewportStateCreateInfo::pname:viewportCount is greater 2842 than `1`, entry points specified in pname:pStages must: not write to the 2843 code:PrimitiveShadingRateKHR built-in 2844endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 2845 * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04504]] 2846 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2847 pre-rasterization shader state>> and the 2848 <<limits-primitiveFragmentShadingRateWithMultipleViewports, 2849 pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not 2850 supported, and entry points specified in pname:pStages write to the 2851 code:ViewportIndex built-in, they must: not also write to the 2852 code:PrimitiveShadingRateKHR built-in 2853ifdef::VK_NV_viewport_array2[] 2854 * [[VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04505]] 2855 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2856 pre-rasterization shader state>> and the 2857 <<limits-primitiveFragmentShadingRateWithMultipleViewports, 2858 pname:primitiveFragmentShadingRateWithMultipleViewports>> limit is not 2859 supported, and entry points specified in pname:pStages write to the 2860 code:ViewportMaskNV built-in, they must: not also write to the 2861 code:PrimitiveShadingRateKHR built-in 2862endif::VK_NV_viewport_array2[] 2863 * [[VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04506]] 2864 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2865 pre-rasterization shader state>> or 2866 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 2867 the <<limits-fragmentShadingRateNonTrivialCombinerOps, 2868 pname:fragmentShadingRateNonTrivialCombinerOps>> limit is not supported, 2869 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2870 pname:pDynamicState->pDynamicStates, elements of 2871 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:combinerOps 2872 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or 2873 ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR 2874endif::VK_KHR_fragment_shading_rate[] 2875ifdef::VK_NV_fragment_shading_rate_enums[] 2876 * [[VUID-VkGraphicsPipelineCreateInfo-None-06569]] 2877 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2878 fragment shader state>> 2879 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2880 pname:pDynamicState->pDynamicStates, 2881 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRateType 2882 must: be a valid elink:VkFragmentShadingRateTypeNV value 2883 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06570]] 2884 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2885 fragment shader state>> and 2886 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2887 pname:pDynamicState->pDynamicStates, 2888 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate 2889 must: be a valid elink:VkFragmentShadingRateNV value 2890 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06571]] 2891 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2892 fragment shader state>> and 2893 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2894 pname:pDynamicState->pDynamicStates, 2895 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[0] 2896 must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value 2897 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06572]] 2898 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2899 fragment shader state>> and 2900 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2901 pname:pDynamicState->pDynamicStates, 2902 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[1] 2903 must: be a valid elink:VkFragmentShadingRateCombinerOpKHR value 2904 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04569]] 2905 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2906 fragment shader state>> and 2907 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2908 pname:pDynamicState->pDynamicStates, and the 2909 <<features-fragmentShadingRateEnums, pname:fragmentShadingRateEnums>> 2910 feature is not enabled, 2911 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRateType 2912 must: be equal to ename:VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV 2913 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04570]] 2914 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2915 fragment shader state>> and 2916 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2917 pname:pDynamicState->pDynamicStates, and the 2918 <<features-pipelineFragmentShadingRate, 2919 pname:pipelineFragmentShadingRate>> feature is not enabled, 2920 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate 2921 must: be equal to 2922 ename:VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV 2923 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04571]] 2924 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2925 fragment shader state>> and 2926 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2927 pname:pDynamicState->pDynamicStates, and the 2928 <<features-primitiveFragmentShadingRate, 2929 pname:primitiveFragmentShadingRate>> feature is not enabled, 2930 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[0] 2931 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR 2932 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04572]] 2933 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2934 fragment shader state>> and 2935 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2936 pname:pDynamicState->pDynamicStates, and the 2937 <<features-attachmentFragmentShadingRate, 2938 pname:attachmentFragmentShadingRate>> feature is not enabled, 2939 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps[1] 2940 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR 2941 * [[VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04573]] 2942 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2943 fragment shader state>>, and the 2944 <<limits-fragmentShadingRateNonTrivialCombinerOps, 2945 pname:fragmentShadingRateNonTrivialCombinerOps>> limit is not supported 2946 and ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in 2947 pname:pDynamicState->pDynamicStates, elements of 2948 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:combinerOps 2949 must: be ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or 2950 ename:VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR 2951 * [[VUID-VkGraphicsPipelineCreateInfo-None-04574]] 2952 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2953 fragment shader state>>, and the 2954 <<features-supersampleFragmentShadingRates, 2955 pname:supersampleFragmentShadingRates>> feature is not enabled, 2956 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate 2957 must: not be equal to 2958 ename:VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV, 2959 ename:VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV, 2960 ename:VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV, or 2961 ename:VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV 2962 * [[VUID-VkGraphicsPipelineCreateInfo-None-04575]] 2963 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 2964 fragment shader state>>, and the 2965 <<features-noInvocationFragmentShadingRates, 2966 pname:noInvocationFragmentShadingRates>> feature is not enabled, 2967 slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV::pname:shadingRate 2968 must: not be equal to ename:VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV 2969endif::VK_NV_fragment_shading_rate_enums[] 2970ifdef::VK_KHR_ray_tracing_pipeline[] 2971 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03578]] 2972 All elements of the pname:pDynamicStates member of pname:pDynamicState 2973 must: not be ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR 2974endif::VK_KHR_ray_tracing_pipeline[] 2975ifdef::VK_EXT_vertex_input_dynamic_state[] 2976 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04807]] 2977 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2978 pre-rasterization shader state>> and the 2979 <<features-vertexInputDynamicState, pname:vertexInputDynamicState>> 2980 feature is not enabled, there must: be no element of the 2981 pname:pDynamicStates member of pname:pDynamicState set to 2982 ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT 2983ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2984 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07067]] 2985 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 2986 pre-rasterization shader state>>, and includes a mesh shader, there 2987 must: be no element of the pname:pDynamicStates member of 2988 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT 2989endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 2990endif::VK_EXT_vertex_input_dynamic_state[] 2991ifdef::VK_EXT_color_write_enable[] 2992 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800]] 2993 If the <<features-colorWriteEnable, pname:colorWriteEnable>> feature is 2994 not enabled, there must: be no element of the pname:pDynamicStates 2995 member of pname:pDynamicState set to 2996 ename:VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT 2997endif::VK_EXT_color_write_enable[] 2998ifdef::VK_QCOM_render_pass_shader_resolve[] 2999 * [[VUID-VkGraphicsPipelineCreateInfo-rasterizationSamples-04899]] 3000 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3001 fragment shader state>>, and the 3002 `apiext:VK_QCOM_render_pass_shader_resolve` extension is enabled, 3003 pname:rasterizationSamples is not dynamic, and if subpass has any input 3004 attachments, and if the subpass description contains 3005 ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then the sample 3006 count of the input attachments must: equal pname:rasterizationSamples 3007 * [[VUID-VkGraphicsPipelineCreateInfo-sampleShadingEnable-04900]] 3008 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3009 fragment shader state>>, and the 3010 `apiext:VK_QCOM_render_pass_shader_resolve` extension is enabled, and if 3011 the subpass description contains 3012 ename:VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then 3013 pname:sampleShadingEnable must: be false 3014 * [[VUID-VkGraphicsPipelineCreateInfo-flags-04901]] 3015 If pname:flags includes 3016 ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, then the subpass 3017 must: be the last subpass in a subpass dependency chain 3018 * [[VUID-VkGraphicsPipelineCreateInfo-flags-04902]] 3019 If pname:flags includes 3020 ename:VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM, and if 3021 pname:pResolveAttachments is not `NULL`, then each resolve attachment 3022 must: be ename:VK_ATTACHMENT_UNUSED 3023endif::VK_QCOM_render_pass_shader_resolve[] 3024ifndef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3025 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06574]] 3026 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3027 pre-rasterization shader state>>, 3028 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3029 or <<pipelines-graphics-subsets-fragment-output, fragment output 3030 interface state>>, pname:renderPass must: be a valid render pass object 3031endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3032ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3033 * [[VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576]] 3034 If the <<features-dynamicRendering, pname:dynamicRendering>> feature is 3035 not enabled and the pipeline requires 3036 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 3037 state>>, <<pipelines-graphics-subsets-fragment-shader, fragment shader 3038 state>>, or <<pipelines-graphics-subsets-fragment-output, fragment 3039 output interface state>>, pname:renderPass must: not be 3040 dlink:VK_NULL_HANDLE 3041 * [[VUID-VkGraphicsPipelineCreateInfo-multiview-06577]] 3042 If the <<features-multiview, pname:multiview>> feature is not enabled, 3043 the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3044 pre-rasterization shader state>>, 3045 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3046 or <<pipelines-graphics-subsets-fragment-output, fragment output 3047 interface state>>, and pname:renderPass is dlink:VK_NULL_HANDLE, 3048 slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be `0` 3049 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06578]] 3050 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3051 pre-rasterization shader state>>, 3052 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3053 or <<pipelines-graphics-subsets-fragment-output, fragment output 3054 interface state>>, and pname:renderPass is dlink:VK_NULL_HANDLE, the 3055 index of the most significant bit in 3056 slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be less than 3057 <<limits-maxMultiviewViewCount, pname:maxMultiviewViewCount>> 3058 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06579]] 3059 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3060 fragment output interface state>>, and pname:renderPass is 3061 dlink:VK_NULL_HANDLE, and 3062 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount is not 3063 0, slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats 3064 must: be a valid pointer to an array of pname:colorAttachmentCount valid 3065 elink:VkFormat values 3066 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06580]] 3067 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3068 fragment output interface state>>, and pname:renderPass is 3069 dlink:VK_NULL_HANDLE, each element of 3070 slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats must: 3071 be a valid elink:VkFormat value 3072ifndef::VK_NV_linear_color_attachment[] 3073 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06581]] 3074 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3075 fragment output interface state>>, pname:renderPass is 3076 dlink:VK_NULL_HANDLE, and any element of 3077 slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats is 3078 not ename:VK_FORMAT_UNDEFINED, that format must: be a format with 3079 <<potential-format-features, potential format features>> that include 3080 ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT 3081endif::VK_NV_linear_color_attachment[] 3082ifdef::VK_NV_linear_color_attachment[] 3083 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06582]] 3084 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3085 fragment output interface state>>, pname:renderPass is 3086 dlink:VK_NULL_HANDLE, and any element of 3087 slink:VkPipelineRenderingCreateInfo::pname:pColorAttachmentFormats is 3088 not ename:VK_FORMAT_UNDEFINED, that format must: be a format with 3089 <<potential-format-features, potential format features>> that include 3090 ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT or 3091 ename:VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV 3092endif::VK_NV_linear_color_attachment[] 3093 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06583]] 3094 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3095 fragment output interface state>>, and pname:renderPass is 3096 dlink:VK_NULL_HANDLE, 3097 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat must: 3098 be a valid elink:VkFormat value 3099 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06584]] 3100 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3101 fragment output interface state>>, and pname:renderPass is 3102 dlink:VK_NULL_HANDLE, 3103 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat must: 3104 be a valid elink:VkFormat value 3105 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06585]] 3106 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3107 fragment output interface state>>, pname:renderPass is 3108 dlink:VK_NULL_HANDLE, and 3109 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not 3110 ename:VK_FORMAT_UNDEFINED, it must: be a format with 3111 <<potential-format-features, potential format features>> that include 3112 ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT 3113 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06586]] 3114 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3115 fragment output interface state>>, pname:renderPass is 3116 dlink:VK_NULL_HANDLE, and 3117 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is 3118 not ename:VK_FORMAT_UNDEFINED, it must: be a format with 3119 <<potential-format-features, potential format features>> that include 3120 ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT 3121 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06587]] 3122 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3123 fragment output interface state>>, pname:renderPass is 3124 dlink:VK_NULL_HANDLE, and 3125 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not 3126 ename:VK_FORMAT_UNDEFINED, it must: be a format that includes a depth 3127 component 3128 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06588]] 3129 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3130 fragment output interface state>>, pname:renderPass is 3131 dlink:VK_NULL_HANDLE, and 3132 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is 3133 not ename:VK_FORMAT_UNDEFINED, it must: be a format that includes a 3134 stencil component 3135 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06589]] 3136 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3137 fragment output interface state>>, pname:renderPass is 3138 dlink:VK_NULL_HANDLE, 3139 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat is not 3140 ename:VK_FORMAT_UNDEFINED, and 3141 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat is 3142 not ename:VK_FORMAT_UNDEFINED, pname:depthAttachmentFormat must: equal 3143 pname:stencilAttachmentFormat 3144ifndef::VK_EXT_extended_dynamic_state3[] 3145 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06053]] 3146 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3147 created with <<pipelines-graphics-subsets-fragment-shader, fragment 3148 shader state>> and <<pipelines-graphics-subsets-fragment-output, 3149 fragment output interface state>>, and either of 3150 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat or 3151 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat are 3152 not ename:VK_FORMAT_UNDEFINED, pname:pDepthStencilState must: be a valid 3153 pointer to a valid slink:VkPipelineDepthStencilStateCreateInfo structure 3154endif::VK_EXT_extended_dynamic_state3[] 3155ifdef::VK_EXT_extended_dynamic_state3[] 3156 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09033]] 3157 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3158 created with <<pipelines-graphics-subsets-fragment-shader, fragment 3159 shader state>> and <<pipelines-graphics-subsets-fragment-output, 3160 fragment output interface state>>, and either of 3161 slink:VkPipelineRenderingCreateInfo::pname:depthAttachmentFormat or 3162 slink:VkPipelineRenderingCreateInfo::pname:stencilAttachmentFormat are 3163 not ename:VK_FORMAT_UNDEFINED, and the 3164 `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled or any 3165 of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, 3166 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, 3167 ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, 3168 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, 3169 ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, 3170 ename:VK_DYNAMIC_STATE_STENCIL_OP, or 3171 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set, 3172 pname:pDepthStencilState must: be a valid pointer to a valid 3173 slink:VkPipelineDepthStencilStateCreateInfo structure 3174 * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09034]] 3175 If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to 3176 a valid slink:VkPipelineDepthStencilStateCreateInfo structure 3177endif::VK_EXT_extended_dynamic_state3[] 3178ifdef::VK_EXT_graphics_pipeline_library[] 3179ifndef::VK_EXT_extended_dynamic_state3[] 3180 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06590]] 3181 If pname:renderPass is dlink:VK_NULL_HANDLE and the pipeline is being 3182 created with <<pipelines-graphics-subsets-fragment-shader, fragment 3183 shader state>> but not <<pipelines-graphics-subsets-fragment-output, 3184 fragment output interface state>>, pname:pDepthStencilState must: be a 3185 valid pointer to a valid slink:VkPipelineDepthStencilStateCreateInfo 3186 structure 3187endif::VK_EXT_extended_dynamic_state3[] 3188ifdef::VK_EXT_extended_dynamic_state3[] 3189 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09035]] 3190 If pname:renderPass is dlink:VK_NULL_HANDLE and the pipeline is being 3191 created with <<pipelines-graphics-subsets-fragment-shader, fragment 3192 shader state>> but not <<pipelines-graphics-subsets-fragment-output, 3193 fragment output interface state>>, and the 3194 `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, or any 3195 of the ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, 3196 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, 3197 ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, 3198 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, 3199 ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, 3200 ename:VK_DYNAMIC_STATE_STENCIL_OP, or 3201 ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic states are not set, 3202 pname:pDepthStencilState must: be a valid pointer to a valid 3203 slink:VkPipelineDepthStencilStateCreateInfo structure 3204 * [[VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09036]] 3205 If pname:pDepthStencilState is not `NULL` it must: be a valid pointer to 3206 a valid slink:VkPipelineDepthStencilStateCreateInfo structure 3207endif::VK_EXT_extended_dynamic_state3[] 3208endif::VK_EXT_graphics_pipeline_library[] 3209ifndef::VK_EXT_extended_dynamic_state3[] 3210 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06054]] 3211 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3212 created with <<pipelines-graphics-subsets-fragment-output, fragment 3213 output interface state>>, and 3214 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount is not 3215 equal to `0`, pname:pColorBlendState must: be a valid pointer to a valid 3216 slink:VkPipelineColorBlendStateCreateInfo structure 3217endif::VK_EXT_extended_dynamic_state3[] 3218ifdef::VK_EXT_extended_dynamic_state3[] 3219 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-09037]] 3220 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3221 created with <<pipelines-graphics-subsets-fragment-output, fragment 3222 output interface state>>, and 3223 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount is not 3224 equal to `0`, and the `apiext:VK_EXT_extended_dynamic_state3` extension 3225 is not enabled, or any of the 3226 ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT, 3227 ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT, 3228 ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT, 3229 ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, 3230 ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, or 3231 ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic states are not set, 3232 pname:pColorBlendState must: be a valid pointer to a valid 3233 slink:VkPipelineColorBlendStateCreateInfo structure 3234 * [[VUID-VkGraphicsPipelineCreateInfo-pColorBlendState-09038]] 3235 If pname:pColorBlendState is not `NULL` it must: be a valid pointer to a 3236 valid slink:VkPipelineColorBlendStateCreateInfo structure 3237endif::VK_EXT_extended_dynamic_state3[] 3238 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06055]] 3239 If pname:renderPass is dlink:VK_NULL_HANDLE, pname:pColorBlendState is 3240 not dynamic, and the pipeline is being created with 3241 <<pipelines-graphics-subsets-fragment-output, fragment output interface 3242 state>>, pname:pColorBlendState->attachmentCount must: be equal to 3243 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount 3244ifdef::VK_KHR_multiview,VK_VERSION_1_1[] 3245 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06057]] 3246 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3247 created with <<pipelines-graphics-subsets-pre-rasterization, 3248 pre-rasterization shader state>>, 3249 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and the 3250 <<features-multiview-tess, pname:multiviewTessellationShader>> feature 3251 is not enabled, then pname:pStages must: not include tessellation 3252 shaders 3253 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06058]] 3254 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3255 created with <<pipelines-graphics-subsets-pre-rasterization, 3256 pre-rasterization shader state>>, 3257 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and the 3258 <<features-multiview-gs, pname:multiviewGeometryShader>> feature is not 3259 enabled, then pname:pStages must: not include a geometry shader 3260 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07718]] 3261 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3262 created with <<pipelines-graphics-subsets-pre-rasterization, 3263 pre-rasterization shader state>>, and 3264 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of 3265 the shaders in the pipeline must: not write to the code:Layer built-in 3266 output 3267 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06059]] 3268 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3269 created with <<pipelines-graphics-subsets-pre-rasterization, 3270 pre-rasterization shader state>>, and 3271 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of 3272 the shaders in the pipeline must: not include variables decorated with 3273 the code:Layer built-in decoration in their interfaces 3274 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07719]] 3275 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3276 created with <<pipelines-graphics-subsets-pre-rasterization, 3277 pre-rasterization shader state>>, and 3278 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, all of 3279 the shaders in the pipeline must: not include variables decorated with 3280 the code:ViewIndex built-in decoration in their interfaces 3281ifdef::VK_EXT_mesh_shader[] 3282 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-07720]] 3283 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3284 created with <<pipelines-graphics-subsets-pre-rasterization, 3285 pre-rasterization shader state>>, and 3286 slink:VkPipelineRenderingCreateInfo::pname:viewMask is not `0`, and 3287 pname:multiviewMeshShader is not enabled, then pname:pStages must: not 3288 include a mesh shader 3289endif::VK_EXT_mesh_shader[] 3290 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06061]] 3291 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3292 fragment shader state>> and pname:renderPass is dlink:VK_NULL_HANDLE, 3293 fragment shaders in pname:pStages must: not include the 3294 code:InputAttachment capability 3295ifdef::VK_EXT_shader_tile_image[] 3296 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-08710]] 3297 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3298 fragment shader state>> and pname:renderPass is not 3299 dlink:VK_NULL_HANDLE, fragment shaders in pname:pStages must: not 3300 include any of the code:TileImageColorReadAccessEXT, 3301 code:TileImageDepthReadAccessEXT, or code:TileImageStencilReadAccessEXT 3302 capabilities 3303endif::VK_EXT_shader_tile_image[] 3304 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06062]] 3305 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3306 fragment output interface state>> and pname:renderPass is 3307 dlink:VK_NULL_HANDLE, for each color attachment format defined by the 3308 pname:pColorAttachmentFormats member of 3309 slink:VkPipelineRenderingCreateInfo, if its 3310 <<potential-format-features,potential format features>> do not contain 3311 ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the 3312 pname:blendEnable member of the corresponding element of the 3313 pname:pAttachments member of pname:pColorBlendState must: be 3314 ename:VK_FALSE 3315endif::VK_KHR_multiview,VK_VERSION_1_1[] 3316ifdef::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 3317 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06063]] 3318 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3319 fragment output interface state>> and pname:renderPass is 3320 dlink:VK_NULL_HANDLE, if the pname:pNext chain includes 3321 slink:VkAttachmentSampleCountInfoAMD or 3322 sname:VkAttachmentSampleCountInfoNV, the pname:colorAttachmentCount 3323 member of that structure must: be equal to the value of 3324 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount 3325endif::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 3326endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3327ifdef::VK_EXT_rasterization_order_attachment_access,VK_ARM_rasterization_order_attachment_access[] 3328 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06591]] 3329 If pname:pStages includes a fragment shader stage, and the fragment 3330 shader declares the code:EarlyFragmentTests execution mode, the 3331 pname:flags member of slink:VkPipelineDepthStencilStateCreateInfo must: 3332 not include 3333 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT 3334 or 3335 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT 3336ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3337 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06482]] 3338 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3339 fragment output interface state>> and the pname:flags member of 3340 slink:VkPipelineColorBlendStateCreateInfo includes 3341 ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT, 3342 pname:renderpass must: not be dlink:VK_NULL_HANDLE 3343 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06483]] 3344 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3345 fragment output interface state>> and the pname:flags member of 3346 slink:VkPipelineDepthStencilStateCreateInfo includes 3347 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT 3348 or 3349 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, 3350 pname:renderpass must: not be dlink:VK_NULL_HANDLE 3351ifdef::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 3352 * [[VUID-VkGraphicsPipelineCreateInfo-pColorAttachmentSamples-06592]] 3353 If the <<pipelines-graphics-subsets-fragment-output, fragment output 3354 interface state>>, elements of the pname:pColorAttachmentSamples member 3355 of slink:VkAttachmentSampleCountInfoAMD or 3356 slink:VkAttachmentSampleCountInfoNV must: be valid 3357 elink:VkSampleCountFlagBits values 3358 * [[VUID-VkGraphicsPipelineCreateInfo-depthStencilAttachmentSamples-06593]] 3359 If the <<pipelines-graphics-subsets-fragment-output, fragment output 3360 interface state>> and the pname:depthStencilAttachmentSamples member of 3361 slink:VkAttachmentSampleCountInfoAMD or 3362 slink:VkAttachmentSampleCountInfoNV is not 0, it must: be a valid 3363 elink:VkSampleCountFlagBits value 3364endif::VK_AMD_mixed_attachment_samples,VK_NV_framebuffer_mixed_samples[] 3365endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3366 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06484]] 3367 If the pipeline requires <<pipelines-graphics-subsets-fragment-output, 3368 fragment output interface state>> and the pname:flags member of 3369 slink:VkPipelineColorBlendStateCreateInfo includes 3370 ename:VK_PIPELINE_COLOR_BLEND_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT 3371 pname:subpass must: have been created with 3372 ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT 3373 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06485]] 3374 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3375 fragment shader state>> and the pname:flags member of 3376 slink:VkPipelineDepthStencilStateCreateInfo includes 3377 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT, 3378 pname:subpass must: have been created with 3379 ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT 3380 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06486]] 3381 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3382 fragment shader state>> and the pname:flags member of 3383 slink:VkPipelineDepthStencilStateCreateInfo includes 3384 ename:VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT, 3385 pname:subpass must: have been created with 3386 ename:VK_SUBPASS_DESCRIPTION_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT 3387endif::VK_EXT_rasterization_order_attachment_access,VK_ARM_rasterization_order_attachment_access[] 3388ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 3389 * [[VUID-VkGraphicsPipelineCreateInfo-pipelineStageCreationFeedbackCount-06594]] 3390 If 3391 slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount 3392 is not `0`, it must: be equal to pname:stageCount 3393endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 3394ifdef::VK_NVX_multiview_per_view_attributes[] 3395 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06595]] 3396 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline is being 3397 created with <<pipelines-graphics-subsets-pre-rasterization, 3398 pre-rasterization shader state>> or 3399 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3400 and 3401 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly 3402 is ename:VK_TRUE then 3403 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes must: 3404 also be ename:VK_TRUE 3405 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06596]] 3406 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3407 only one of 3408 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3409 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3410 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3411 includes the other flag, the value of 3412 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes 3413 specified in both this pipeline and the library must: be equal 3414 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06597]] 3415 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3416 includes 3417 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3418 another element includes 3419 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of 3420 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributes 3421 specified in both libraries must: be equal 3422 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06598]] 3423 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3424 only one of 3425 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3426 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3427 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3428 includes the other flag, the value of 3429 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly 3430 specified in both this pipeline and the library must: be equal 3431 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06599]] 3432 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3433 includes 3434 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3435 another element includes 3436 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the value of 3437 slink:VkMultiviewPerViewAttributesInfoNVX::pname:perViewAttributesPositionXOnly 3438 specified in both libraries must: be equal 3439endif::VK_NVX_multiview_per_view_attributes[] 3440 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06600]] 3441 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3442 pre-rasterization shader state>> or 3443 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3444 pname:pStages must: be a valid pointer to an array of pname:stageCount 3445 valid slink:VkPipelineShaderStageCreateInfo structures 3446ifndef::VK_EXT_extended_dynamic_state3[] 3447 * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-06601]] 3448 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3449 pre-rasterization shader state>>, pname:pRasterizationState must: be a 3450 valid pointer to a valid slink:VkPipelineRasterizationStateCreateInfo 3451 structure 3452endif::VK_EXT_extended_dynamic_state3[] 3453ifdef::VK_EXT_extended_dynamic_state3[] 3454 * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09039]] 3455 If the `apiext:VK_EXT_extended_dynamic_state3` extension is not enabled, 3456 or any of the ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, 3457 ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or 3458 ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states are 3459 not set, or <<features-alphaToOne,alphaToOne>> is enabled on the device 3460 and ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, then 3461 pname:pMultisampleState must: be a valid pointer to a valid 3462 slink:VkPipelineMultisampleStateCreateInfo structure 3463 * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09040]] 3464 If pname:pRasterizationState is not `NULL` it must: be a valid pointer 3465 to a valid slink:VkPipelineRasterizationStateCreateInfo structure 3466endif::VK_EXT_extended_dynamic_state3[] 3467 * [[VUID-VkGraphicsPipelineCreateInfo-layout-06602]] 3468 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3469 fragment shader state>> or 3470 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 3471 state>>, pname:layout must: be a valid slink:VkPipelineLayout handle 3472 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-06603]] 3473 If <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization 3474 shader state>>, <<pipelines-graphics-subsets-fragment-shader, fragment 3475 shader state>>, or <<pipelines-graphics-subsets-fragment-output, 3476 fragment output state>>, 3477ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3478 and pname:renderPass is not dlink:VK_NULL_HANDLE, 3479endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3480 pname:renderPass must: be a valid slink:VkRenderPass handle 3481 * [[VUID-VkGraphicsPipelineCreateInfo-stageCount-06604]] 3482 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3483 pre-rasterization shader state>> or 3484 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 3485 pname:stageCount must: be greater than `0` 3486ifdef::VK_EXT_graphics_pipeline_library[] 3487 * [[VUID-VkGraphicsPipelineCreateInfo-graphicsPipelineLibrary-06606]] 3488 If the <<features-graphicsPipelineLibrary, 3489 pname:graphicsPipelineLibrary>> feature is not enabled, pname:flags 3490 must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 3491 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06608]] 3492 If the pipeline defines, or includes as libraries, all the state subsets 3493 required for a <<pipelines-graphics-subsets-complete, complete graphics 3494 pipeline>>, pname:flags must: not include 3495 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 3496 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06609]] 3497 If pname:flags includes 3498 ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, pipeline 3499 libraries included via slink:VkPipelineLibraryCreateInfoKHR must: have 3500 been created with 3501 ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT 3502 * [[VUID-VkGraphicsPipelineCreateInfo-flags-09245]] 3503 If pname:flags includes 3504 ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, 3505 pname:flags must: also include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 3506 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06610]] 3507 If pname:flags includes 3508 ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, 3509 pipeline libraries included via slink:VkPipelineLibraryCreateInfoKHR 3510 must: have been created with 3511 ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT 3512 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06611]] 3513 Any pipeline libraries included via 3514 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries must: not include 3515 any <<pipelines-graphics-subsets, state subset>> already defined by this 3516 structure or defined by any other pipeline library in 3517 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3518 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06612]] 3519 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3520 only one of 3521 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3522 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3523 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3524 includes the other flag, and pname:layout was not created with 3525 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the 3526 pname:layout used by this pipeline and the library must: be _identically 3527 defined_ 3528 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06613]] 3529 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3530 includes 3531 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3532 another element includes 3533 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the 3534 pname:layout specified by either library was not created with 3535 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the 3536 pname:layout used by each library must: be _identically defined_ 3537 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06614]] 3538 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3539 only one of 3540 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3541 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3542 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3543 other subset, and pname:layout was created with 3544 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the 3545 pname:layout used by the library must: also have been created with 3546 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT 3547 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06615]] 3548 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3549 includes 3550 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3551 another element includes 3552 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the 3553 pname:layout specified by either library was created with 3554 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then the 3555 pname:layout used by both libraries must: have been created with 3556 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT 3557 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06616]] 3558 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3559 only one of 3560 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3561 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3562 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3563 other subset, and pname:layout was created with 3564 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of 3565 the pname:pSetLayouts array which pname:layout was created with that are 3566 not dlink:VK_NULL_HANDLE must: be _identically defined_ to the element 3567 at the same index of pname:pSetLayouts used to create the library's 3568 pname:layout 3569 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06617]] 3570 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3571 includes 3572 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3573 another element includes 3574 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and the 3575 pname:layout specified by either library was created with 3576 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, elements of 3577 the pname:pSetLayouts array which either pname:layout was created with 3578 that are not dlink:VK_NULL_HANDLE must: be _identically defined_ to the 3579 element at the same index of pname:pSetLayouts used to create the other 3580 library's pname:layout 3581 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06618]] 3582 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3583 only one of 3584 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3585 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3586 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3587 includes the other flag, any descriptor set layout _N_ specified by 3588 pname:layout in both this pipeline and the library which include 3589 bindings accessed by shader stages in each must: be _identically 3590 defined_ 3591 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06619]] 3592 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3593 includes 3594 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3595 another element includes 3596 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, any 3597 descriptor set layout _N_ specified by pname:layout in both libraries 3598 which include bindings accessed by shader stages in each must: be 3599 _identically defined_ 3600 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06620]] 3601 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3602 only one of 3603 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3604 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3605 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3606 includes the other flag, push constants specified in pname:layout in 3607 both this pipeline and the library which are available to shader stages 3608 in each must: be _identically defined_ 3609 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06621]] 3610 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3611 includes 3612 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3613 another element includes 3614 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, push 3615 constants specified in pname:layout in both this pipeline and the 3616 library which are available to shader stages in each must: be 3617 _identically defined_ 3618 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06679]] 3619 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3620 only one of 3621 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3622 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3623 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3624 other subset, and any element of the pname:pSetLayouts array which 3625 pname:layout was created with was dlink:VK_NULL_HANDLE, then the 3626 corresponding element of the pname:pSetLayouts array used to create the 3627 library's pname:layout must: not be dlink:VK_NULL_HANDLE 3628 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06680]] 3629 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3630 only one of 3631 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3632 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3633 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3634 other subset, and any element of the pname:pSetLayouts array used to 3635 create the library's pname:layout was dlink:VK_NULL_HANDLE, then the 3636 corresponding element of the pname:pSetLayouts array used to create this 3637 pipeline's pname:layout must: not be dlink:VK_NULL_HANDLE 3638 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06681]] 3639 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3640 includes 3641 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3642 another element includes 3643 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and any 3644 element of the pname:pSetLayouts array used to create each library's 3645 pname:layout was dlink:VK_NULL_HANDLE, then the corresponding element of 3646 the pname:pSetLayouts array used to create the other library's 3647 pname:layout must: not be dlink:VK_NULL_HANDLE 3648 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06756]] 3649 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3650 only one of 3651 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3652 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3653 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3654 other subset, and any element of the pname:pSetLayouts array which 3655 pname:layout was created with was dlink:VK_NULL_HANDLE, then the 3656 corresponding element of the pname:pSetLayouts array used to create the 3657 library's pname:layout must: not have shader bindings for shaders in the 3658 other subset 3659 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06757]] 3660 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3661 only one of 3662 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3663 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, an element 3664 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes the 3665 other subset, and any element of the pname:pSetLayouts array used to 3666 create the library's pname:layout was dlink:VK_NULL_HANDLE, then the 3667 corresponding element of the pname:pSetLayouts array used to create this 3668 pipeline's pname:layout must: not have shader bindings for shaders in 3669 the other subset 3670 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06758]] 3671 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3672 includes 3673 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3674 another element includes 3675 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and any 3676 element of the pname:pSetLayouts array used to create each library's 3677 pname:layout was dlink:VK_NULL_HANDLE, then the corresponding element of 3678 the pname:pSetLayouts array used to create the other library's 3679 pname:layout must: not have shader bindings for shaders in the other 3680 subset 3681 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06682]] 3682 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3683 both 3684 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3685 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pname:layout 3686 must: have been created with no elements of the pname:pSetLayouts array 3687 set to dlink:VK_NULL_HANDLE 3688 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06683]] 3689 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3690 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3691 pname:pRasterizationState->rasterizerDiscardEnable is ename:VK_TRUE, 3692 pname:layout must: have been created with no elements of the 3693 pname:pSetLayouts array set to dlink:VK_NULL_HANDLE 3694 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06684]] 3695 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at 3696 least one of and no more than two of 3697 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3698 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3699 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3700 and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3701 includes one of the other flags, the value of pname:subpass must: be 3702 equal to that used to create the library 3703 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06623]] 3704 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3705 includes at least one of and no more than two of 3706 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3707 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3708 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3709 and another element of 3710 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of 3711 the other flags, the value of pname:subpass used to create each library 3712 must: be identical 3713 * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06624]] 3714 If pname:renderpass is not dlink:VK_NULL_HANDLE, 3715 slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at 3716 least one of and no more than two of 3717 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3718 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3719 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3720 and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3721 includes one of the other flags, pname:renderPass must: be compatible 3722 with that used to create the library 3723ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3724 * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06625]] 3725 If pname:renderpass is dlink:VK_NULL_HANDLE, 3726 slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at 3727 least one of and no more than two of 3728 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3729 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3730 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3731 and an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3732 includes one of the other flags, the value of pname:renderPass used to 3733 create that library must: also be dlink:VK_NULL_HANDLE 3734 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06626]] 3735 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes at 3736 least one of and no more than two of 3737 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3738 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3739 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, an 3740 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3741 includes one of the other flags, and pname:renderPass is 3742 dlink:VK_NULL_HANDLE, the value of 3743 slink:VkPipelineRenderingCreateInfo::pname:viewMask used by this 3744 pipeline and that specified by the library must: be identical 3745 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06627]] 3746 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3747 includes at least one of and no more than two of 3748 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3749 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3750 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3751 another element of 3752 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of 3753 the other flags, and pname:renderPass was dlink:VK_NULL_HANDLE for both 3754 libraries, the value of 3755 slink:VkPipelineRenderingCreateInfo::pname:viewMask set by each library 3756 must: be identical 3757endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3758 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06628]] 3759 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3760 includes at least one of and no more than two of 3761 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3762 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, or 3763 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3764 and another element of 3765 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes one of 3766 the other flags, the pname:renderPass objects used to create each 3767 library must: be compatible or all equal to dlink:VK_NULL_HANDLE 3768 * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-06629]] 3769 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3770 fragment shader state>> pname:pMultisampleState must: be `NULL` or a 3771 valid pointer to a valid slink:VkPipelineMultisampleStateCreateInfo 3772 structure 3773ifndef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3774 * [[VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-06630]] 3775 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3776 fragment shader state>> pname:pMultisampleState must: not be `NULL` 3777endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3778ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3779 * [[VUID-VkGraphicsPipelineCreateInfo-renderpass-06631]] 3780 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3781 fragment shader state>> and pname:renderpass is not 3782 dlink:VK_NULL_HANDLE, then pname:pMultisampleState must: not be `NULL` 3783 * [[VUID-VkGraphicsPipelineCreateInfo-Input-06632]] 3784 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 3785 fragment shader state>> with a fragment shader that either enables 3786 <<primsrast-sampleshading, sample shading>> or decorates any variable in 3787 the code:Input storage class with code:Sample, then 3788 pname:pMultisampleState must: not be `NULL` 3789endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 3790 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06633]] 3791 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3792 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a 3793 pname:pMultisampleState that was not `NULL`, and an element of 3794 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created with 3795 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3796 pname:pMultisampleState must: be _identically defined_ to that used to 3797 create the library 3798 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06634]] 3799 If an element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3800 was created with 3801 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a 3802 pname:pMultisampleState that was not `NULL`, and if 3803 slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3804 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3805 pname:pMultisampleState must: be _identically defined_ to that used to 3806 create the library 3807 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06635]] 3808 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3809 was created with 3810 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT with a 3811 pname:pMultisampleState that was not `NULL`, and if a different element 3812 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created 3813 with 3814 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3815 the pname:pMultisampleState used to create each library must: be 3816 _identically defined_ 3817 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06636]] 3818 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3819 was created with 3820 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT and 3821 a value of pname:pMultisampleState->sampleShading equal ename:VK_TRUE, 3822 and if a different element of 3823 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created with 3824 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the 3825 pname:pMultisampleState used to create each library must: be 3826 _identically defined_ 3827 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06637]] 3828 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3829 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3830 pname:pMultisampleState->sampleShading is ename:VK_TRUE, and an element 3831 of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries was created 3832 with ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, the 3833 pname:pMultisampleState used to create that library must: be 3834 _identically defined_ pname:pMultisampleState 3835ifdef::VK_KHR_fragment_shading_rate[] 3836 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06638]] 3837 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3838 only one of 3839 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3840 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and an 3841 element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3842 includes the other flag, values specified in 3843 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR for both this 3844 pipeline and that library must: be identical 3845 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06639]] 3846 If one element of slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries 3847 includes 3848 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT and 3849 another element includes 3850 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, values 3851 specified in slink:VkPipelineFragmentShadingRateStateCreateInfoKHR for 3852 both this pipeline and that library must: be identical 3853endif::VK_KHR_fragment_shading_rate[] 3854 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06640]] 3855 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3856 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3857 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 3858 pname:pStages must: be a valid pointer to an array of pname:stageCount 3859 valid slink:VkPipelineShaderStageCreateInfo structures 3860ifndef::VK_EXT_extended_dynamic_state3[] 3861 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06641]] 3862 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3863 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3864 pname:pRasterizationState must: be a valid pointer to a valid 3865 slink:VkPipelineRasterizationStateCreateInfo structure 3866endif::VK_EXT_extended_dynamic_state3[] 3867ifdef::VK_EXT_extended_dynamic_state3[] 3868 * [[VUID-VkGraphicsPipelineCreateInfo-flags-09041]] 3869 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3870 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 3871 and the `apiext:VK_EXT_extended_dynamic_state3` extension is not 3872 enabled, or any of the ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT, 3873 ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT, or 3874 ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT dynamic states are 3875 not set, or <<features-alphaToOne,alphaToOne>> is enabled on the device 3876 and ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT is not set, 3877 pname:pMultisampleState must: be a valid pointer to a valid 3878 slink:VkPipelineMultisampleStateCreateInfo structure 3879 * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-09042]] 3880 If pname:pRasterizationState is not `NULL` it must: be a valid pointer 3881 to a valid slink:VkPipelineRasterizationStateCreateInfo structure 3882endif::VK_EXT_extended_dynamic_state3[] 3883 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06642]] 3884 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3885 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3886 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, pname:layout 3887 must: be a valid slink:VkPipelineLayout handle 3888 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06643]] 3889 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3890 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, or 3891 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 3892 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 3893 and pname:renderPass is not dlink:VK_NULL_HANDLE, pname:renderPass must: 3894 be a valid slink:VkRenderPass handle 3895 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06644]] 3896 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 3897 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT or 3898 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 3899 pname:stageCount must: be greater than `0` 3900ifdef::VK_KHR_pipeline_executable_properties[] 3901 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06645]] 3902 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags is 3903 non-zero, if pname:flags includes 3904 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, any 3905 libraries must: have also been created with 3906 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 3907 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06646]] 3908 If slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes more 3909 than one library, and any library was created with 3910 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, all 3911 libraries must: have also been created with 3912 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 3913 * [[VUID-VkGraphicsPipelineCreateInfo-pLibraries-06647]] 3914 If slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries includes at 3915 least one library, 3916 slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags is non-zero, 3917 and any library was created with 3918 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR, 3919 pname:flags must: include 3920 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 3921endif::VK_KHR_pipeline_executable_properties[] 3922 * [[VUID-VkGraphicsPipelineCreateInfo-None-07826]] 3923 If the pipeline includes a <<pipelines-graphics-subsets-complete, 3924 complete set of state>>, and there are no libraries included in 3925 slink:VkPipelineLibraryCreateInfoKHR::pname:pLibraries, then 3926 slink:VkPipelineLayout must: be a valid pipeline layout 3927 * [[VUID-VkGraphicsPipelineCreateInfo-layout-07827]] 3928 If the pipeline includes a <<pipelines-graphics-subsets-complete, 3929 complete set of state>> specified entirely by libraries, and each 3930 library was created with a slink:VkPipelineLayout created without 3931 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then 3932 pname:layout must: be <<descriptorsets-compatibility,compatible>> with 3933 the layouts in those libraries 3934 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06729]] 3935 If pname:flags includes 3936 ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline 3937 includes a <<pipelines-graphics-subsets-complete, complete set of 3938 state>> specified entirely by libraries, and each library was created 3939 with a slink:VkPipelineLayout created with 3940 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then 3941 pname:layout must: be <<descriptorsets-compatibility,compatible>> with 3942 the union of the libraries' pipeline layouts other than the 3943 inclusion/exclusion of 3944 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT 3945 * [[VUID-VkGraphicsPipelineCreateInfo-flags-06730]] 3946 If pname:flags does not include 3947 ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT, the pipeline 3948 includes a <<pipelines-graphics-subsets-complete, complete set of 3949 state>> specified entirely by libraries, and each library was created 3950 with a slink:VkPipelineLayout created with 3951 ename:VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, then 3952 pname:layout must: be <<descriptorsets-compatibility, compatible>> with 3953 the union of the libraries' pipeline layouts 3954endif::VK_EXT_graphics_pipeline_library[] 3955ifdef::VK_EXT_conservative_rasterization[] 3956ifndef::VK_EXT_extended_dynamic_state3[] 3957 * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06759]] 3958 If <<limits-conservativePointAndLineRasterization, 3959 pname:conservativePointAndLineRasterization>> is not supported; the 3960 pipeline requires <<pipelines-graphics-subsets-vertex-input, vertex 3961 input state>> and <<pipelines-graphics-subsets-pre-rasterization, 3962 pre-rasterization shader state>>; the pipeline does not include a 3963 geometry shader; and the value of 3964 slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology is 3965 ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, 3966 ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, or 3967 ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, then 3968 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode 3969 must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT 3970endif::VK_EXT_extended_dynamic_state3[] 3971ifdef::VK_EXT_extended_dynamic_state3[] 3972 * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-08892]] 3973 If <<limits-conservativePointAndLineRasterization, 3974 pname:conservativePointAndLineRasterization>> is not supported; the 3975 pipeline is being created with 3976 <<pipelines-graphics-subsets-vertex-input, vertex input state>> and 3977 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 3978 state>>; the pipeline does not include a geometry shader; and the value 3979 of slink:VkPipelineInputAssemblyStateCreateInfo::pname:topology is 3980 ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, 3981 ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, or 3982 ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, and either 3983 ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY dynamic state is not enabled 3984 or 3985 <<limits-dynamicPrimitiveTopologyUnrestricted,pname:dynamicPrimitiveTopologyUnrestricted>> 3986 is ename:VK_FALSE, then 3987 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode 3988 must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT 3989endif::VK_EXT_extended_dynamic_state3[] 3990 * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06760]] 3991 If <<limits-conservativePointAndLineRasterization, 3992 pname:conservativePointAndLineRasterization>> is not supported, the 3993 pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 3994 pre-rasterization shader state>>, and the pipeline includes a geometry 3995 shader with either the code:OutputPoints or code:OutputLineStrip 3996 execution modes, 3997 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode 3998 must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT 3999ifdef::VK_NV_mesh_shader[] 4000 * [[VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06761]] 4001 If <<limits-conservativePointAndLineRasterization, 4002 pname:conservativePointAndLineRasterization>> is not supported, the 4003 pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 4004 pre-rasterization shader state>>, and the pipeline includes a mesh 4005 shader with either the code:OutputPoints or code:OutputLinesNV execution 4006 modes, 4007 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT::pname:conservativeRasterizationMode 4008 must: be ename:VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT 4009endif::VK_NV_mesh_shader[] 4010endif::VK_EXT_conservative_rasterization[] 4011 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06894]] 4012 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 4013 pre-rasterization shader state>> but not 4014 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 4015 elements of pname:pStages must: not have pname:stage set to 4016 ename:VK_SHADER_STAGE_FRAGMENT_BIT 4017 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06895]] 4018 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 4019 fragment shader state>> but not 4020 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4021 state>>, elements of pname:pStages must: not have pname:stage set to a 4022 shader stage which participates in pre-rasterization 4023 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-06896]] 4024 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 4025 pre-rasterization shader state>>, all elements of pname:pStages must: 4026 have a pname:stage set to a shader stage which participates in 4027 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> or 4028 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4029 state>> 4030 * [[VUID-VkGraphicsPipelineCreateInfo-stage-06897]] 4031 If the pipeline requires <<pipelines-graphics-subsets-fragment-shader, 4032 fragment shader state>> and/or 4033 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4034 state>>, any value of pname:stage must: not be set in more than one 4035 element of pname:pStages 4036ifdef::VK_EXT_extended_dynamic_state3[] 4037 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3TessellationDomainOrigin-07370]] 4038 If the <<features-extendedDynamicState3TessellationDomainOrigin, 4039 pname:extendedDynamicState3TessellationDomainOrigin>> feature is not 4040 enabled, there must: be no element of the pname:pDynamicStates member of 4041 pname:pDynamicState set to 4042 ename:VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT 4043 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClampEnable-07371]] 4044 If the <<features-extendedDynamicState3DepthClampEnable, 4045 pname:extendedDynamicState3DepthClampEnable>> feature is not enabled, 4046 there must: be no element of the pname:pDynamicStates member of 4047 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT 4048 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3PolygonMode-07372]] 4049 If the <<features-extendedDynamicState3PolygonMode, 4050 pname:extendedDynamicState3PolygonMode>> feature is not enabled, there 4051 must: be no element of the pname:pDynamicStates member of 4052 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT 4053 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationSamples-07373]] 4054 If the <<features-extendedDynamicState3RasterizationSamples, 4055 pname:extendedDynamicState3RasterizationSamples>> feature is not 4056 enabled, there must: be no element of the pname:pDynamicStates member of 4057 pname:pDynamicState set to 4058 ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT 4059 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleMask-07374]] 4060 If the <<features-extendedDynamicState3SampleMask, 4061 pname:extendedDynamicState3SampleMask>> feature is not enabled, there 4062 must: be no element of the pname:pDynamicStates member of 4063 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT 4064 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToCoverageEnable-07375]] 4065 If the <<features-extendedDynamicState3AlphaToCoverageEnable, 4066 pname:extendedDynamicState3AlphaToCoverageEnable>> feature is not 4067 enabled, there must: be no element of the pname:pDynamicStates member of 4068 pname:pDynamicState set to 4069 ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT 4070 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3AlphaToOneEnable-07376]] 4071 If the <<features-extendedDynamicState3AlphaToOneEnable, 4072 pname:extendedDynamicState3AlphaToOneEnable>> feature is not enabled, 4073 there must: be no element of the pname:pDynamicStates member of 4074 pname:pDynamicState set to 4075 ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT 4076 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LogicOpEnable-07377]] 4077 If the <<features-extendedDynamicState3LogicOpEnable, 4078 pname:extendedDynamicState3LogicOpEnable>> feature is not enabled, there 4079 must: be no element of the pname:pDynamicStates member of 4080 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT 4081 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEnable-07378]] 4082 If the <<features-extendedDynamicState3ColorBlendEnable, 4083 pname:extendedDynamicState3ColorBlendEnable>> feature is not enabled, 4084 there must: be no element of the pname:pDynamicStates member of 4085 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT 4086 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendEquation-07379]] 4087 If the <<features-extendedDynamicState3ColorBlendEquation, 4088 pname:extendedDynamicState3ColorBlendEquation>> feature is not enabled, 4089 there must: be no element of the pname:pDynamicStates member of 4090 pname:pDynamicState set to 4091 ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT 4092 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorWriteMask-07380]] 4093 If the <<features-extendedDynamicState3ColorWriteMask, 4094 pname:extendedDynamicState3ColorWriteMask>> feature is not enabled, 4095 there must: be no element of the pname:pDynamicStates member of 4096 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT 4097 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RasterizationStream-07381]] 4098 If the <<features-extendedDynamicState3RasterizationStream, 4099 pname:extendedDynamicState3RasterizationStream>> feature is not enabled, 4100 there must: be no element of the pname:pDynamicStates member of 4101 pname:pDynamicState set to 4102 ename:VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT 4103 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ConservativeRasterizationMode-07382]] 4104 If the <<features-extendedDynamicState3ConservativeRasterizationMode, 4105 pname:extendedDynamicState3ConservativeRasterizationMode>> feature is 4106 not enabled, there must: be no element of the pname:pDynamicStates 4107 member of pname:pDynamicState set to 4108 ename:VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT 4109 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ExtraPrimitiveOverestimationSize-07383]] 4110 If the <<features-extendedDynamicState3ExtraPrimitiveOverestimationSize, 4111 pname:extendedDynamicState3ExtraPrimitiveOverestimationSize>> feature is 4112 not enabled, there must: be no element of the pname:pDynamicStates 4113 member of pname:pDynamicState set to 4114 ename:VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT 4115 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipEnable-07384]] 4116 If the <<features-extendedDynamicState3DepthClipEnable, 4117 pname:extendedDynamicState3DepthClipEnable>> feature is not enabled, 4118 there must: be no element of the pname:pDynamicStates member of 4119 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT 4120 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3SampleLocationsEnable-07385]] 4121 If the <<features-extendedDynamicState3SampleLocationsEnable, 4122 pname:extendedDynamicState3SampleLocationsEnable>> feature is not 4123 enabled, there must: be no element of the pname:pDynamicStates member of 4124 pname:pDynamicState set to 4125 ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT 4126 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ColorBlendAdvanced-07386]] 4127 If the <<features-extendedDynamicState3ColorBlendAdvanced, 4128 pname:extendedDynamicState3ColorBlendAdvanced>> feature is not enabled, 4129 there must: be no element of the pname:pDynamicStates member of 4130 pname:pDynamicState set to 4131 ename:VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT 4132 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ProvokingVertexMode-07387]] 4133 If the <<features-extendedDynamicState3ProvokingVertexMode, 4134 pname:extendedDynamicState3ProvokingVertexMode>> feature is not enabled, 4135 there must: be no element of the pname:pDynamicStates member of 4136 pname:pDynamicState set to 4137 ename:VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT 4138 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineRasterizationMode-07388]] 4139 If the <<features-extendedDynamicState3LineRasterizationMode, 4140 pname:extendedDynamicState3LineRasterizationMode>> feature is not 4141 enabled, there must: be no element of the pname:pDynamicStates member of 4142 pname:pDynamicState set to 4143 ename:VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT 4144 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3LineStippleEnable-07389]] 4145 If the <<features-extendedDynamicState3LineStippleEnable, 4146 pname:extendedDynamicState3LineStippleEnable>> feature is not enabled, 4147 there must: be no element of the pname:pDynamicStates member of 4148 pname:pDynamicState set to 4149 ename:VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT 4150 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3DepthClipNegativeOneToOne-07390]] 4151 If the <<features-extendedDynamicState3DepthClipNegativeOneToOne, 4152 pname:extendedDynamicState3DepthClipNegativeOneToOne>> feature is not 4153 enabled, there must: be no element of the pname:pDynamicStates member of 4154 pname:pDynamicState set to 4155 ename:VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT 4156 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportWScalingEnable-07391]] 4157 If the <<features-extendedDynamicState3ViewportWScalingEnable, 4158 pname:extendedDynamicState3ViewportWScalingEnable>> feature is not 4159 enabled, there must: be no element of the pname:pDynamicStates member of 4160 pname:pDynamicState set to 4161 ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV 4162 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ViewportSwizzle-07392]] 4163 If the <<features-extendedDynamicState3ViewportSwizzle, 4164 pname:extendedDynamicState3ViewportSwizzle>> feature is not enabled, 4165 there must: be no element of the pname:pDynamicStates member of 4166 pname:pDynamicState set to ename:VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV 4167 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorEnable-07393]] 4168 If the <<features-extendedDynamicState3CoverageToColorEnable, 4169 pname:extendedDynamicState3CoverageToColorEnable>> feature is not 4170 enabled, there must: be no element of the pname:pDynamicStates member of 4171 pname:pDynamicState set to 4172 ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV 4173 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageToColorLocation-07394]] 4174 If the <<features-extendedDynamicState3CoverageToColorLocation, 4175 pname:extendedDynamicState3CoverageToColorLocation>> feature is not 4176 enabled, there must: be no element of the pname:pDynamicStates member of 4177 pname:pDynamicState set to 4178 ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV 4179 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationMode-07395]] 4180 If the <<features-extendedDynamicState3CoverageModulationMode, 4181 pname:extendedDynamicState3CoverageModulationMode>> feature is not 4182 enabled, there must: be no element of the pname:pDynamicStates member of 4183 pname:pDynamicState set to 4184 ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV 4185 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTableEnable-07396]] 4186 If the <<features-extendedDynamicState3CoverageModulationTableEnable, 4187 pname:extendedDynamicState3CoverageModulationTableEnable>> feature is 4188 not enabled, there must: be no element of the pname:pDynamicStates 4189 member of pname:pDynamicState set to 4190 ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV 4191 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageModulationTable-07397]] 4192 If the <<features-extendedDynamicState3CoverageModulationTable, 4193 pname:extendedDynamicState3CoverageModulationTable>> feature is not 4194 enabled, there must: be no element of the pname:pDynamicStates member of 4195 pname:pDynamicState set to 4196 ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV 4197 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3CoverageReductionMode-07398]] 4198 If the <<features-extendedDynamicState3CoverageReductionMode, 4199 pname:extendedDynamicState3CoverageReductionMode>> feature is not 4200 enabled, there must: be no element of the pname:pDynamicStates member of 4201 pname:pDynamicState set to 4202 ename:VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV 4203 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3RepresentativeFragmentTestEnable-07399]] 4204 If the <<features-extendedDynamicState3RepresentativeFragmentTestEnable, 4205 pname:extendedDynamicState3RepresentativeFragmentTestEnable>> feature is 4206 not enabled, there must: be no element of the pname:pDynamicStates 4207 member of pname:pDynamicState set to 4208 ename:VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV 4209 * [[VUID-VkGraphicsPipelineCreateInfo-extendedDynamicState3ShadingRateImageEnable-07400]] 4210 If the <<features-extendedDynamicState3ShadingRateImageEnable, 4211 pname:extendedDynamicState3ShadingRateImageEnable>> feature is not 4212 enabled, there must: be no element of the pname:pDynamicStates member of 4213 pname:pDynamicState set to 4214 ename:VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV 4215endif::VK_EXT_extended_dynamic_state3[] 4216ifdef::VK_EXT_opacity_micromap[] 4217 * [[VUID-VkGraphicsPipelineCreateInfo-flags-07401]] 4218 pname:flags must: not include 4219 ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT 4220endif::VK_EXT_opacity_micromap[] 4221ifdef::VK_NV_displacement_micromap[] 4222 * [[VUID-VkGraphicsPipelineCreateInfo-flags-07997]] 4223 pname:flags must: not include 4224 ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 4225endif::VK_NV_displacement_micromap[] 4226ifdef::VK_QCOM_multiview_per_view_viewports[] 4227 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07730]] 4228 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 4229 pre-rasterization shader state>>, and no element of the 4230 pname:pDynamicStates member of pname:pDynamicState is 4231 ename:VK_DYNAMIC_STATE_VIEWPORT or 4232 ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, and if 4233 <<features-multiview-per-view-viewports, 4234 pname:multiviewPerViewViewports>> is enabled, then the index of the most 4235 significant bit in each element of 4236 slink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks must: be less 4237 than pname:pViewportState::pname:viewportCount 4238 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07731]] 4239 If the pipeline requires <<pipelines-graphics-subsets-pre-rasterization, 4240 pre-rasterization shader state>>, and no element of the 4241 pname:pDynamicStates member of pname:pDynamicState is 4242 ename:VK_DYNAMIC_STATE_SCISSOR or 4243 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, and if 4244 <<features-multiview-per-view-viewports, 4245 pname:multiviewPerViewViewports>> is enabled, then the index of the most 4246 significant bit in each element of 4247 slink:VkRenderPassMultiviewCreateInfo::pname:pViewMasks must: be less 4248 than pname:pViewportState::pname:scissorCount 4249endif::VK_QCOM_multiview_per_view_viewports[] 4250ifdef::VK_EXT_shader_tile_image[] 4251 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08711]] 4252 If pname:pStages includes a fragment shader stage, 4253 ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE is not set in 4254 slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates, and the 4255 fragment shader declares the code:EarlyFragmentTests execution mode and 4256 uses code:OpDepthAttachmentReadEXT, the pname:depthWriteEnable member of 4257 slink:VkPipelineDepthStencilStateCreateInfo must: be ename:VK_FALSE 4258 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08712]] 4259 If pname:pStages includes a fragment shader stage, 4260 ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK is not set in 4261 slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates, and the 4262 fragment shader declares the code:EarlyFragmentTests execution mode and 4263 uses code:OpStencilAttachmentReadEXT, the value of 4264 slink:VkStencilOpState::pname:writeMask for both pname:front and 4265 pname:back in slink:VkPipelineDepthStencilStateCreateInfo must: be `0` 4266endif::VK_EXT_shader_tile_image[] 4267ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4268 * [[VUID-VkGraphicsPipelineCreateInfo-renderPass-08744]] 4269 If pname:renderPass is dlink:VK_NULL_HANDLE, the pipeline requires 4270 <<pipelines-graphics-subsets-fragment-output, fragment output state>> or 4271 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>>, 4272 the pipeline enables <<primsrast-sampleshading, sample shading>>, 4273 pname:rasterizationSamples is not dynamic, and the pname:pNext chain 4274 includes a slink:VkPipelineRenderingCreateInfo structure, 4275 pname:rasterizationSamples must: be a bit value that is set in 4276 pname:imageCreateSampleCounts (as defined in 4277 <<resources-image-creation-limits,Image Creation Limits>>) for every 4278 element of pname:depthAttachmentFormat, pname:stencilAttachmentFormat 4279 and the pname:pColorAttachmentFormats array which is not 4280 ename:VK_FORMAT_UNDEFINED 4281endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4282ifndef::VK_EXT_graphics_pipeline_library[] 4283 * [[VUID-VkGraphicsPipelineCreateInfo-None-08893]] 4284 The pipeline must: be created with 4285 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4286 state>> 4287 * [[VUID-VkGraphicsPipelineCreateInfo-pStages-08894]] 4288 If pname:pStages includes a vertex shader stage, the pipeline must: be 4289 created with <<pipelines-graphics-subsets-vertex-input, vertex input 4290 state>> 4291ifndef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4292 * [[VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-08895]] 4293 If pname:pRasterizationState->rasterizerDiscardEnable is ename:VK_FALSE, 4294 the pipeline must: be created with 4295 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4296 and <<pipelines-graphics-subsets-fragment-output,fragment output 4297 interface state>> 4298endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4299ifdef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4300 * [[VUID-VkGraphicsPipelineCreateInfo-pDynamicState-08896]] 4301 If pname:pDynamicState->pDynamicStates includes 4302 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, or if it does not and 4303 pname:pRasterizationState->rasterizerDiscardEnable is ename:VK_FALSE, 4304 the pipeline must: be created with 4305 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4306 and <<pipelines-graphics-subsets-fragment-output,fragment output 4307 interface state>> 4308endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4309endif::VK_EXT_graphics_pipeline_library[] 4310ifdef::VK_EXT_graphics_pipeline_library[] 4311 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08897]] 4312 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4313 ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, 4314 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4315 state>> is specified either in a library or by the inclusion of 4316 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4317 and that state includes a vertex shader stage in pname:pStages, the 4318 pipeline must: define <<pipelines-graphics-subsets-vertex-input, vertex 4319 input state>> 4320 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08898]] 4321 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4322 ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT, and 4323 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4324 state>> is not specified, the pipeline must: define 4325 <<pipelines-graphics-subsets-vertex-input, vertex input state>> 4326 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08899]] 4327 If pname:flags does not include 4328 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, 4329 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4330 state>> is specified either in a library or by the inclusion of 4331 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4332 and that state includes a vertex shader stage in pname:pStages, the 4333 pipeline must: either define 4334 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4335 state>> or include that state in a linked pipeline library 4336 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08900]] 4337 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4338 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT the 4339 pipeline must: define <<pipelines-graphics-subsets-pre-rasterization, 4340 pre-rasterization shader state>> 4341 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08901]] 4342 If pname:flags does not include 4343 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the pipeline must: either 4344 define <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization 4345 shader state>> or include that state in a linked pipeline library 4346ifndef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4347 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08902]] 4348 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4349 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 4350 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4351 state>> is specified either in a library or by the inclusion of 4352 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4353 and that state has pname:pRasterizationState->rasterizerDiscardEnable 4354 set to ename:VK_FALSE, the pipeline must: define 4355 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4356endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4357ifdef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4358 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08903]] 4359 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4360 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 4361 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4362 state>> is specified either in a library or by the inclusion of 4363 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4364 and that state either includes 4365 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has 4366 pname:pRasterizationState->rasterizerDiscardEnable set to 4367 ename:VK_FALSE, the pipeline must: define 4368 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4369endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4370 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08904]] 4371 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4372 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and 4373 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4374 state>> is not specified, the pipeline must: define 4375 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4376ifndef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4377 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08905]] 4378 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4379 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 4380 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4381 state>> is specified either in a library or by the inclusion of 4382 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 4383 and that state has pname:pRasterizationState->rasterizerDiscardEnable 4384 set to ename:VK_FALSE, the pipeline must: define 4385 <<pipelines-graphics-subsets-fragment-output,fragment output interface 4386 state>> 4387endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4388ifdef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4389 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08906]] 4390 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4391 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, 4392 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4393 state>> is specified either in a library or by the inclusion of 4394 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT, 4395 and that state either includes 4396 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has 4397 pname:pRasterizationState->rasterizerDiscardEnable set to 4398 ename:VK_FALSE, the pipeline must: define 4399 <<pipelines-graphics-subsets-fragment-output,fragment output interface 4400 state>> 4401endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4402 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08907]] 4403 If slink:VkGraphicsPipelineLibraryCreateInfoEXT::pname:flags includes 4404 ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT, and 4405 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4406 state>> is not specified, the pipeline must: define 4407 <<pipelines-graphics-subsets-fragment-output,fragment output interface 4408 state>> 4409ifndef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4410 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08908]] 4411 If pname:flags does not include 4412 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, 4413 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4414 state>> is specified either in a library or by the inclusion of 4415 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4416 and that state has pname:pRasterizationState->rasterizerDiscardEnable 4417 set to ename:VK_FALSE, the pipeline must: define 4418 <<pipelines-graphics-subsets-fragment-output,fragment output interface 4419 state>> and <<pipelines-graphics-subsets-fragment-shader, fragment 4420 shader state>> or include those states in linked pipeline libraries 4421endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4422ifndef::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4423 * [[VUID-VkGraphicsPipelineCreateInfo-flags-08909]] 4424 If pname:flags does not include 4425 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, 4426 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4427 state>> is specified either in a library or by the inclusion of 4428 ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT, 4429 and that state either includes 4430 ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE or has 4431 pname:pRasterizationState->rasterizerDiscardEnable set to 4432 ename:VK_FALSE, the pipeline must: define 4433 <<pipelines-graphics-subsets-fragment-output,fragment output interface 4434 state>> and <<pipelines-graphics-subsets-fragment-shader, fragment 4435 shader state>> or include those states in linked pipeline libraries 4436endif::VK_EXT_extended_dynamic_state3,VK_VERSION_1_3[] 4437endif::VK_EXT_graphics_pipeline_library[] 4438 * [[VUID-VkGraphicsPipelineCreateInfo-None-09043]] 4439 If 4440ifdef::VK_EXT_extended_dynamic_state3[] 4441 pname:pDynamicState->pDynamicStates does not include 4442 ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT, and 4443endif::VK_EXT_extended_dynamic_state3[] 4444 the format of any color attachment is 4445 ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the pname:colorWriteMask member 4446 of the corresponding element of pname:pColorBlendState->pAttachments 4447 must: either include all of ename:VK_COLOR_COMPONENT_R_BIT, 4448 ename:VK_COLOR_COMPONENT_G_BIT, and ename:VK_COLOR_COMPONENT_B_BIT, or 4449 none of them 4450ifdef::VK_ANDROID_external_format_resolve[] 4451ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4452 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09301]] 4453 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4454 feature is enabled, the pipeline requires 4455 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4456 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4457 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, 4458 slink:VkPipelineRenderingCreateInfo::pname:viewMask must: be `0` 4459 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09304]] 4460 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4461 feature is enabled, the pipeline requires 4462 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4463 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, 4464 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and 4465 pname:rasterizationSamples is not dynamic, 4466 slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 4467 must: be `1` 4468 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09305]] 4469 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4470 feature is enabled, the pipeline requires 4471 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4472 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4473 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and 4474 pname:blendEnable is not dynamic, the pname:blendEnable member of each 4475 element of pname:pColorBlendState->pAttachments must: be ename:VK_FALSE 4476ifdef::VK_KHR_fragment_shading_rate[] 4477 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09306]] 4478 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4479 feature is enabled, the pipeline requires 4480 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4481 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4482 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and 4483 pname:pDynamicState->pDynamicStates does not include 4484 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, 4485 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:width must: 4486 be `1` 4487 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09307]] 4488 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4489 feature is enabled, the pipeline requires 4490 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4491 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4492 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, and 4493 pname:pDynamicState->pDynamicStates does not include 4494 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, 4495 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:height 4496 must: be `1` 4497 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09308]] 4498 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4499 feature is enabled, the pipeline requires 4500 <<pipelines-graphics-subsets-fragment-output, pre-rasterization shader 4501 state>> and <<pipelines-graphics-subsets-fragment-output, fragment 4502 output interface state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4503 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, the last 4504 <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization shader 4505 stage>> must: not statically use a variable with the 4506 code:PrimitiveShadingRateKHR built-in 4507endif::VK_KHR_fragment_shading_rate[] 4508 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09309]] 4509 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4510 feature is enabled, the pipeline requires 4511 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4512 state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4513 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, 4514 slink:VkPipelineRenderingCreateInfo::pname:colorAttachmentCount must: be 4515 `1` 4516 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09310]] 4517 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4518 feature is enabled, the pipeline requires 4519 <<pipelines-graphics-subsets-fragment-shader, fragment shader state>> 4520 and <<pipelines-graphics-subsets-fragment-output, fragment output 4521 interface state>>, pname:renderPass is dlink:VK_NULL_HANDLE, and 4522 slink:VkExternalFormatANDROID::pname:externalFormat is not `0`, the 4523 fragment shader must: not declare the code:DepthReplacing or 4524 code:StencilRefReplacingEXT execution modes 4525endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4526 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09313]] 4527 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4528 feature is enabled, the pipeline requires 4529 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4530 state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass 4531 includes an external format resolve attachment, and 4532 pname:rasterizationSamples is not dynamic, 4533 slink:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples 4534 must: be ename:VK_SAMPLE_COUNT_1_BIT 4535 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09314]] 4536 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4537 feature is enabled, the pipeline requires 4538 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4539 state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass 4540 includes an external format resolve attachment, and pname:blendEnable is 4541 not dynamic, the pname:blendEnable member of each element of 4542 pname:pColorBlendState->pAttachments must: be ename:VK_FALSE 4543ifdef::VK_KHR_fragment_shading_rate[] 4544 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09315]] 4545 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4546 feature is enabled, the pipeline requires 4547 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4548 state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass 4549 includes an external format resolve attachment, and 4550 pname:pDynamicState->pDynamicStates does not include 4551 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, 4552 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:width must: 4553 be `1` 4554 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09316]] 4555 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4556 feature is enabled, the pipeline requires 4557 <<pipelines-graphics-subsets-fragment-output, fragment output interface 4558 state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, pname:subpass 4559 includes an external format resolve attachment, and 4560 pname:pDynamicState->pDynamicStates does not include 4561 ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR, 4562 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR::pname:height 4563 must: be `1` 4564 * [[VUID-VkGraphicsPipelineCreateInfo-externalFormatResolve-09317]] 4565 If the <<features-externalFormatResolve, pname:externalFormatResolve>> 4566 feature is enabled, the pipeline requires 4567 <<pipelines-graphics-subsets-fragment-output, pre-rasterization shader 4568 state>> and <<pipelines-graphics-subsets-fragment-output, fragment 4569 output interface state>>, pname:renderPass is not dlink:VK_NULL_HANDLE, 4570 and pname:subpass includes an external format resolve attachment, the 4571 last <<pipelines-graphics-subsets-pre-rasterization, pre-rasterization 4572 shader stage>> must: not statically use a variable with the 4573 code:PrimitiveShadingRateKHR built-in 4574endif::VK_KHR_fragment_shading_rate[] 4575endif::VK_ANDROID_external_format_resolve[] 4576**** 4577ifdef::VKSC_VERSION_1_0[] 4578ifdef::hidden[] 4579// tag::scdeviation[] 4580 * slink:VkGraphicsPipelineCreateInfo::pname:basePipelineHandle must: be 4581 dlink:VK_NULL_HANDLE <<SCID-8>>. 4582 * slink:VkGraphicsPipelineCreateInfo::pname:basePipelineIndex must: be 4583 zero <<SCID-8>>. 4584// end::scdeviation[] 4585endif::hidden[] 4586endif::VKSC_VERSION_1_0[] 4587 4588include::{generated}/validity/structs/VkGraphicsPipelineCreateInfo.adoc[] 4589-- 4590 4591ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4592[open,refpage='VkPipelineRenderingCreateInfo',desc='Structure specifying attachment formats',type='structs',alias='VkPipelineRenderingCreateInfoKHR'] 4593-- 4594The sname:VkPipelineRenderingCreateInfo structure is defined as: 4595 4596include::{generated}/api/structs/VkPipelineRenderingCreateInfo.adoc[] 4597 4598ifdef::VK_KHR_dynamic_rendering[] 4599or the equivalent 4600 4601include::{generated}/api/structs/VkPipelineRenderingCreateInfoKHR.adoc[] 4602endif::VK_KHR_dynamic_rendering[] 4603 4604 * pname:sType is a elink:VkStructureType value identifying this structure. 4605 * pname:pNext is `NULL` or a pointer to a structure extending this 4606 structure. 4607 * pname:viewMask is the viewMask used for rendering. 4608 * pname:colorAttachmentCount is the number of entries in 4609 pname:pColorAttachmentFormats 4610 * pname:pColorAttachmentFormats is a pointer to an array of elink:VkFormat 4611 values defining the format of color attachments used in this pipeline. 4612 * pname:depthAttachmentFormat is a elink:VkFormat value defining the 4613 format of the depth attachment used in this pipeline. 4614 * pname:stencilAttachmentFormat is a elink:VkFormat value defining the 4615 format of the stencil attachment used in this pipeline. 4616 4617When a pipeline is created without a slink:VkRenderPass, if the pname:pNext 4618chain of slink:VkGraphicsPipelineCreateInfo includes this structure, it 4619specifies the view mask and format of attachments used for rendering. 4620If this structure is not specified, and the pipeline does not include a 4621slink:VkRenderPass, pname:viewMask and pname:colorAttachmentCount are `0`, 4622and pname:depthAttachmentFormat and pname:stencilAttachmentFormat are 4623ename:VK_FORMAT_UNDEFINED. 4624If a graphics pipeline is created with a valid slink:VkRenderPass, 4625parameters of this structure are ignored. 4626 4627If pname:depthAttachmentFormat, pname:stencilAttachmentFormat, or any 4628element of pname:pColorAttachmentFormats is ename:VK_FORMAT_UNDEFINED, it 4629indicates that the corresponding attachment is unused within the render 4630pass. 4631Valid formats indicate that an attachment can: be used - but it is still 4632valid to set the attachment to `NULL` when beginning rendering. 4633 4634ifdef::VK_ANDROID_external_format_resolve[] 4635If the render pass is going to be used with an external format resolve 4636attachment, a slink:VkExternalFormatANDROID structure must: also be included 4637in the pname:pNext chain of slink:VkGraphicsPipelineCreateInfo, defining the 4638external format of the resolve attachment that will be used. 4639endif::VK_ANDROID_external_format_resolve[] 4640 4641include::{generated}/validity/structs/VkPipelineRenderingCreateInfo.adoc[] 4642-- 4643endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4644 4645ifdef::VK_KHR_maintenance5[] 4646[open,refpage='VkPipelineCreateFlags2CreateInfoKHR',desc='Extended pipeline create flags',type='structs'] 4647-- 4648The sname:VkPipelineCreateFlags2CreateInfoKHR structure is defined as: 4649 4650include::{generated}/api/structs/VkPipelineCreateFlags2CreateInfoKHR.adoc[] 4651 4652 * pname:sType is a elink:VkStructureType value identifying this structure. 4653 * pname:pNext is `NULL` or a pointer to a structure extending this 4654 structure. 4655 * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits2KHR 4656 specifying how a pipeline will be generated. 4657 4658If this structure is included in the pname:pNext chain of a pipeline 4659creation structure, pname:flags is used instead of the corresponding 4660pname:flags value passed in that creation structure, allowing additional 4661creation flags to be specified. 4662 4663include::{generated}/validity/structs/VkPipelineCreateFlags2CreateInfoKHR.adoc[] 4664-- 4665 4666[open,refpage='VkPipelineCreateFlagBits2KHR',desc='Bitmask controlling how a pipeline is created',type='enums'] 4667-- 4668Bits which can: be set in 4669slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags, specifying how a 4670pipeline is created, are: 4671 4672include::{generated}/api/enums/VkPipelineCreateFlagBits2KHR.adoc[] 4673 4674// Note - when editing this section, make sure that any relevant changes 4675// are mirrored in VkPipelineCreateFlagBits2KHR/VkPipelineCreateFlagBits 4676 4677 * ename:VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR specifies that 4678 the created pipeline will not be optimized. 4679 Using this flag may: reduce the time taken to create the pipeline. 4680 * ename:VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR specifies that the 4681 pipeline to be created is allowed to be the parent of a pipeline that 4682 will be created in a subsequent pipeline creation call. 4683 * ename:VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR specifies that the 4684 pipeline to be created will be a child of a previously created parent 4685 pipeline. 4686ifdef::VK_VERSION_1_1,VK_KHR_device_group[] 4687ifdef::VK_VERSION_1_1,VK_KHR_multiview[] 4688 * ename:VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR 4689 specifies that any shader input variables decorated as code:ViewIndex 4690 will be assigned values as if they were decorated as code:DeviceIndex. 4691endif::VK_VERSION_1_1,VK_KHR_multiview[] 4692 * ename:VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR specifies that a 4693 compute pipeline can: be used with flink:vkCmdDispatchBase with a 4694 non-zero base workgroup. 4695endif::VK_VERSION_1_1,VK_KHR_device_group[] 4696ifdef::VK_NV_ray_tracing[] 4697 * ename:VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV specifies that a 4698 pipeline is created with all shaders in the deferred state. 4699 Before using the pipeline the application must: call 4700 flink:vkCompileDeferredNV exactly once on each shader in the pipeline 4701 before using the pipeline. 4702endif::VK_NV_ray_tracing[] 4703ifdef::VK_KHR_pipeline_executable_properties[] 4704 * ename:VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR specifies that the 4705 shader compiler should capture statistics for the pipeline executables 4706 produced by the compile process which can: later be retrieved by calling 4707 flink:vkGetPipelineExecutableStatisticsKHR. 4708 Enabling this flag must: not affect the final compiled pipeline but may: 4709 disable pipeline caching or otherwise affect pipeline creation time. 4710 * ename:VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 4711 specifies that the shader compiler should capture the internal 4712 representations of pipeline executables produced by the compile process 4713 which can: later be retrieved by calling 4714 flink:vkGetPipelineExecutableInternalRepresentationsKHR. 4715 Enabling this flag must: not affect the final compiled pipeline but may: 4716 disable pipeline caching or otherwise affect pipeline creation time. 4717ifdef::VK_KHR_pipeline_library[] 4718 When capturing IR from pipelines created with pipeline libraries, there 4719 is no guarantee that IR from libraries can: be retrieved from the linked 4720 pipeline. 4721 Applications should: retrieve IR from each library, and any linked 4722 pipelines, separately. 4723endif::VK_KHR_pipeline_library[] 4724endif::VK_KHR_pipeline_executable_properties[] 4725ifdef::VK_KHR_pipeline_library[] 4726 * ename:VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR specifies that the pipeline 4727 cannot: be used directly, and instead defines a _pipeline library_ that 4728 can: be combined with other pipelines using the 4729 slink:VkPipelineLibraryCreateInfoKHR structure. 4730ifdef::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[] 4731 This is available in 4732ifdef::VK_KHR_ray_tracing_pipeline[ray tracing] 4733ifdef::VK_KHR_ray_tracing_pipeline+VK_EXT_graphics_pipeline_library[and] 4734ifdef::VK_EXT_graphics_pipeline_library[graphics] 4735 pipelines. 4736endif::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[] 4737endif::VK_KHR_pipeline_library[] 4738ifdef::VK_KHR_ray_tracing_pipeline[] 4739 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR 4740 specifies that an any-hit shader will always be present when an any-hit 4741 shader would be executed. 4742 A NULL any-hit shader is an any-hit shader which is effectively 4743 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4744 entirely of zeros. 4745 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR 4746 specifies that a closest hit shader will always be present when a 4747 closest hit shader would be executed. 4748 A NULL closest hit shader is a closest hit shader which is effectively 4749 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4750 entirely of zeros. 4751 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR 4752 specifies that a miss shader will always be present when a miss shader 4753 would be executed. 4754 A NULL miss shader is a miss shader which is effectively 4755 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4756 entirely of zeros. 4757 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR 4758 specifies that an intersection shader will always be present when an 4759 intersection shader would be executed. 4760 A NULL intersection shader is an intersection shader which is 4761 effectively ename:VK_SHADER_UNUSED_KHR, such as from a shader group 4762 consisting entirely of zeros. 4763 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies 4764 that triangle primitives will be skipped during traversal using 4765 code:OpTraceRayKHR. 4766 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that 4767 AABB primitives will be skipped during traversal using 4768 code:OpTraceRayKHR. 4769 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 4770 specifies that the shader group handles can: be saved and reused on a 4771 subsequent run (e.g. for trace capture and replay). 4772endif::VK_KHR_ray_tracing_pipeline[] 4773ifdef::VK_NV_device_generated_commands[] 4774 * ename:VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV specifies that the 4775 pipeline can be used in combination with <<device-generated-commands>>. 4776endif::VK_NV_device_generated_commands[] 4777ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 4778 * ename:VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR 4779 specifies that pipeline creation will fail if a compile is required for 4780 creation of a valid slink:VkPipeline object; 4781 ename:VK_PIPELINE_COMPILE_REQUIRED will be returned by pipeline 4782 creation, and the slink:VkPipeline will be set to dlink:VK_NULL_HANDLE. 4783 * When creating multiple pipelines, 4784 ename:VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR specifies 4785 that control will be returned to the application if any individual 4786 pipeline returns a result which is not ename:VK_SUCCESS rather than 4787 continuing to create additional pipelines. 4788endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 4789ifdef::VK_NV_ray_tracing_motion_blur[] 4790 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies 4791 that the pipeline is allowed to use code:OpTraceRayMotionNV. 4792endif::VK_NV_ray_tracing_motion_blur[] 4793ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4794ifdef::VK_KHR_fragment_shading_rate[] 4795 * ename:VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR 4796 specifies that the pipeline will be used with a fragment shading rate 4797 attachment. 4798endif::VK_KHR_fragment_shading_rate[] 4799ifdef::VK_EXT_fragment_density_map[] 4800 * ename:VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT 4801 specifies that the pipeline will be used with a fragment density map 4802 attachment. 4803endif::VK_EXT_fragment_density_map[] 4804endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 4805ifdef::VK_EXT_graphics_pipeline_library[] 4806 * ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that 4807 pipeline libraries being linked into this library should: have link time 4808 optimizations applied. 4809 If this bit is omitted, implementations should: instead perform linking 4810 as rapidly as possible. 4811 * ename:VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT 4812 specifies that pipeline libraries should retain any information 4813 necessary to later perform an optimal link with 4814 ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT. 4815endif::VK_EXT_graphics_pipeline_library[] 4816ifdef::VK_EXT_descriptor_buffer[] 4817 * ename:VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT specifies that a 4818 pipeline will be used with <<descriptorbuffers,descriptor buffers>>, 4819 rather than <<descriptorsets,descriptor sets>>. 4820endif::VK_EXT_descriptor_buffer[] 4821ifdef::VK_EXT_attachment_feedback_loop_layout[] 4822 * ename:VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 4823 specifies that the pipeline may: be used with an attachment feedback 4824 loop including color attachments. 4825 * ename:VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 4826 specifies that the pipeline may: be used with an attachment feedback 4827 loop including depth-stencil attachments. 4828endif::VK_EXT_attachment_feedback_loop_layout[] 4829ifdef::VK_EXT_opacity_micromap[] 4830 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT 4831 specifies that the pipeline can: be used with acceleration structures 4832 which reference an opacity micromap array. 4833endif::VK_EXT_opacity_micromap[] 4834ifdef::VK_NV_displacement_micromap[] 4835 * ename:VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 4836 specifies that the pipeline can: be used with aceleration structures 4837 which reference a displacement micromap array. 4838endif::VK_NV_displacement_micromap[] 4839ifdef::VK_EXT_pipeline_protected_access[] 4840 * ename:VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT specifies that 4841 the pipeline must: not be bound to a protected command buffer. 4842 * ename:VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT specifies that 4843 the pipeline must: not be bound to an unprotected command buffer. 4844endif::VK_EXT_pipeline_protected_access[] 4845 4846It is valid to set both ename:VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR 4847and ename:VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR. 4848This allows a pipeline to be both a parent and possibly a child in a 4849pipeline hierarchy. 4850See <<pipelines-pipeline-derivatives,Pipeline Derivatives>> for more 4851information. 4852 4853ifdef::VK_EXT_graphics_pipeline_library[] 4854When an implementation is looking up a pipeline in a 4855<<pipelines-cache,pipeline cache>>, if that pipeline is being created using 4856linked libraries, implementations should: always return an equivalent 4857pipeline created with 4858ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT if available, 4859whether or not that bit was specified. 4860 4861[NOTE] 4862.Note 4863==== 4864Using ename:VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT (or not) 4865when linking pipeline libraries is intended as a performance tradeoff 4866between host and device. 4867If the bit is omitted, linking should be faster and produce a pipeline more 4868rapidly, but performance of the pipeline on the target device may be 4869reduced. 4870If the bit is included, linking may be slower but should produce a pipeline 4871with device performance comparable to a monolithically created pipeline. 4872Using both options can allow latency-sensitive applications to generate a 4873suboptimal but usable pipeline quickly, and then perform an optimal link in 4874the background, substituting the result for the suboptimally linked pipeline 4875as soon as it is available. 4876==== 4877endif::VK_EXT_graphics_pipeline_library[] 4878-- 4879 4880[open,refpage='VkPipelineCreateFlags2KHR',desc='Bitmask of VkPipelineCreateFlagBits2KHR',type='flags'] 4881-- 4882include::{generated}/api/flags/VkPipelineCreateFlags2KHR.adoc[] 4883 4884tname:VkPipelineCreateFlags2KHR is a bitmask type for setting a mask of zero 4885or more elink:VkPipelineCreateFlagBits2KHR. 4886-- 4887endif::VK_KHR_maintenance5[] 4888 4889[open,refpage='VkPipelineCreateFlagBits',desc='Bitmask controlling how a pipeline is created',type='enums'] 4890-- 4891Bits which can: be set in 4892 4893 * slink:VkGraphicsPipelineCreateInfo::pname:flags 4894 * slink:VkComputePipelineCreateInfo::pname:flags 4895ifdef::VK_KHR_ray_tracing_pipeline[] 4896 * slink:VkRayTracingPipelineCreateInfoKHR::pname:flags 4897endif::VK_KHR_ray_tracing_pipeline[] 4898ifdef::VK_NV_ray_tracing[] 4899 * slink:VkRayTracingPipelineCreateInfoNV::pname:flags 4900endif::VK_NV_ray_tracing[] 4901 4902specify how a pipeline is created, and are: 4903 4904include::{generated}/api/enums/VkPipelineCreateFlagBits.adoc[] 4905 4906// Note - when editing this section, make sure that any relevant changes 4907// are mirrored in VkPipelineCreateFlagBits2KHR/VkPipelineCreateFlagBits 4908 4909 * ename:VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT specifies that the 4910 created pipeline will not be optimized. 4911 Using this flag may: reduce the time taken to create the pipeline. 4912ifndef::VKSC_VERSION_1_0[] 4913 * ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT specifies that the 4914 pipeline to be created is allowed to be the parent of a pipeline that 4915 will be created in a subsequent pipeline creation call. 4916 * ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT specifies that the pipeline to 4917 be created will be a child of a previously created parent pipeline. 4918endif::VKSC_VERSION_1_0[] 4919ifdef::VKSC_VERSION_1_0[] 4920ifdef::hidden[] 4921// tag::scremoved[] 4922 * elink:VkPipelineCreateFlagBits 4923 ** ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT <<SCID-8>> 4924 ** ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT <<SCID-8>> 4925// end::scremoved[] 4926endif::hidden[] 4927endif::VKSC_VERSION_1_0[] 4928ifdef::VK_VERSION_1_1,VK_KHR_device_group[] 4929ifdef::VK_VERSION_1_1,VK_KHR_multiview[] 4930 * ename:VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT specifies that 4931 any shader input variables decorated as code:ViewIndex will be assigned 4932 values as if they were decorated as code:DeviceIndex. 4933endif::VK_VERSION_1_1,VK_KHR_multiview[] 4934 * ename:VK_PIPELINE_CREATE_DISPATCH_BASE specifies that a compute pipeline 4935 can: be used with flink:vkCmdDispatchBase with a non-zero base 4936 workgroup. 4937endif::VK_VERSION_1_1,VK_KHR_device_group[] 4938ifdef::VK_NV_ray_tracing[] 4939 * ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV specifies that a pipeline 4940 is created with all shaders in the deferred state. 4941 Before using the pipeline the application must: call 4942 flink:vkCompileDeferredNV exactly once on each shader in the pipeline 4943 before using the pipeline. 4944endif::VK_NV_ray_tracing[] 4945ifdef::VK_KHR_pipeline_executable_properties[] 4946 * ename:VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR specifies that the 4947 shader compiler should capture statistics for the pipeline executables 4948 produced by the compile process which can: later be retrieved by calling 4949 flink:vkGetPipelineExecutableStatisticsKHR. 4950 Enabling this flag must: not affect the final compiled pipeline but may: 4951 disable pipeline caching or otherwise affect pipeline creation time. 4952 * ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 4953 specifies that the shader compiler should capture the internal 4954 representations of pipeline executables produced by the compile process 4955 which can: later be retrieved by calling 4956 flink:vkGetPipelineExecutableInternalRepresentationsKHR. 4957 Enabling this flag must: not affect the final compiled pipeline but may: 4958 disable pipeline caching or otherwise affect pipeline creation time. 4959ifdef::VK_KHR_pipeline_library[] 4960 When capturing IR from pipelines created with pipeline libraries, there 4961 is no guarantee that IR from libraries can: be retrieved from the linked 4962 pipeline. 4963 Applications should: retrieve IR from each library, and any linked 4964 pipelines, separately. 4965endif::VK_KHR_pipeline_library[] 4966endif::VK_KHR_pipeline_executable_properties[] 4967ifdef::VK_KHR_pipeline_library[] 4968 * ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR specifies that the pipeline 4969 cannot: be used directly, and instead defines a _pipeline library_ that 4970 can: be combined with other pipelines using the 4971 slink:VkPipelineLibraryCreateInfoKHR structure. 4972ifdef::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[] 4973 This is available in 4974ifdef::VK_KHR_ray_tracing_pipeline[ray tracing] 4975ifdef::VK_KHR_ray_tracing_pipeline+VK_EXT_graphics_pipeline_library[and] 4976ifdef::VK_EXT_graphics_pipeline_library[graphics] 4977 pipelines. 4978endif::VK_KHR_ray_tracing_pipeline,VK_EXT_graphics_pipeline_library[] 4979endif::VK_KHR_pipeline_library[] 4980ifdef::VK_KHR_ray_tracing_pipeline[] 4981 * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR 4982 specifies that an any-hit shader will always be present when an any-hit 4983 shader would be executed. 4984 A NULL any-hit shader is an any-hit shader which is effectively 4985 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4986 entirely of zeros. 4987 * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR 4988 specifies that a closest hit shader will always be present when a 4989 closest hit shader would be executed. 4990 A NULL closest hit shader is a closest hit shader which is effectively 4991 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4992 entirely of zeros. 4993 * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR 4994 specifies that a miss shader will always be present when a miss shader 4995 would be executed. 4996 A NULL miss shader is a miss shader which is effectively 4997 ename:VK_SHADER_UNUSED_KHR, such as from a shader group consisting 4998 entirely of zeros. 4999 * ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR 5000 specifies that an intersection shader will always be present when an 5001 intersection shader would be executed. 5002 A NULL intersection shader is an intersection shader which is 5003 effectively ename:VK_SHADER_UNUSED_KHR, such as from a shader group 5004 consisting entirely of zeros. 5005 * ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR specifies 5006 that triangle primitives will be skipped during traversal using 5007 code:OpTraceRayKHR. 5008 * ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR specifies that 5009 AABB primitives will be skipped during traversal using 5010 code:OpTraceRayKHR. 5011 * ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 5012 specifies that the shader group handles can: be saved and reused on a 5013 subsequent run (e.g. for trace capture and replay). 5014endif::VK_KHR_ray_tracing_pipeline[] 5015ifdef::VK_NV_device_generated_commands[] 5016 * ename:VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV specifies that the 5017 pipeline can be used in combination with <<device-generated-commands>>. 5018endif::VK_NV_device_generated_commands[] 5019ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 5020 * ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT specifies 5021 that pipeline creation will fail if a compile is required for creation 5022 of a valid slink:VkPipeline object; ename:VK_PIPELINE_COMPILE_REQUIRED 5023 will be returned by pipeline creation, and the slink:VkPipeline will be 5024 set to dlink:VK_NULL_HANDLE. 5025 * When creating multiple pipelines, 5026 ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT specifies that 5027 control will be returned to the application if any individual pipeline 5028 returns a result which is not ename:VK_SUCCESS rather than continuing to 5029 create additional pipelines. 5030endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 5031ifdef::VK_NV_ray_tracing_motion_blur[] 5032 * ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV specifies that 5033 the pipeline is allowed to use code:OpTraceRayMotionNV. 5034endif::VK_NV_ray_tracing_motion_blur[] 5035ifdef::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 5036ifdef::VK_KHR_fragment_shading_rate[] 5037 * ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR 5038 specifies that the pipeline will be used with a fragment shading rate 5039 attachment and dynamic rendering. 5040endif::VK_KHR_fragment_shading_rate[] 5041ifdef::VK_EXT_fragment_density_map[] 5042 * ename:VK_PIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT 5043 specifies that the pipeline will be used with a fragment density map 5044 attachment and dynamic rendering. 5045endif::VK_EXT_fragment_density_map[] 5046endif::VK_VERSION_1_3,VK_KHR_dynamic_rendering[] 5047ifdef::VK_EXT_graphics_pipeline_library[] 5048 * ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT specifies that 5049 pipeline libraries being linked into this library should: have link time 5050 optimizations applied. 5051 If this bit is omitted, implementations should: instead perform linking 5052 as rapidly as possible. 5053 * ename:VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT 5054 specifies that pipeline libraries should retain any information 5055 necessary to later perform an optimal link with 5056 ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT. 5057endif::VK_EXT_graphics_pipeline_library[] 5058ifdef::VK_EXT_descriptor_buffer[] 5059 * ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT specifies that a 5060 pipeline will be used with <<descriptorbuffers,descriptor buffers>>, 5061 rather than <<descriptorsets,descriptor sets>>. 5062endif::VK_EXT_descriptor_buffer[] 5063ifdef::VK_EXT_attachment_feedback_loop_layout[] 5064 * ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 5065 specifies that the pipeline may: be used with an attachment feedback 5066 loop including color attachments. 5067ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[] 5068 It is ignored if 5069 ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in 5070 pname:pDynamicStates. 5071endif::VK_EXT_attachment_feedback_loop_dynamic_state[] 5072 * ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 5073 specifies that the pipeline may: be used with an attachment feedback 5074 loop including depth-stencil attachments. 5075ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[] 5076 It is ignored if 5077 ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT is set in 5078 pname:pDynamicStates. 5079endif::VK_EXT_attachment_feedback_loop_dynamic_state[] 5080endif::VK_EXT_attachment_feedback_loop_layout[] 5081ifdef::VK_EXT_opacity_micromap[] 5082 * ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT specifies 5083 that the pipeline can: be used with acceleration structures which 5084 reference an opacity micromap array. 5085endif::VK_EXT_opacity_micromap[] 5086ifdef::VK_NV_displacement_micromap[] 5087 * ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 5088 specifies that the pipeline can: be used with aceleration structures 5089 which reference a displacement micromap array. 5090endif::VK_NV_displacement_micromap[] 5091ifdef::VK_EXT_pipeline_protected_access[] 5092 * ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT specifies that the 5093 pipeline must: not be bound to a protected command buffer. 5094 * ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT specifies that 5095 the pipeline must: not be bound to an unprotected command buffer. 5096endif::VK_EXT_pipeline_protected_access[] 5097 5098ifndef::VKSC_VERSION_1_0[] 5099It is valid to set both ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and 5100ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT. 5101This allows a pipeline to be both a parent and possibly a child in a 5102pipeline hierarchy. 5103See <<pipelines-pipeline-derivatives,Pipeline Derivatives>> for more 5104information. 5105endif::VKSC_VERSION_1_0[] 5106 5107ifdef::VK_EXT_graphics_pipeline_library[] 5108When an implementation is looking up a pipeline in a 5109<<pipelines-cache,pipeline cache>>, if that pipeline is being created using 5110linked libraries, implementations should: always return an equivalent 5111pipeline created with 5112ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT if available, 5113whether or not that bit was specified. 5114 5115[NOTE] 5116.Note 5117==== 5118Using ename:VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT (or not) when 5119linking pipeline libraries is intended as a performance tradeoff between 5120host and device. 5121If the bit is omitted, linking should be faster and produce a pipeline more 5122rapidly, but performance of the pipeline on the target device may be 5123reduced. 5124If the bit is included, linking may be slower but should produce a pipeline 5125with device performance comparable to a monolithically created pipeline. 5126Using both options can allow latency-sensitive applications to generate a 5127suboptimal but usable pipeline quickly, and then perform an optimal link in 5128the background, substituting the result for the suboptimally linked pipeline 5129as soon as it is available. 5130==== 5131endif::VK_EXT_graphics_pipeline_library[] 5132-- 5133 5134[open,refpage='VkPipelineCreateFlags',desc='Bitmask of VkPipelineCreateFlagBits',type='flags'] 5135-- 5136include::{generated}/api/flags/VkPipelineCreateFlags.adoc[] 5137 5138tname:VkPipelineCreateFlags is a bitmask type for setting a mask of zero or 5139more elink:VkPipelineCreateFlagBits. 5140-- 5141 5142ifdef::VK_EXT_graphics_pipeline_library[] 5143[open,refpage='VkGraphicsPipelineLibraryCreateInfoEXT',desc='Structure specifying the subsets of the graphics pipeline being compiled',type='structs'] 5144-- 5145The sname:VkGraphicsPipelineLibraryCreateInfoEXT structure is defined as: 5146 5147include::{generated}/api/structs/VkGraphicsPipelineLibraryCreateInfoEXT.adoc[] 5148 5149 * pname:sType is a elink:VkStructureType value identifying this structure. 5150 * pname:pNext is `NULL` or a pointer to a structure extending this 5151 structure. 5152 * pname:flags is a bitmask of elink:VkGraphicsPipelineLibraryFlagBitsEXT 5153 specifying the subsets of the graphics pipeline that are being compiled. 5154 5155If a sname:VkGraphicsPipelineLibraryCreateInfoEXT structure is included in 5156the pname:pNext chain of slink:VkGraphicsPipelineCreateInfo, it specifies 5157the <<pipelines-graphics-subsets,subsets of the graphics pipeline>> being 5158created, excluding any subsets from linked pipeline libraries. 5159If the pipeline is created with pipeline libraries, state from those 5160libraries is aggregated with said subset. 5161 5162If this structure is omitted, and either 5163slink:VkGraphicsPipelineCreateInfo::pname:flags includes 5164ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR or the 5165slink:VkGraphicsPipelineCreateInfo::pname:pNext chain includes a 5166slink:VkPipelineLibraryCreateInfoKHR structure with a pname:libraryCount 5167greater than `0`, it is as if pname:flags is `0`. 5168Otherwise if this structure is omitted, it is as if pname:flags includes all 5169possible subsets of the graphics pipeline (i.e. a 5170<<pipelines-graphics-subsets-complete,complete graphics pipeline>>). 5171 5172include::{generated}/validity/structs/VkGraphicsPipelineLibraryCreateInfoEXT.adoc[] 5173-- 5174 5175[open,refpage='VkGraphicsPipelineLibraryFlagsEXT', desc='Bitmask of VkGraphicsPipelineLibraryFlagBitsEXT', type='flags'] 5176-- 5177include::{generated}/api/flags/VkGraphicsPipelineLibraryFlagsEXT.adoc[] 5178 5179tname:VkGraphicsPipelineLibraryFlagsEXT is a bitmask type for setting a mask 5180of zero or more elink:VkGraphicsPipelineLibraryFlagBitsEXT. 5181-- 5182 5183[open,refpage='VkGraphicsPipelineLibraryFlagBitsEXT',desc='Bitmask specifying the subset of a graphics pipeline to compile',type='enums'] 5184-- 5185Possible values of the pname:flags member of 5186slink:VkGraphicsPipelineLibraryCreateInfoEXT, specifying the subsets of a 5187graphics pipeline to compile are: 5188 5189include::{generated}/api/enums/VkGraphicsPipelineLibraryFlagBitsEXT.adoc[] 5190 5191 * ename:VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT 5192 specifies that a pipeline will include 5193 <<pipelines-graphics-subsets-vertex-input,vertex input interface 5194 state>>. 5195 * ename:VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT 5196 specifies that a pipeline will include 5197 <<pipelines-graphics-subsets-pre-rasterization,pre-rasterization shader 5198 state>>. 5199 * ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT specifies 5200 that a pipeline will include 5201 <<pipelines-graphics-subsets-fragment-shader,fragment shader state>>. 5202 * ename:VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT 5203 specifies that a pipeline will include 5204 <<pipelines-graphics-subsets-fragment-output,fragment output interface 5205 state>>. 5206-- 5207endif::VK_EXT_graphics_pipeline_library[] 5208 5209[open,refpage='VkPipelineDynamicStateCreateInfo',desc='Structure specifying parameters of a newly created pipeline dynamic state',type='structs'] 5210-- 5211The sname:VkPipelineDynamicStateCreateInfo structure is defined as: 5212 5213include::{generated}/api/structs/VkPipelineDynamicStateCreateInfo.adoc[] 5214 5215 * pname:sType is a elink:VkStructureType value identifying this structure. 5216 * pname:pNext is `NULL` or a pointer to a structure extending this 5217 structure. 5218 * pname:flags is reserved for future use. 5219 * pname:dynamicStateCount is the number of elements in the 5220 pname:pDynamicStates array. 5221 * pname:pDynamicStates is a pointer to an array of elink:VkDynamicState 5222 values specifying which pieces of pipeline state will use the values 5223 from dynamic state commands rather than from pipeline state creation 5224 information. 5225 5226.Valid Usage 5227**** 5228 * [[VUID-VkPipelineDynamicStateCreateInfo-pDynamicStates-01442]] 5229 Each element of pname:pDynamicStates must: be unique 5230**** 5231 5232include::{generated}/validity/structs/VkPipelineDynamicStateCreateInfo.adoc[] 5233-- 5234 5235[open,refpage='VkPipelineDynamicStateCreateFlags',desc='Reserved for future use',type='flags'] 5236-- 5237include::{generated}/api/flags/VkPipelineDynamicStateCreateFlags.adoc[] 5238 5239tname:VkPipelineDynamicStateCreateFlags is a bitmask type for setting a 5240mask, but is currently reserved for future use. 5241-- 5242 5243[open,refpage='VkDynamicState',desc='Indicate which dynamic state is taken from dynamic state commands',type='enums'] 5244-- 5245The source of different pieces of dynamic state is specified by the 5246slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates property of the 5247currently active pipeline, each of whose elements must: be one of the 5248values: 5249 5250include::{generated}/api/enums/VkDynamicState.adoc[] 5251 5252 * ename:VK_DYNAMIC_STATE_VIEWPORT specifies that the pname:pViewports 5253 state in slink:VkPipelineViewportStateCreateInfo will be ignored and 5254 must: be set dynamically with flink:vkCmdSetViewport before any drawing 5255 commands. 5256 The number of viewports used by a pipeline is still specified by the 5257 pname:viewportCount member of slink:VkPipelineViewportStateCreateInfo. 5258 * ename:VK_DYNAMIC_STATE_SCISSOR specifies that the pname:pScissors state 5259 in slink:VkPipelineViewportStateCreateInfo will be ignored and must: be 5260 set dynamically with flink:vkCmdSetScissor before any drawing commands. 5261 The number of scissor rectangles used by a pipeline is still specified 5262 by the pname:scissorCount member of 5263 slink:VkPipelineViewportStateCreateInfo. 5264 * ename:VK_DYNAMIC_STATE_LINE_WIDTH specifies that the pname:lineWidth 5265 state in slink:VkPipelineRasterizationStateCreateInfo will be ignored 5266 and must: be set dynamically with flink:vkCmdSetLineWidth before any 5267 drawing commands that generate line primitives for the rasterizer. 5268ifdef::VK_EXT_depth_bias_control[] 5269 * ename:VK_DYNAMIC_STATE_DEPTH_BIAS specifies that any instance of 5270 slink:VkDepthBiasRepresentationInfoEXT included in the pname:pNext chain 5271 of slink:VkPipelineRasterizationStateCreateInfo as well as the 5272 pname:depthBiasConstantFactor, pname:depthBiasClamp and 5273 pname:depthBiasSlopeFactor states in 5274 slink:VkPipelineRasterizationStateCreateInfo will be ignored and must: 5275 be set dynamically with either flink:vkCmdSetDepthBias or 5276 flink:vkCmdSetDepthBias2EXT before any draws are performed with 5277 <<primsrast-depthbias-enable, depth bias enabled>>. 5278endif::VK_EXT_depth_bias_control[] 5279ifndef::VK_EXT_depth_bias_control[] 5280 * ename:VK_DYNAMIC_STATE_DEPTH_BIAS specifies that the 5281 pname:depthBiasConstantFactor, pname:depthBiasClamp and 5282 pname:depthBiasSlopeFactor states in 5283 slink:VkPipelineRasterizationStateCreateInfo will be ignored and must: 5284 be set dynamically with flink:vkCmdSetDepthBias before any draws are 5285 performed with <<primsrast-depthbias-enable, depth bias enabled>>. 5286endif::VK_EXT_depth_bias_control[] 5287 * ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS specifies that the 5288 pname:blendConstants state in slink:VkPipelineColorBlendStateCreateInfo 5289 will be ignored and must: be set dynamically with 5290 flink:vkCmdSetBlendConstants before any draws are performed with a 5291 pipeline state with sname:VkPipelineColorBlendAttachmentState member 5292 pname:blendEnable set to ename:VK_TRUE and any of the blend functions 5293 using a constant blend color. 5294 * ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS specifies that the 5295 pname:minDepthBounds and pname:maxDepthBounds states of 5296 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5297 set dynamically with flink:vkCmdSetDepthBounds before any draws are 5298 performed with a pipeline state with 5299 slink:VkPipelineDepthStencilStateCreateInfo member 5300 pname:depthBoundsTestEnable set to ename:VK_TRUE. 5301 * ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK specifies that the 5302 pname:compareMask state in slink:VkPipelineDepthStencilStateCreateInfo 5303 for both pname:front and pname:back will be ignored and must: be set 5304 dynamically with flink:vkCmdSetStencilCompareMask before any draws are 5305 performed with a pipeline state with 5306 slink:VkPipelineDepthStencilStateCreateInfo member 5307 pname:stencilTestEnable set to ename:VK_TRUE 5308 * ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK specifies that the 5309 pname:writeMask state in slink:VkPipelineDepthStencilStateCreateInfo for 5310 both pname:front and pname:back will be ignored and must: be set 5311 dynamically with flink:vkCmdSetStencilWriteMask before any draws are 5312 performed with a pipeline state with 5313 slink:VkPipelineDepthStencilStateCreateInfo member 5314 pname:stencilTestEnable set to ename:VK_TRUE 5315 * ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE specifies that the 5316 pname:reference state in slink:VkPipelineDepthStencilStateCreateInfo for 5317 both pname:front and pname:back will be ignored and must: be set 5318 dynamically with flink:vkCmdSetStencilReference before any draws are 5319 performed with a pipeline state with 5320 slink:VkPipelineDepthStencilStateCreateInfo member 5321 pname:stencilTestEnable set to ename:VK_TRUE 5322ifdef::VK_NV_clip_space_w_scaling[] 5323 * ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV specifies that the 5324 pname:pViewportWScalings state in 5325 slink:VkPipelineViewportWScalingStateCreateInfoNV will be ignored and 5326 must: be set dynamically with flink:vkCmdSetViewportWScalingNV before 5327 any draws are performed with a pipeline state with 5328 slink:VkPipelineViewportWScalingStateCreateInfoNV member 5329 pname:viewportScalingEnable set to ename:VK_TRUE 5330endif::VK_NV_clip_space_w_scaling[] 5331ifdef::VK_EXT_discard_rectangles[] 5332 * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT specifies that the 5333 pname:pDiscardRectangles state in 5334 slink:VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and 5335 must: be set dynamically with flink:vkCmdSetDiscardRectangleEXT before 5336 any draw or clear commands. 5337 * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT specifies that the 5338 presence of the slink:VkPipelineDiscardRectangleStateCreateInfoEXT 5339 structure in the slink:VkGraphicsPipelineCreateInfo chain with a 5340 pname:discardRectangleCount greater than zero does not implicitly enable 5341 discard rectangles and they must: be enabled dynamically with 5342 flink:vkCmdSetDiscardRectangleEnableEXT before any draw commands. 5343 This is available on implementations that support at least 5344 pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles` 5345 extension. 5346 * ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT specifies that the 5347 pname:discardRectangleMode state in 5348 slink:VkPipelineDiscardRectangleStateCreateInfoEXT will be ignored and 5349 must: be set dynamically with flink:vkCmdSetDiscardRectangleModeEXT 5350 before any draw commands. 5351 This is available on implementations that support at least 5352 pname:specVersion `2` of the `apiext:VK_EXT_discard_rectangles` 5353 extension. 5354endif::VK_EXT_discard_rectangles[] 5355ifdef::VK_EXT_sample_locations[] 5356 * ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT specifies that the 5357 pname:sampleLocationsInfo state in 5358 slink:VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and 5359 must: be set dynamically with flink:vkCmdSetSampleLocationsEXT before 5360 any draw or clear commands. 5361 Enabling custom sample locations is still indicated by the 5362 pname:sampleLocationsEnable member of 5363 slink:VkPipelineSampleLocationsStateCreateInfoEXT. 5364endif::VK_EXT_sample_locations[] 5365ifdef::VK_NV_scissor_exclusive[] 5366 * ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV specifies that the 5367 pname:pExclusiveScissors state in 5368 slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV will be 5369 ignored and must: be set dynamically with 5370 flink:vkCmdSetExclusiveScissorNV before any drawing commands. 5371 * ename:VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV specifies that the 5372 the exclusive scissors must: be explicitly enabled with 5373 flink:vkCmdSetExclusiveScissorEnableNV and the 5374 pname:exclusiveScissorCount value in 5375 slink:VkPipelineViewportExclusiveScissorStateCreateInfoNV will not 5376 implicitly enable them. 5377 This is available on implementations that support at least 5378 pname:specVersion `2` of the `apiext:VK_NV_scissor_exclusive` extension. 5379endif::VK_NV_scissor_exclusive[] 5380ifdef::VK_NV_shading_rate_image[] 5381 * ename:VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV specifies that 5382 the pname:pShadingRatePalettes state in 5383 slink:VkPipelineViewportShadingRateImageStateCreateInfoNV will be 5384 ignored and must: be set dynamically with 5385 flink:vkCmdSetViewportShadingRatePaletteNV before any drawing commands. 5386 * ename:VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV specifies that 5387 the coarse sample order state in 5388 slink:VkPipelineViewportCoarseSampleOrderStateCreateInfoNV will be 5389 ignored and must: be set dynamically with 5390 flink:vkCmdSetCoarseSampleOrderNV before any drawing commands. 5391endif::VK_NV_shading_rate_image[] 5392ifdef::VK_EXT_line_rasterization[] 5393 * ename:VK_DYNAMIC_STATE_LINE_STIPPLE_EXT specifies that the 5394 pname:lineStippleFactor and pname:lineStipplePattern state in 5395 slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and 5396 must: be set dynamically with flink:vkCmdSetLineStippleEXT before any 5397 draws are performed with a pipeline state with 5398 slink:VkPipelineRasterizationLineStateCreateInfoEXT member 5399 pname:stippledLineEnable set to ename:VK_TRUE. 5400endif::VK_EXT_line_rasterization[] 5401ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 5402 * ename:VK_DYNAMIC_STATE_CULL_MODE specifies that the pname:cullMode state 5403 in slink:VkPipelineRasterizationStateCreateInfo will be ignored and 5404 must: be set dynamically with flink:vkCmdSetCullMode before any drawing 5405 commands. 5406 * ename:VK_DYNAMIC_STATE_FRONT_FACE specifies that the pname:frontFace 5407 state in slink:VkPipelineRasterizationStateCreateInfo will be ignored 5408 and must: be set dynamically with flink:vkCmdSetFrontFace before any 5409 drawing commands. 5410 * ename:VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY specifies that the 5411 pname:topology state in slink:VkPipelineInputAssemblyStateCreateInfo 5412 only specifies the <<drawing-primitive-topology-class, topology class>>, 5413 and the specific topology order and adjacency must: be set dynamically 5414 with flink:vkCmdSetPrimitiveTopology before any drawing commands. 5415 * ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT specifies that the 5416 pname:viewportCount and pname:pViewports state in 5417 slink:VkPipelineViewportStateCreateInfo will be ignored and must: be set 5418 dynamically with flink:vkCmdSetViewportWithCount before any draw call. 5419 * ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT specifies that the 5420 pname:scissorCount and pname:pScissors state in 5421 slink:VkPipelineViewportStateCreateInfo will be ignored and must: be set 5422 dynamically with flink:vkCmdSetScissorWithCount before any draw call. 5423 * ename:VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE specifies that the 5424 pname:stride state in slink:VkVertexInputBindingDescription will be 5425 ignored and must: be set dynamically with flink:vkCmdBindVertexBuffers2 5426 before any draw call. 5427 * ename:VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE specifies that the 5428 pname:depthTestEnable state in 5429 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5430 set dynamically with flink:vkCmdSetDepthTestEnable before any draw call. 5431 * ename:VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE specifies that the 5432 pname:depthWriteEnable state in 5433 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5434 set dynamically with flink:vkCmdSetDepthWriteEnable before any draw 5435 call. 5436 * ename:VK_DYNAMIC_STATE_DEPTH_COMPARE_OP specifies that the 5437 pname:depthCompareOp state in 5438 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5439 set dynamically with flink:vkCmdSetDepthCompareOp before any draw call. 5440 * ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE specifies that the 5441 pname:depthBoundsTestEnable state in 5442 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5443 set dynamically with flink:vkCmdSetDepthBoundsTestEnable before any draw 5444 call. 5445 * ename:VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE specifies that the 5446 pname:stencilTestEnable state in 5447 slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: be 5448 set dynamically with flink:vkCmdSetStencilTestEnable before any draw 5449 call. 5450 * ename:VK_DYNAMIC_STATE_STENCIL_OP specifies that the pname:failOp, 5451 pname:passOp, pname:depthFailOp, and pname:compareOp states in 5452 sname:VkPipelineDepthStencilStateCreateInfo for both pname:front and 5453 pname:back will be ignored and must: be set dynamically with 5454 flink:vkCmdSetStencilOp before any draws are performed with a pipeline 5455 state with sname:VkPipelineDepthStencilStateCreateInfo member 5456 pname:stencilTestEnable set to ename:VK_TRUE 5457endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state[] 5458ifdef::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 5459ifdef::VK_EXT_extended_dynamic_state2[] 5460 * ename:VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT specifies that the 5461 pname:patchControlPoints state in 5462 slink:VkPipelineTessellationStateCreateInfo will be ignored and must: be 5463 set dynamically with flink:vkCmdSetPatchControlPointsEXT before any 5464 drawing commands. 5465endif::VK_EXT_extended_dynamic_state2[] 5466 * ename:VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE specifies that the 5467 pname:rasterizerDiscardEnable state in 5468 slink:VkPipelineRasterizationStateCreateInfo will be ignored and must: 5469 be set dynamically with flink:vkCmdSetRasterizerDiscardEnable before any 5470 drawing commands. 5471 * ename:VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE specifies that the 5472 pname:depthBiasEnable state in 5473 slink:VkPipelineRasterizationStateCreateInfo will be ignored and must: 5474 be set dynamically with flink:vkCmdSetDepthBiasEnable before any drawing 5475 commands. 5476ifdef::VK_EXT_extended_dynamic_state2[] 5477 * ename:VK_DYNAMIC_STATE_LOGIC_OP_EXT specifies that the pname:logicOp 5478 state in slink:VkPipelineColorBlendStateCreateInfo will be ignored and 5479 must: be set dynamically with flink:vkCmdSetLogicOpEXT before any 5480 drawing commands. 5481endif::VK_EXT_extended_dynamic_state2[] 5482 * ename:VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE specifies that the 5483 pname:primitiveRestartEnable state in 5484 slink:VkPipelineInputAssemblyStateCreateInfo will be ignored and must: 5485 be set dynamically with flink:vkCmdSetPrimitiveRestartEnable before any 5486 drawing commands. 5487endif::VK_VERSION_1_3,VK_EXT_extended_dynamic_state2[] 5488ifdef::VK_KHR_fragment_shading_rate[] 5489 * ename:VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR specifies that state in 5490 slink:VkPipelineFragmentShadingRateStateCreateInfoKHR 5491ifdef::VK_NV_fragment_shading_rate_enums[] 5492 and slink:VkPipelineFragmentShadingRateEnumStateCreateInfoNV 5493endif::VK_NV_fragment_shading_rate_enums[] 5494 will be ignored and must: be set dynamically with 5495 flink:vkCmdSetFragmentShadingRateKHR 5496ifdef::VK_NV_fragment_shading_rate_enums[] 5497 or flink:vkCmdSetFragmentShadingRateEnumNV 5498endif::VK_NV_fragment_shading_rate_enums[] 5499 before any drawing commands. 5500endif::VK_KHR_fragment_shading_rate[] 5501ifdef::VK_KHR_ray_tracing_pipeline[] 5502 * ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR specifies 5503 that the default stack size computation for the pipeline will be ignored 5504 and must: be set dynamically with 5505 flink:vkCmdSetRayTracingPipelineStackSizeKHR before any ray tracing 5506 calls are performed. 5507endif::VK_KHR_ray_tracing_pipeline[] 5508ifdef::VK_EXT_vertex_input_dynamic_state[] 5509 * ename:VK_DYNAMIC_STATE_VERTEX_INPUT_EXT specifies that the 5510 pname:pVertexInputState state will be ignored and must: be set 5511 dynamically with flink:vkCmdSetVertexInputEXT before any drawing 5512 commands 5513endif::VK_EXT_vertex_input_dynamic_state[] 5514ifdef::VK_EXT_color_write_enable[] 5515 * ename:VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT specifies that the 5516 pname:pColorWriteEnables state in 5517 slink:VkPipelineColorWriteCreateInfoEXT will be ignored and must: be set 5518 dynamically with flink:vkCmdSetColorWriteEnableEXT before any draw call. 5519endif::VK_EXT_color_write_enable[] 5520ifdef::VK_EXT_extended_dynamic_state3[] 5521 * ename:VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT specifies that the 5522 pname:domainOrigin state in 5523 slink:VkPipelineTessellationDomainOriginStateCreateInfo will be ignored 5524 and must: be set dynamically with 5525 flink:vkCmdSetTessellationDomainOriginEXT before any draw call. 5526 * ename:VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT specifies that the 5527 pname:depthClampEnable state in 5528 slink:VkPipelineRasterizationStateCreateInfo will be ignored and must: 5529 be set dynamically with flink:vkCmdSetDepthClampEnableEXT before any 5530 draw call. 5531 * ename:VK_DYNAMIC_STATE_POLYGON_MODE_EXT specifies that the 5532 pname:polygonMode state in slink:VkPipelineRasterizationStateCreateInfo 5533 will be ignored and must: be set dynamically with 5534 flink:vkCmdSetPolygonModeEXT before any draw call. 5535 * ename:VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT specifies that the 5536 pname:rasterizationSamples state in 5537 slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be 5538 set dynamically with flink:vkCmdSetRasterizationSamplesEXT before any 5539 draw call. 5540 * ename:VK_DYNAMIC_STATE_SAMPLE_MASK_EXT specifies that the 5541 pname:pSampleMask state in slink:VkPipelineMultisampleStateCreateInfo 5542 will be ignored and must: be set dynamically with 5543 flink:vkCmdSetSampleMaskEXT before any draw call. 5544 * ename:VK_DYNAMIC_STATE_ALPHA_TO_COVERAGE_ENABLE_EXT specifies that the 5545 pname:alphaToCoverageEnable state in 5546 slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be 5547 set dynamically with flink:vkCmdSetAlphaToCoverageEnableEXT before any 5548 draw call. 5549 * ename:VK_DYNAMIC_STATE_ALPHA_TO_ONE_ENABLE_EXT specifies that the 5550 pname:alphaToOneEnable state in 5551 slink:VkPipelineMultisampleStateCreateInfo will be ignored and must: be 5552 set dynamically with flink:vkCmdSetAlphaToOneEnableEXT before any draw 5553 call. 5554 * ename:VK_DYNAMIC_STATE_LOGIC_OP_ENABLE_EXT specifies that the 5555 pname:logicOpEnable state in slink:VkPipelineColorBlendStateCreateInfo 5556 will be ignored and must: be set dynamically with 5557 flink:vkCmdSetLogicOpEnableEXT before any draw call. 5558 * ename:VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT specifies that the 5559 pname:blendEnable state in slink:VkPipelineColorBlendAttachmentState 5560 will be ignored and must: be set dynamically with 5561 flink:vkCmdSetColorBlendEnableEXT before any draw call. 5562 * ename:VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT specifies that the 5563 pname:srcColorBlendFactor, pname:dstColorBlendFactor, 5564 pname:colorBlendOp, pname:srcAlphaBlendFactor, 5565 pname:dstAlphaBlendFactor, and pname:alphaBlendOp states in 5566 slink:VkPipelineColorBlendAttachmentState will be ignored and must: be 5567 set dynamically with flink:vkCmdSetColorBlendEquationEXT before any draw 5568 call. 5569 * ename:VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT specifies that the 5570 pname:colorWriteMask state in slink:VkPipelineColorBlendAttachmentState 5571 will be ignored and must: be set dynamically with 5572 flink:vkCmdSetColorWriteMaskEXT before any draw call. 5573ifdef::VK_EXT_transform_feedback[] 5574 * ename:VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT specifies that the 5575 pname:rasterizationStream state in 5576 slink:VkPipelineRasterizationStateStreamCreateInfoEXT will be ignored 5577 and must: be set dynamically with flink:vkCmdSetRasterizationStreamEXT 5578 before any draw call. 5579endif::VK_EXT_transform_feedback[] 5580ifdef::VK_EXT_conservative_rasterization[] 5581 * ename:VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT specifies 5582 that the pname:conservativeRasterizationMode state in 5583 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT will be 5584 ignored and must: be set dynamically with 5585 flink:vkCmdSetConservativeRasterizationModeEXT before any draw call. 5586 * ename:VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT specifies 5587 that the pname:extraPrimitiveOverestimationSize state in 5588 slink:VkPipelineRasterizationConservativeStateCreateInfoEXT will be 5589 ignored and must: be set dynamically with 5590 flink:vkCmdSetExtraPrimitiveOverestimationSizeEXT before any draw call. 5591endif::VK_EXT_conservative_rasterization[] 5592ifdef::VK_EXT_depth_clip_enable[] 5593 * ename:VK_DYNAMIC_STATE_DEPTH_CLIP_ENABLE_EXT specifies that the 5594 pname:depthClipEnable state in 5595 slink:VkPipelineRasterizationDepthClipStateCreateInfoEXT will be ignored 5596 and must: be set dynamically with flink:vkCmdSetDepthClipEnableEXT 5597 before any draw call. 5598endif::VK_EXT_depth_clip_enable[] 5599ifdef::VK_EXT_sample_locations[] 5600 * ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT specifies that the 5601 pname:sampleLocationsEnable state in 5602 slink:VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and 5603 must: be set dynamically with flink:vkCmdSetSampleLocationsEnableEXT 5604 before any draw call. 5605endif::VK_EXT_sample_locations[] 5606ifdef::VK_EXT_blend_operation_advanced[] 5607 * ename:VK_DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT specifies that the 5608 pname:colorBlendOp state in slink:VkPipelineColorBlendAttachmentState, 5609 and pname:srcPremultiplied, pname:dstPremultiplied, and 5610 pname:blendOverlap states in 5611 slink:VkPipelineColorBlendAdvancedStateCreateInfoEXT will be ignored and 5612 must: be set dynamically with flink:vkCmdSetColorBlendAdvancedEXT before 5613 any draw call. 5614endif::VK_EXT_blend_operation_advanced[] 5615ifdef::VK_EXT_provoking_vertex[] 5616 * ename:VK_DYNAMIC_STATE_PROVOKING_VERTEX_MODE_EXT specifies that the 5617 pname:provokingVertexMode state in 5618 slink:VkPipelineRasterizationProvokingVertexStateCreateInfoEXT will be 5619 ignored and must: be set dynamically with 5620 flink:vkCmdSetProvokingVertexModeEXT before any draw call. 5621endif::VK_EXT_provoking_vertex[] 5622ifdef::VK_EXT_line_rasterization[] 5623 * ename:VK_DYNAMIC_STATE_LINE_RASTERIZATION_MODE_EXT specifies that the 5624 pname:lineRasterizationMode state in 5625 slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and 5626 must: be set dynamically with flink:vkCmdSetLineRasterizationModeEXT 5627 before any draw call. 5628 * ename:VK_DYNAMIC_STATE_LINE_STIPPLE_ENABLE_EXT specifies that the 5629 pname:stippledLineEnable state in 5630 slink:VkPipelineRasterizationLineStateCreateInfoEXT will be ignored and 5631 must: be set dynamically with flink:vkCmdSetLineStippleEnableEXT before 5632 any draw call. 5633endif::VK_EXT_line_rasterization[] 5634ifdef::VK_EXT_depth_clip_control[] 5635 * ename:VK_DYNAMIC_STATE_DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT specifies that 5636 the pname:negativeOneToOne state in 5637 slink:VkPipelineViewportDepthClipControlCreateInfoEXT will be ignored 5638 and must: be set dynamically with 5639 flink:vkCmdSetDepthClipNegativeOneToOneEXT before any draw call. 5640endif::VK_EXT_depth_clip_control[] 5641ifdef::VK_NV_clip_space_w_scaling[] 5642 * ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_ENABLE_NV specifies that the 5643 pname:viewportWScalingEnable state in 5644 slink:VkPipelineViewportWScalingStateCreateInfoNV will be ignored and 5645 must: be set dynamically with flink:vkCmdSetViewportWScalingEnableNV 5646 before any draw call. 5647endif::VK_NV_clip_space_w_scaling[] 5648ifdef::VK_NV_viewport_swizzle[] 5649 * ename:VK_DYNAMIC_STATE_VIEWPORT_SWIZZLE_NV specifies that the 5650 pname:viewportCount, and pname:pViewportSwizzles states in 5651 slink:VkPipelineViewportSwizzleStateCreateInfoNV will be ignored and 5652 must: be set dynamically with flink:vkCmdSetViewportSwizzleNV before any 5653 draw call. 5654endif::VK_NV_viewport_swizzle[] 5655ifdef::VK_NV_fragment_coverage_to_color[] 5656 * ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_ENABLE_NV specifies that the 5657 pname:coverageToColorEnable state in 5658 slink:VkPipelineCoverageToColorStateCreateInfoNV will be ignored and 5659 must: be set dynamically with flink:vkCmdSetCoverageToColorEnableNV 5660 before any draw call. 5661 * ename:VK_DYNAMIC_STATE_COVERAGE_TO_COLOR_LOCATION_NV specifies that the 5662 pname:coverageToColorLocation state in 5663 slink:VkPipelineCoverageToColorStateCreateInfoNV will be ignored and 5664 must: be set dynamically with flink:vkCmdSetCoverageToColorLocationNV 5665 before any draw call. 5666endif::VK_NV_fragment_coverage_to_color[] 5667ifdef::VK_NV_framebuffer_mixed_samples[] 5668 * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_MODE_NV specifies that the 5669 pname:coverageModulationMode state in 5670 slink:VkPipelineCoverageModulationStateCreateInfoNV will be ignored and 5671 must: be set dynamically with flink:vkCmdSetCoverageModulationModeNV 5672 before any draw call. 5673 * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_ENABLE_NV specifies 5674 that the pname:coverageModulationTableEnable state in 5675 slink:VkPipelineCoverageModulationStateCreateInfoNV will be ignored and 5676 must: be set dynamically with 5677 flink:vkCmdSetCoverageModulationTableEnableNV before any draw call. 5678 * ename:VK_DYNAMIC_STATE_COVERAGE_MODULATION_TABLE_NV specifies that the 5679 pname:coverageModulationTableCount, and pname:pCoverageModulationTable 5680 states in slink:VkPipelineCoverageModulationStateCreateInfoNV will be 5681 ignored and must: be set dynamically with 5682 flink:vkCmdSetCoverageModulationTableNV before any draw call. 5683endif::VK_NV_framebuffer_mixed_samples[] 5684ifdef::VK_NV_shading_rate_image[] 5685 * ename:VK_DYNAMIC_STATE_SHADING_RATE_IMAGE_ENABLE_NV specifies that the 5686 pname:shadingRateImageEnable state in 5687 slink:VkPipelineViewportShadingRateImageStateCreateInfoNV will be 5688 ignored and must: be set dynamically with 5689 flink:vkCmdSetShadingRateImageEnableNV before any draw call. 5690endif::VK_NV_shading_rate_image[] 5691ifdef::VK_NV_representative_fragment_test[] 5692 * ename:VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV specifies 5693 that the pname:representativeFragmentTestEnable state in 5694 slink:VkPipelineRepresentativeFragmentTestStateCreateInfoNV will be 5695 ignored and must: be set dynamically with 5696 flink:vkCmdSetRepresentativeFragmentTestEnableNV before any draw call. 5697endif::VK_NV_representative_fragment_test[] 5698ifdef::VK_NV_coverage_reduction_mode[] 5699 * ename:VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV specifies that the 5700 pname:coverageReductionMode state in 5701 slink:VkPipelineCoverageReductionStateCreateInfoNV will be ignored and 5702 must: be set dynamically with flink:vkCmdSetCoverageReductionModeNV 5703 before any draw call. 5704endif::VK_NV_coverage_reduction_mode[] 5705ifdef::VK_EXT_attachment_feedback_loop_dynamic_state[] 5706 * ename:VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT specifies 5707 that the ename:VK_PIPELINE_CREATE_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 5708 and 5709 ename:VK_PIPELINE_CREATE_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT 5710 flags will be ignored and must: be set dynamically with 5711 flink:vkCmdSetAttachmentFeedbackLoopEnableEXT before any draw call. 5712endif::VK_EXT_attachment_feedback_loop_dynamic_state[] 5713endif::VK_EXT_extended_dynamic_state3[] 5714-- 5715 5716 5717=== Valid Combinations of Stages for Graphics Pipelines 5718 5719ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5720Primitive processing can be handled either on a per primitive basis by the 5721vertex, tessellation, and geometry shader stages, or on a per mesh basis 5722using task and mesh shader stages. 5723If the pipeline includes a mesh shader stage, it uses the mesh pipeline, 5724otherwise it uses the primitive pipeline. 5725 5726If a task shader is omitted, the task shading stage is skipped. 5727endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5728 5729If tessellation shader stages are omitted, the tessellation shading and 5730fixed-function stages of the pipeline are skipped. 5731 5732If a geometry shader is omitted, the geometry shading stage is skipped. 5733 5734If a fragment shader is omitted, fragment color outputs have undefined: 5735values, and the fragment depth value is determined by <<fragops, Fragment 5736Operations>> state. 5737This can: be useful for depth-only rendering. 5738 5739Presence of a shader stage in a pipeline is indicated by including a valid 5740slink:VkPipelineShaderStageCreateInfo with pname:module and pname:pName 5741selecting an entry point from a shader module, where that entry point is 5742valid for the stage specified by pname:stage. 5743 5744Presence of some of the fixed-function stages in the pipeline is implicitly 5745derived from enabled shaders and provided state. 5746For example, the fixed-function tessellator is always present when the 5747pipeline has valid Tessellation Control and Tessellation Evaluation shaders. 5748 5749.For example: 5750 * Depth/stencil-only rendering in a subpass with no color attachments 5751 ** Active Pipeline Shader Stages 5752 *** Vertex Shader 5753 ** Required: Fixed-Function Pipeline Stages 5754 *** slink:VkPipelineVertexInputStateCreateInfo 5755 *** slink:VkPipelineInputAssemblyStateCreateInfo 5756 *** slink:VkPipelineViewportStateCreateInfo 5757 *** slink:VkPipelineRasterizationStateCreateInfo 5758 *** slink:VkPipelineMultisampleStateCreateInfo 5759 *** slink:VkPipelineDepthStencilStateCreateInfo 5760 * Color-only rendering in a subpass with no depth/stencil attachment 5761 ** Active Pipeline Shader Stages 5762 *** Vertex Shader 5763 *** Fragment Shader 5764 ** Required: Fixed-Function Pipeline Stages 5765 *** slink:VkPipelineVertexInputStateCreateInfo 5766 *** slink:VkPipelineInputAssemblyStateCreateInfo 5767 *** slink:VkPipelineViewportStateCreateInfo 5768 *** slink:VkPipelineRasterizationStateCreateInfo 5769 *** slink:VkPipelineMultisampleStateCreateInfo 5770 *** slink:VkPipelineColorBlendStateCreateInfo 5771 * Rendering pipeline with tessellation and geometry shaders 5772 ** Active Pipeline Shader Stages 5773 *** Vertex Shader 5774 *** Tessellation Control Shader 5775 *** Tessellation Evaluation Shader 5776 *** Geometry Shader 5777 *** Fragment Shader 5778 ** Required: Fixed-Function Pipeline Stages 5779 *** slink:VkPipelineVertexInputStateCreateInfo 5780 *** slink:VkPipelineInputAssemblyStateCreateInfo 5781 *** slink:VkPipelineTessellationStateCreateInfo 5782 *** slink:VkPipelineViewportStateCreateInfo 5783 *** slink:VkPipelineRasterizationStateCreateInfo 5784 *** slink:VkPipelineMultisampleStateCreateInfo 5785 *** slink:VkPipelineDepthStencilStateCreateInfo 5786 *** slink:VkPipelineColorBlendStateCreateInfo 5787ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5788 * Rendering pipeline with task and mesh shaders 5789 ** Active Pipeline Shader Stages 5790 *** Task Shader 5791 *** Mesh Shader 5792 *** Fragment Shader 5793 ** Required: Fixed-Function Pipeline Stages 5794 *** slink:VkPipelineViewportStateCreateInfo 5795 *** slink:VkPipelineRasterizationStateCreateInfo 5796 *** slink:VkPipelineMultisampleStateCreateInfo 5797 *** slink:VkPipelineDepthStencilStateCreateInfo 5798 *** slink:VkPipelineColorBlendStateCreateInfo 5799endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5800 5801 5802ifdef::VK_NV_device_generated_commands[] 5803[[graphics-shadergroups]] 5804=== Graphics Pipeline Shader Groups 5805 5806Graphics pipelines can contain multiple shader groups that can be bound 5807individually. 5808Each shader group behaves as if it was a pipeline using the shader group's 5809state. 5810When the pipeline is bound by regular means, it behaves as if the state of 5811group `0` is active, use flink:vkCmdBindPipelineShaderGroupNV to bind an 5812individual shader group. 5813 5814The primary purpose of shader groups is allowing the device to bind 5815different pipeline state using <<device-generated-commands>>. 5816 5817[open,refpage='VkGraphicsPipelineShaderGroupsCreateInfoNV',desc='Structure specifying parameters of a newly created multi shader group pipeline',type='structs'] 5818-- 5819The sname:VkGraphicsPipelineShaderGroupsCreateInfoNV structure is defined 5820as: 5821 5822include::{generated}/api/structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.adoc[] 5823 5824 * pname:sType is a elink:VkStructureType value identifying this structure. 5825 * pname:pNext is `NULL` or a pointer to a structure extending this 5826 structure. 5827 * pname:groupCount is the number of elements in the pname:pGroups array. 5828 * pname:pGroups is a pointer to an array of 5829 slink:VkGraphicsShaderGroupCreateInfoNV structures specifying which 5830 state of the original slink:VkGraphicsPipelineCreateInfo each shader 5831 group overrides. 5832 * pname:pipelineCount is the number of elements in the pname:pPipelines 5833 array. 5834 * pname:pPipelines is a pointer to an array of graphics sname:VkPipeline 5835 structures which are referenced within the created pipeline, including 5836 all their shader groups. 5837 5838When referencing shader groups by index, groups defined in the referenced 5839pipelines are treated as if they were defined as additional entries in 5840pname:pGroups. 5841They are appended in the order they appear in the pname:pPipelines array and 5842in the pname:pGroups array when those pipelines were defined. 5843 5844The application must: maintain the lifetime of all such referenced pipelines 5845based on the pipelines that make use of them. 5846 5847.Valid Usage 5848**** 5849 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02879]] 5850 pname:groupCount must: be at least `1` and as maximum 5851 sname:VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::pname:maxGraphicsShaderGroupCount 5852 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-groupCount-02880]] 5853 The sum of pname:groupCount including those groups added from referenced 5854 pname:pPipelines must: also be as maximum 5855 sname:VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::pname:maxGraphicsShaderGroupCount 5856 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02881]] 5857 The state of the first element of pname:pGroups must: match its 5858 equivalent within the parent's slink:VkGraphicsPipelineCreateInfo 5859 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02882]] 5860 Each element of pname:pGroups must: in combination with the rest of the 5861 pipeline state yield a valid state configuration 5862ifndef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5863 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02883]] 5864 All elements of pname:pGroups must: use the same shader stage 5865 combinations 5866endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5867ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5868 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02884]] 5869 All elements of pname:pGroups must: use the same shader stage 5870 combinations unless any mesh shader stage is used, then either 5871 combination of task and mesh or just mesh shader is valid 5872 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-02885]] 5873 Mesh and regular primitive shading stages cannot be mixed across 5874 pname:pGroups 5875endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 5876 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-02886]] 5877 Each element of pname:pPipelines must: have been created with identical 5878 state to the pipeline currently created except the state that can be 5879 overridden by slink:VkGraphicsShaderGroupCreateInfoNV 5880 * [[VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-deviceGeneratedCommands-02887]] 5881 The <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>> 5882 feature must: be enabled 5883**** 5884 5885include::{generated}/validity/structs/VkGraphicsPipelineShaderGroupsCreateInfoNV.adoc[] 5886-- 5887 5888[open,refpage='VkGraphicsShaderGroupCreateInfoNV',desc='Structure specifying override parameters for each shader group',type='structs'] 5889-- 5890The sname:VkGraphicsShaderGroupCreateInfoNV structure provides the state 5891overrides for each shader group. 5892Each shader group behaves like a pipeline that was created from its state as 5893well as the remaining parent's state. 5894It is defined as: 5895 5896include::{generated}/api/structs/VkGraphicsShaderGroupCreateInfoNV.adoc[] 5897 5898 * pname:sType is a elink:VkStructureType value identifying this structure. 5899 * pname:pNext is `NULL` or a pointer to a structure extending this 5900 structure. 5901 * pname:stageCount is the number of entries in the pname:pStages array. 5902 * pname:pStages is a pointer to an array 5903 slink:VkPipelineShaderStageCreateInfo structures specifying the set of 5904 the shader stages to be included in this shader group. 5905 * pname:pVertexInputState is a pointer to a 5906 slink:VkPipelineVertexInputStateCreateInfo structure. 5907 * pname:pTessellationState is a pointer to a 5908 slink:VkPipelineTessellationStateCreateInfo structure, and is ignored if 5909 the shader group does not include a tessellation control shader stage 5910 and tessellation evaluation shader stage. 5911 5912.Valid Usage 5913**** 5914 * [[VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-02888]] 5915 For pname:stageCount, the same restrictions as in 5916 slink:VkGraphicsPipelineCreateInfo::pname:stageCount apply 5917 * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-02889]] 5918 For pname:pStages, the same restrictions as in 5919 slink:VkGraphicsPipelineCreateInfo::pname:pStages apply 5920 * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pVertexInputState-02890]] 5921 For pname:pVertexInputState, the same restrictions as in 5922 slink:VkGraphicsPipelineCreateInfo::pname:pVertexInputState apply 5923 * [[VUID-VkGraphicsShaderGroupCreateInfoNV-pTessellationState-02891]] 5924 For pname:pTessellationState, the same restrictions as in 5925 slink:VkGraphicsPipelineCreateInfo::pname:pTessellationState apply 5926**** 5927 5928include::{generated}/validity/structs/VkGraphicsShaderGroupCreateInfoNV.adoc[] 5929-- 5930endif::VK_NV_device_generated_commands[] 5931 5932 5933ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 5934[[pipelines-ray-tracing]] 5935== Ray Tracing Pipelines 5936 5937Ray tracing pipelines consist of multiple shader stages, fixed-function 5938traversal stages, and a pipeline layout. 5939 5940[open,refpage='VK_SHADER_UNUSED_KHR',desc='Sentinel for an unused shader index',type='consts',alias='VK_SHADER_UNUSED_NV'] 5941-- 5942ename:VK_SHADER_UNUSED_KHR is a special shader index used to indicate that a 5943ray generation, miss, or callable shader member is not used. 5944 5945include::{generated}/api/enums/VK_SHADER_UNUSED_KHR.adoc[] 5946 5947ifdef::VK_NV_ray_tracing[] 5948or the equivalent 5949 5950include::{generated}/api/enums/VK_SHADER_UNUSED_NV.adoc[] 5951endif::VK_NV_ray_tracing[] 5952-- 5953 5954ifdef::VK_NV_ray_tracing[] 5955[open,refpage='vkCreateRayTracingPipelinesNV',desc='Creates a new ray tracing pipeline object',type='protos'] 5956-- 5957:refpage: vkCreateRayTracingPipelinesNV 5958 5959To create ray tracing pipelines, call: 5960 5961include::{generated}/api/protos/vkCreateRayTracingPipelinesNV.adoc[] 5962 5963 * pname:device is the logical device that creates the ray tracing 5964 pipelines. 5965ifndef::VKSC_VERSION_1_0[] 5966 * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that 5967 pipeline caching is disabled, or the handle of a valid 5968 <<pipelines-cache,pipeline cache>> object, in which case use of that 5969 cache is enabled for the duration of the command. 5970endif::VKSC_VERSION_1_0[] 5971ifdef::VKSC_VERSION_1_0[] 5972 * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline 5973 cache>> object. 5974endif::VKSC_VERSION_1_0[] 5975 * pname:createInfoCount is the length of the pname:pCreateInfos and 5976 pname:pPipelines arrays. 5977 * pname:pCreateInfos is a pointer to an array of 5978 slink:VkRayTracingPipelineCreateInfoNV structures. 5979 * pname:pAllocator controls host memory allocation as described in the 5980 <<memory-allocation, Memory Allocation>> chapter. 5981 * pname:pPipelines is a pointer to an array in which the resulting ray 5982 tracing pipeline objects are returned. 5983 5984ifdef::VKSC_VERSION_1_0[] 5985If a pipeline creation fails due to: 5986 5987 * The identified pipeline not being present in pname:pipelineCache 5988 * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo 5989 structure 5990 5991the operation will continue as specified in <<pipelines-multiple, Multiple 5992Pipeline Creation>> and the command will return 5993ename:VK_ERROR_NO_PIPELINE_MATCH. 5994ifdef::hidden[] 5995// tag::scdeviation[] 5996ifdef::VK_NV_ray_tracing[] 5997 * flink:vkCreateRayTracingPipelinesNV returns 5998 ename:VK_ERROR_NO_PIPELINE_MATCH if the 5999 slink:VkRayTracingPipelineCreateInfoNV::pname:pNext chain does not 6000 include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>. 6001endif::VK_NV_ray_tracing[] 6002// end::scdeviation[] 6003endif::hidden[] 6004endif::VKSC_VERSION_1_0[] 6005 6006.Valid Usage 6007**** 6008include::{chapters}/commonvalidity/create_ray_tracing_pipelines_common.adoc[] 6009**** 6010ifdef::VKSC_VERSION_1_0[] 6011ifdef::hidden[] 6012// tag::scdeviation[] 6013ifdef::VK_NV_ray_tracing[] 6014 * flink:vkCreateRayTracingPipelinesNV::pname:pipelineCache must: not be 6015 dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>. 6016endif::VK_NV_ray_tracing[] 6017// end::scdeviation[] 6018endif::hidden[] 6019endif::VKSC_VERSION_1_0[] 6020 6021include::{generated}/validity/protos/vkCreateRayTracingPipelinesNV.adoc[] 6022-- 6023endif::VK_NV_ray_tracing[] 6024 6025ifdef::VK_KHR_ray_tracing_pipeline[] 6026[open,refpage='vkCreateRayTracingPipelinesKHR',desc='Creates a new ray tracing pipeline object',type='protos'] 6027-- 6028:refpage: vkCreateRayTracingPipelinesKHR 6029 6030To create ray tracing pipelines, call: 6031 6032include::{generated}/api/protos/vkCreateRayTracingPipelinesKHR.adoc[] 6033 6034 * pname:device is the logical device that creates the ray tracing 6035 pipelines. 6036 * pname:deferredOperation is dlink:VK_NULL_HANDLE or the handle of a valid 6037 slink:VkDeferredOperationKHR <<deferred-host-operations-requesting, 6038 request deferral>> object for this command. 6039ifndef::VKSC_VERSION_1_0[] 6040 * pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that 6041 pipeline caching is disabled, or the handle of a valid 6042 <<pipelines-cache,pipeline cache>> object, in which case use of that 6043 cache is enabled for the duration of the command. 6044endif::VKSC_VERSION_1_0[] 6045ifdef::VKSC_VERSION_1_0[] 6046 * pname:pipelineCache is the handle of a valid <<pipelines-cache,pipeline 6047 cache>> object. 6048endif::VKSC_VERSION_1_0[] 6049 * pname:createInfoCount is the length of the pname:pCreateInfos and 6050 pname:pPipelines arrays. 6051 * pname:pCreateInfos is a pointer to an array of 6052 slink:VkRayTracingPipelineCreateInfoKHR structures. 6053 * pname:pAllocator controls host memory allocation as described in the 6054 <<memory-allocation, Memory Allocation>> chapter. 6055 * pname:pPipelines is a pointer to an array in which the resulting ray 6056 tracing pipeline objects are returned. 6057 6058The ename:VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS error is returned if the 6059implementation is unable to reuse the shader group handles provided in 6060slink:VkRayTracingShaderGroupCreateInfoKHR::pname:pShaderGroupCaptureReplayHandle 6061when 6062slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay 6063is enabled. 6064 6065ifdef::VKSC_VERSION_1_0[] 6066If a pipeline creation fails due to: 6067 6068 * The identified pipeline not being present in pname:pipelineCache 6069 * The pname:pNext chain not including a slink:VkPipelineOfflineCreateInfo 6070 structure 6071 6072the operation will continue as specified in <<pipelines-multiple, Multiple 6073Pipeline Creation>> and the command will return 6074ename:VK_ERROR_NO_PIPELINE_MATCH. 6075ifdef::hidden[] 6076// tag::scdeviation[] 6077ifdef::VK_KHR_ray_tracing_pipeline[] 6078 * flink:vkCreateRayTracingPipelinesKHR returns 6079 ename:VK_ERROR_NO_PIPELINE_MATCH if the 6080 slink:VkRayTracingPipelineCreateInfoKHR::pname:pNext chain does not 6081 include a valid slink:VkPipelineOfflineCreateInfo structure <<SCID-1>>. 6082endif::VK_KHR_ray_tracing_pipeline[] 6083// end::scdeviation[] 6084endif::hidden[] 6085endif::VKSC_VERSION_1_0[] 6086 6087.Valid Usage 6088**** 6089include::{chapters}/commonvalidity/create_ray_tracing_pipelines_common.adoc[] 6090include::{chapters}/commonvalidity/deferred_operations_common.adoc[] 6091 * [[VUID-vkCreateRayTracingPipelinesKHR-rayTracingPipeline-03586]] 6092 The <<features-rayTracingPipeline, pname:rayTracingPipeline>> feature 6093 must: be enabled 6094ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 6095ifdef::VK_KHR_deferred_host_operations[] 6096 * [[VUID-vkCreateRayTracingPipelinesKHR-deferredOperation-03587]] 6097 If pname:deferredOperation is not dlink:VK_NULL_HANDLE, the pname:flags 6098 member of elements of pname:pCreateInfos must: not include 6099 ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT 6100endif::VK_KHR_deferred_host_operations[] 6101endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 6102**** 6103ifdef::VKSC_VERSION_1_0[] 6104ifdef::hidden[] 6105// tag::scdeviation[] 6106ifdef::VK_KHR_ray_tracing_pipeline[] 6107 * flink:vkCreateRayTracingPipelinesKHR::pname:pipelineCache must: not be 6108 dlink:VK_NULL_HANDLE <<SCID-1>>, <<SCID-8>>. 6109endif::VK_KHR_ray_tracing_pipeline[] 6110// end::scdeviation[] 6111endif::hidden[] 6112endif::VKSC_VERSION_1_0[] 6113 6114include::{generated}/validity/protos/vkCreateRayTracingPipelinesKHR.adoc[] 6115-- 6116endif::VK_KHR_ray_tracing_pipeline[] 6117 6118ifdef::VK_NV_ray_tracing[] 6119[open,refpage='VkRayTracingPipelineCreateInfoNV',desc='Structure specifying parameters of a newly created ray tracing pipeline',type='structs'] 6120-- 6121:refpage: VkRayTracingPipelineCreateInfoNV 6122 6123The sname:VkRayTracingPipelineCreateInfoNV structure is defined as: 6124 6125include::{generated}/api/structs/VkRayTracingPipelineCreateInfoNV.adoc[] 6126 6127 * pname:sType is a elink:VkStructureType value identifying this structure. 6128 * pname:pNext is `NULL` or a pointer to a structure extending this 6129 structure. 6130 * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying 6131 how the pipeline will be generated. 6132 * pname:stageCount is the number of entries in the pname:pStages array. 6133 * pname:pStages is a pointer to an array of 6134 slink:VkPipelineShaderStageCreateInfo structures specifying the set of 6135 the shader stages to be included in the ray tracing pipeline. 6136 * pname:groupCount is the number of entries in the pname:pGroups array. 6137 * pname:pGroups is a pointer to an array of 6138 slink:VkRayTracingShaderGroupCreateInfoNV structures describing the set 6139 of the shader stages to be included in each shader group in the ray 6140 tracing pipeline. 6141 * pname:maxRecursionDepth is the <<ray-tracing-recursion-depth, maximum 6142 recursion depth>> of shaders executed by this pipeline. 6143 * pname:layout is the description of binding locations used by both the 6144 pipeline and descriptor sets used with the pipeline. 6145 * pname:basePipelineHandle is a pipeline to derive from. 6146ifdef::VKSC_VERSION_1_0[] 6147 This is not used in Vulkan SC <<SCID-8>>. 6148endif::VKSC_VERSION_1_0[] 6149 * pname:basePipelineIndex is an index into the pname:pCreateInfos 6150 parameter to use as a pipeline to derive from. 6151ifdef::VKSC_VERSION_1_0[] 6152 This is not used in Vulkan SC <<SCID-8>>. 6153endif::VKSC_VERSION_1_0[] 6154 6155The parameters pname:basePipelineHandle and pname:basePipelineIndex are 6156described in more detail in <<pipelines-pipeline-derivatives,Pipeline 6157Derivatives>>. 6158 6159ifdef::VK_KHR_maintenance5[] 6160If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the 6161pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags 6162from that structure is used instead of pname:flags from this structure. 6163endif::VK_KHR_maintenance5[] 6164 6165.Valid Usage 6166**** 6167:pipelineType: ray tracing 6168include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[] 6169include::{chapters}/commonvalidity/ray_tracing_pipeline_create_info_common.adoc[] 6170 * [[VUID-VkRayTracingPipelineCreateInfoNV-stage-06232]] 6171 The pname:stage member of at least one element of pname:pStages must: be 6172 ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR 6173ifdef::VK_KHR_pipeline_library[] 6174 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03456]] 6175 pname:flags must: not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6176endif::VK_KHR_pipeline_library[] 6177 * [[VUID-VkRayTracingPipelineCreateInfoNV-maxRecursionDepth-03457]] 6178 pname:maxRecursionDepth must: be less than or equal to 6179 slink:VkPhysicalDeviceRayTracingPropertiesNV::pname:maxRecursionDepth 6180ifdef::VK_KHR_ray_tracing_pipeline[] 6181 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03458]] 6182 pname:flags must: not include 6183 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR 6184 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03459]] 6185 pname:flags must: not include 6186 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR 6187 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03460]] 6188 pname:flags must: not include 6189 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR 6190 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03461]] 6191 pname:flags must: not include 6192 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR 6193 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03462]] 6194 pname:flags must: not include 6195 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR 6196 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03463]] 6197 pname:flags must: not include 6198 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR 6199 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-03588]] 6200 pname:flags must: not include 6201 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 6202endif::VK_KHR_ray_tracing_pipeline[] 6203ifdef::VK_NV_ray_tracing_motion_blur[] 6204 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-04948]] 6205 pname:flags must: not include 6206 ename:VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV 6207endif::VK_NV_ray_tracing_motion_blur[] 6208ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 6209 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-02957]] 6210 pname:flags must: not include both 6211 ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV and 6212 ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT at the 6213 same time 6214endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 6215ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 6216 * [[VUID-VkRayTracingPipelineCreateInfoNV-pipelineStageCreationFeedbackCount-06651]] 6217 If 6218 slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount 6219 is not `0`, it must: be equal to pname:stageCount 6220endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 6221 * [[VUID-VkRayTracingPipelineCreateInfoNV-stage-06898]] 6222 The pname:stage value in all pname:pStages elements must: be one of 6223 ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR, 6224 ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR, 6225 ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, 6226 ename:VK_SHADER_STAGE_MISS_BIT_KHR, 6227 ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or 6228 ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR 6229ifdef::VK_EXT_opacity_micromap[] 6230 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-07402]] 6231 pname:flags must: not include 6232 ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT 6233endif::VK_EXT_opacity_micromap[] 6234ifdef::VK_NV_displacement_micromap[] 6235 * [[VUID-VkRayTracingPipelineCreateInfoNV-flags-07998]] 6236 pname:flags must: not include 6237 ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 6238endif::VK_NV_displacement_micromap[] 6239**** 6240ifdef::VKSC_VERSION_1_0[] 6241ifdef::hidden[] 6242// tag::scdeviation[] 6243ifdef::VK_NV_ray_tracing[] 6244 * slink:VkRayTracingPipelineCreateInfoNV::pname:basePipelineHandle must: 6245 be dlink:VK_NULL_HANDLE <<SCID-8>>. 6246 * slink:VkRayTracingPipelineCreateInfoNV::pname:basePipelineIndex must: be 6247 zero <<SCID-8>>. 6248endif::VK_NV_ray_tracing[] 6249// end::scdeviation[] 6250endif::hidden[] 6251endif::VKSC_VERSION_1_0[] 6252 6253include::{generated}/validity/structs/VkRayTracingPipelineCreateInfoNV.adoc[] 6254-- 6255endif::VK_NV_ray_tracing[] 6256 6257ifdef::VK_KHR_ray_tracing_pipeline[] 6258[open,refpage='VkRayTracingPipelineCreateInfoKHR',desc='Structure specifying parameters of a newly created ray tracing pipeline',type='structs'] 6259-- 6260:refpage: VkRayTracingPipelineCreateInfoKHR 6261 6262The sname:VkRayTracingPipelineCreateInfoKHR structure is defined as: 6263 6264include::{generated}/api/structs/VkRayTracingPipelineCreateInfoKHR.adoc[] 6265 6266 * pname:sType is a elink:VkStructureType value identifying this structure. 6267 * pname:pNext is `NULL` or a pointer to a structure extending this 6268 structure. 6269 * pname:flags is a bitmask of elink:VkPipelineCreateFlagBits specifying 6270 how the pipeline will be generated. 6271 * pname:stageCount is the number of entries in the pname:pStages array. 6272 * pname:pStages is a pointer to an array of pname:stageCount 6273 slink:VkPipelineShaderStageCreateInfo structures describing the set of 6274 the shader stages to be included in the ray tracing pipeline. 6275 * pname:groupCount is the number of entries in the pname:pGroups array. 6276 * pname:pGroups is a pointer to an array of pname:groupCount 6277 slink:VkRayTracingShaderGroupCreateInfoKHR structures describing the set 6278 of the shader stages to be included in each shader group in the ray 6279 tracing pipeline. 6280 * pname:maxPipelineRayRecursionDepth is the <<ray-tracing-recursion-depth, 6281 maximum recursion depth>> of shaders executed by this pipeline. 6282 * pname:pLibraryInfo is a pointer to a 6283 slink:VkPipelineLibraryCreateInfoKHR structure defining pipeline 6284 libraries to include. 6285 * pname:pLibraryInterface is a pointer to a 6286 slink:VkRayTracingPipelineInterfaceCreateInfoKHR structure defining 6287 additional information when using pipeline libraries. 6288 * pname:pDynamicState is a pointer to a 6289 slink:VkPipelineDynamicStateCreateInfo structure, and is used to 6290 indicate which properties of the pipeline state object are dynamic and 6291 can: be changed independently of the pipeline state. 6292 This can: be `NULL`, which means no state in the pipeline is considered 6293 dynamic. 6294 * pname:layout is the description of binding locations used by both the 6295 pipeline and descriptor sets used with the pipeline. 6296 * pname:basePipelineHandle is a pipeline to derive from. 6297ifdef::VKSC_VERSION_1_0[] 6298 This is not used in Vulkan SC <<SCID-8>>. 6299endif::VKSC_VERSION_1_0[] 6300 * pname:basePipelineIndex is an index into the pname:pCreateInfos 6301 parameter to use as a pipeline to derive from. 6302ifdef::VKSC_VERSION_1_0[] 6303 This is not used in Vulkan SC <<SCID-8>>. 6304endif::VKSC_VERSION_1_0[] 6305 6306The parameters pname:basePipelineHandle and pname:basePipelineIndex are 6307described in more detail in <<pipelines-pipeline-derivatives,Pipeline 6308Derivatives>>. 6309 6310ifdef::VK_KHR_pipeline_library[] 6311When ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR is specified, this pipeline 6312defines a _pipeline library_ which cannot: be bound as a ray tracing 6313pipeline directly. 6314Instead, pipeline libraries define common shaders and shader groups which 6315can: be included in future pipeline creation. 6316 6317If pipeline libraries are included in pname:pLibraryInfo, shaders defined in 6318those libraries are treated as if they were defined as additional entries in 6319pname:pStages, appended in the order they appear in the pname:pLibraries 6320array and in the pname:pStages array when those libraries were defined. 6321 6322When referencing shader groups in order to obtain a shader group handle, 6323groups defined in those libraries are treated as if they were defined as 6324additional entries in pname:pGroups, appended in the order they appear in 6325the pname:pLibraries array and in the pname:pGroups array when those 6326libraries were defined. 6327The shaders these groups reference are set when the pipeline library is 6328created, referencing those specified in the pipeline library, not in the 6329pipeline that includes it. 6330endif::VK_KHR_pipeline_library[] 6331 6332The default stack size for a pipeline if 6333ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR is not provided 6334is computed as described in <<ray-tracing-pipeline-stack, Ray Tracing 6335Pipeline Stack>>. 6336 6337ifdef::VK_KHR_maintenance5[] 6338If a slink:VkPipelineCreateFlags2CreateInfoKHR structure is present in the 6339pname:pNext chain, slink:VkPipelineCreateFlags2CreateInfoKHR::pname:flags 6340from that structure is used instead of pname:flags from this structure. 6341endif::VK_KHR_maintenance5[] 6342 6343.Valid Usage 6344**** 6345:pipelineType: ray tracing 6346include::{chapters}/commonvalidity/pipeline_create_info_common.adoc[] 6347include::{chapters}/commonvalidity/ray_tracing_pipeline_create_info_common.adoc[] 6348 * [[VUID-VkRayTracingPipelineCreateInfoKHR-stage-03425]] 6349 If pname:flags does not include 6350 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, the pname:stage member of at 6351 least one element of pname:pStages, including those implicitly added by 6352 pname:pLibraryInfo, must: be ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR 6353 * [[VUID-VkRayTracingPipelineCreateInfoKHR-maxPipelineRayRecursionDepth-03589]] 6354 pname:maxPipelineRayRecursionDepth must: be less than or equal to 6355 slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxRayRecursionDepth 6356ifdef::VK_KHR_pipeline_library[] 6357 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03465]] 6358 If pname:flags includes ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR, 6359 pname:pLibraryInterface must: not be `NULL` 6360 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03590]] 6361 If pname:pLibraryInfo is not `NULL` and its pname:libraryCount member is 6362 greater than `0`, pname:pLibraryInterface must: not be `NULL` 6363 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraries-03591]] 6364 Each element of pname:pLibraryInfo->pLibraries must: have been created 6365 with the value of pname:maxPipelineRayRecursionDepth equal to that in 6366 this pipeline 6367 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03592]] 6368 If pname:pLibraryInfo is not `NULL`, each element of its 6369 pname:pLibraries member must: have been created with a pname:layout that 6370 is compatible with the pname:layout in this pipeline 6371 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03593]] 6372 If pname:pLibraryInfo is not `NULL`, each element of its 6373 pname:pLibraries member must: have been created with values of the 6374 pname:maxPipelineRayPayloadSize and pname:maxPipelineRayHitAttributeSize 6375 members of pname:pLibraryInterface equal to those in this pipeline 6376 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03594]] 6377 If pname:flags includes 6378 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, 6379 each element of pname:pLibraryInfo->pLibraries must: have been created 6380 with the 6381 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 6382 bit set 6383 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04718]] 6384 If pname:flags includes 6385 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, each element of 6386 pname:pLibraryInfo->pLibraries must: have been created with the 6387 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR bit set 6388 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04719]] 6389 If pname:flags includes 6390 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, each 6391 element of pname:pLibraryInfo->pLibraries must: have been created with 6392 the ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR bit set 6393 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04720]] 6394 If pname:flags includes 6395 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, 6396 each element of pname:pLibraryInfo->pLibraries must: have been created 6397 with the 6398 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR bit 6399 set 6400 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04721]] 6401 If pname:flags includes 6402 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, 6403 each element of pname:pLibraryInfo->pLibraries must: have been created 6404 with the 6405 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR 6406 bit set 6407 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04722]] 6408 If pname:flags includes 6409 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, 6410 each element of pname:pLibraryInfo->pLibraries must: have been created 6411 with the 6412 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR 6413 bit set 6414 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-04723]] 6415 If pname:flags includes 6416 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, each 6417 element of pname:pLibraryInfo->pLibraries must: have been created with 6418 the ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR 6419 bit set 6420endif::VK_KHR_pipeline_library[] 6421 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-03595]] 6422 If the `apiext:VK_KHR_pipeline_library` extension is not enabled, 6423 pname:pLibraryInfo and pname:pLibraryInterface must: be `NULL` 6424 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03470]] 6425 If pname:flags includes 6426 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, 6427 for any element of pname:pGroups with a pname:type of 6428 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or 6429 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the 6430 pname:anyHitShader of that element must: not be 6431 ename:VK_SHADER_UNUSED_KHR 6432 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03471]] 6433 If pname:flags includes 6434 ename:VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, 6435 for any element of pname:pGroups with a pname:type of 6436 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or 6437 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, the 6438 pname:closestHitShader of that element must: not be 6439 ename:VK_SHADER_UNUSED_KHR 6440 * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03596]] 6441 If the <<features-rayTraversalPrimitiveCulling, 6442 pname:rayTraversalPrimitiveCulling>> feature is not enabled, pname:flags 6443 must: not include 6444 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR 6445 * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTraversalPrimitiveCulling-03597]] 6446 If the <<features-rayTraversalPrimitiveCulling, 6447 pname:rayTraversalPrimitiveCulling>> feature is not enabled, pname:flags 6448 must: not include 6449 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR 6450 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-06546]] 6451 pname:flags must: not include both 6452 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR and 6453 ename:VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR 6454 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-03598]] 6455 If pname:flags includes 6456 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, 6457 <<features-rayTracingPipelineShaderGroupHandleCaptureReplay, 6458 pname:rayTracingPipelineShaderGroupHandleCaptureReplay>> must: be 6459 enabled 6460 * [[VUID-VkRayTracingPipelineCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03599]] 6461 If 6462 slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay 6463 is ename:VK_TRUE and the pname:pShaderGroupCaptureReplayHandle member of 6464 any element of pname:pGroups is not `NULL`, pname:flags must: include 6465 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 6466 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pLibraryInfo-07999]] 6467 If pname:pLibraryInfo is `NULL` or its pname:libraryCount is `0`, 6468 pname:stageCount must: not be `0` 6469 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-08700]] 6470 If pname:flags does not include ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6471 and either pname:pLibraryInfo is `NULL` or its pname:libraryCount is 6472 `0`, pname:groupCount must: not be `0` 6473 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pDynamicStates-03602]] 6474 Any element of the pname:pDynamicStates member of pname:pDynamicState 6475 must: be ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR 6476ifdef::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 6477 * [[VUID-VkRayTracingPipelineCreateInfoKHR-pipelineStageCreationFeedbackCount-06652]] 6478 If 6479 slink:VkPipelineCreationFeedbackCreateInfo::pname:pipelineStageCreationFeedbackCount 6480 is not `0`, it must: be equal to pname:stageCount 6481endif::VK_EXT_pipeline_creation_feedback,VK_VERSION_1_3[] 6482 * [[VUID-VkRayTracingPipelineCreateInfoKHR-stage-06899]] 6483 The pname:stage value in all pname:pStages elements must: be one of 6484 ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR, 6485 ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR, 6486 ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR, 6487 ename:VK_SHADER_STAGE_MISS_BIT_KHR, 6488 ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR, or 6489 ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR 6490ifdef::VK_EXT_opacity_micromap[] 6491 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-07403]] 6492 If pname:flags includes 6493 ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT, each 6494 element of pname:pLibraryInfo->pLibraries must: have been created with 6495 the ename:VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT bit 6496 set 6497endif::VK_EXT_opacity_micromap[] 6498ifdef::VK_NV_displacement_micromap[] 6499 * [[VUID-VkRayTracingPipelineCreateInfoKHR-flags-08701]] 6500 If pname:flags includes 6501 ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV, each 6502 element of pname:pLibraryInfo->pLibraries must: have been created with 6503 the ename:VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV 6504 bit set 6505endif::VK_NV_displacement_micromap[] 6506**** 6507ifdef::VKSC_VERSION_1_0[] 6508ifdef::hidden[] 6509// tag::scdeviation[] 6510ifdef::VK_KHR_ray_tracing_pipeline[] 6511 * slink:VkRayTracingPipelineCreateInfoKHR::pname:flags must: not contain 6512 the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag <<SCID-8>>. 6513 * slink:VkRayTracingPipelineCreateInfoKHR::pname:basePipelineHandle must: 6514 be dlink:VK_NULL_HANDLE <<SCID-8>>. 6515 * slink:VkRayTracingPipelineCreateInfoKHR::pname:basePipelineIndex must: 6516 be zero <<SCID-8>>. 6517endif::VK_KHR_ray_tracing_pipeline[] 6518// end::scdeviation[] 6519endif::hidden[] 6520endif::VKSC_VERSION_1_0[] 6521 6522include::{generated}/validity/structs/VkRayTracingPipelineCreateInfoKHR.adoc[] 6523-- 6524endif::VK_KHR_ray_tracing_pipeline[] 6525 6526ifdef::VK_NV_ray_tracing[] 6527[open,refpage='VkRayTracingShaderGroupCreateInfoNV',desc='Structure specifying shaders in a shader group',type='structs'] 6528-- 6529:refpage: VkRayTracingShaderGroupCreateInfoNV 6530 6531The sname:VkRayTracingShaderGroupCreateInfoNV structure is defined as: 6532 6533include::{generated}/api/structs/VkRayTracingShaderGroupCreateInfoNV.adoc[] 6534 6535 * pname:sType is a elink:VkStructureType value identifying this structure. 6536 * pname:pNext is `NULL` or a pointer to a structure extending this 6537 structure. 6538 * pname:type is the type of hit group specified in this structure. 6539 * pname:generalShader is the index of the ray generation, miss, or 6540 callable shader from 6541 slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if 6542 the shader group has pname:type of 6543 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV, and 6544 ename:VK_SHADER_UNUSED_NV otherwise. 6545 * pname:closestHitShader is the optional index of the closest hit shader 6546 from slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group 6547 if the shader group has pname:type of 6548 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or 6549 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and 6550 ename:VK_SHADER_UNUSED_NV otherwise. 6551 * pname:anyHitShader is the optional index of the any-hit shader from 6552 slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if 6553 the shader group has pname:type of 6554 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV or 6555 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and 6556 ename:VK_SHADER_UNUSED_NV otherwise. 6557 * pname:intersectionShader is the index of the intersection shader from 6558 slink:VkRayTracingPipelineCreateInfoNV::pname:pStages in the group if 6559 the shader group has pname:type of 6560 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV, and 6561 ename:VK_SHADER_UNUSED_NV otherwise. 6562 6563.Valid Usage 6564**** 6565 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02413]] 6566 If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then 6567 pname:generalShader must: be a valid index into 6568 slink:VkRayTracingPipelineCreateInfoNV::pname:pStages referring to a 6569 shader of ename:VK_SHADER_STAGE_RAYGEN_BIT_NV, 6570 ename:VK_SHADER_STAGE_MISS_BIT_NV, or 6571 ename:VK_SHADER_STAGE_CALLABLE_BIT_NV 6572 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02414]] 6573 If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV then 6574 pname:closestHitShader, pname:anyHitShader, and pname:intersectionShader 6575 must: be ename:VK_SHADER_UNUSED_NV 6576 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02415]] 6577 If pname:type is 6578 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV then 6579 pname:intersectionShader must: be a valid index into 6580 slink:VkRayTracingPipelineCreateInfoNV::pname:pStages referring to a 6581 shader of ename:VK_SHADER_STAGE_INTERSECTION_BIT_NV 6582 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-type-02416]] 6583 If pname:type is 6584 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV then 6585 pname:intersectionShader must: be ename:VK_SHADER_UNUSED_NV 6586 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-closestHitShader-02417]] 6587 pname:closestHitShader must: be either ename:VK_SHADER_UNUSED_NV or a 6588 valid index into slink:VkRayTracingPipelineCreateInfoNV::pname:pStages 6589 referring to a shader of ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV 6590 * [[VUID-VkRayTracingShaderGroupCreateInfoNV-anyHitShader-02418]] 6591 pname:anyHitShader must: be either ename:VK_SHADER_UNUSED_NV or a valid 6592 index into slink:VkRayTracingPipelineCreateInfoNV::pname:pStages 6593 referring to a shader of ename:VK_SHADER_STAGE_ANY_HIT_BIT_NV 6594**** 6595 6596include::{generated}/validity/structs/VkRayTracingShaderGroupCreateInfoNV.adoc[] 6597-- 6598 6599endif::VK_NV_ray_tracing[] 6600 6601ifdef::VK_KHR_ray_tracing_pipeline[] 6602[open,refpage='VkRayTracingShaderGroupCreateInfoKHR',desc='Structure specifying shaders in a shader group',type='structs'] 6603-- 6604:refpage: VkRayTracingShaderGroupCreateInfoKHR 6605 6606The sname:VkRayTracingShaderGroupCreateInfoKHR structure is defined as: 6607 6608include::{generated}/api/structs/VkRayTracingShaderGroupCreateInfoKHR.adoc[] 6609 6610 * pname:sType is a elink:VkStructureType value identifying this structure. 6611 * pname:pNext is `NULL` or a pointer to a structure extending this 6612 structure. 6613 * pname:type is the type of hit group specified in this structure. 6614 * pname:generalShader is the index of the ray generation, miss, or 6615 callable shader from 6616 slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if 6617 the shader group has pname:type of 6618 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR, and 6619 ename:VK_SHADER_UNUSED_KHR otherwise. 6620 * pname:closestHitShader is the optional index of the closest hit shader 6621 from slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group 6622 if the shader group has pname:type of 6623 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or 6624 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and 6625 ename:VK_SHADER_UNUSED_KHR otherwise. 6626 * pname:anyHitShader is the optional index of the any-hit shader from 6627 slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if 6628 the shader group has pname:type of 6629 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR or 6630 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and 6631 ename:VK_SHADER_UNUSED_KHR otherwise. 6632 * pname:intersectionShader is the index of the intersection shader from 6633 slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages in the group if 6634 the shader group has pname:type of 6635 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, and 6636 ename:VK_SHADER_UNUSED_KHR otherwise. 6637 * pname:pShaderGroupCaptureReplayHandle is `NULL` or a pointer to replay 6638 information for this shader group queried from 6639 flink:vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, as described in 6640 <<ray-tracing-capture-replay, Ray Tracing Capture Replay>>. 6641 Ignored if 6642 slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay 6643 is ename:VK_FALSE. 6644 6645ifdef::VK_EXT_pipeline_library_group_handles[] 6646If the pipeline is created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and 6647the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>> 6648feature is enabled, pname:pShaderGroupCaptureReplayHandle is inherited by 6649all pipelines which link against this pipeline and remains bitwise identical 6650for any pipeline which references this pipeline library. 6651endif::VK_EXT_pipeline_library_group_handles[] 6652 6653.Valid Usage 6654**** 6655 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03474]] 6656 If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then 6657 pname:generalShader must: be a valid index into 6658 slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages referring to a 6659 shader of ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR, 6660 ename:VK_SHADER_STAGE_MISS_BIT_KHR, or 6661 ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR 6662 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03475]] 6663 If pname:type is ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR then 6664 pname:closestHitShader, pname:anyHitShader, and pname:intersectionShader 6665 must: be ename:VK_SHADER_UNUSED_KHR 6666 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03476]] 6667 If pname:type is 6668 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR then 6669 pname:intersectionShader must: be a valid index into 6670 slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages referring to a 6671 shader of ename:VK_SHADER_STAGE_INTERSECTION_BIT_KHR 6672 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-type-03477]] 6673 If pname:type is 6674 ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR then 6675 pname:intersectionShader must: be ename:VK_SHADER_UNUSED_KHR 6676 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-closestHitShader-03478]] 6677 pname:closestHitShader must: be either ename:VK_SHADER_UNUSED_KHR or a 6678 valid index into slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages 6679 referring to a shader of ename:VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR 6680 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-anyHitShader-03479]] 6681 pname:anyHitShader must: be either ename:VK_SHADER_UNUSED_KHR or a valid 6682 index into slink:VkRayTracingPipelineCreateInfoKHR::pname:pStages 6683 referring to a shader of ename:VK_SHADER_STAGE_ANY_HIT_BIT_KHR 6684 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03603]] 6685 If 6686 slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplayMixed 6687 is ename:VK_FALSE then pname:pShaderGroupCaptureReplayHandle must: not 6688 be provided if it has not been provided on a previous call to ray 6689 tracing pipeline creation 6690 * [[VUID-VkRayTracingShaderGroupCreateInfoKHR-rayTracingPipelineShaderGroupHandleCaptureReplayMixed-03604]] 6691 If 6692 slink:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplayMixed 6693 is ename:VK_FALSE then the caller must: guarantee that no ray tracing 6694 pipeline creation commands with pname:pShaderGroupCaptureReplayHandle 6695 provided execute simultaneously with ray tracing pipeline creation 6696 commands without pname:pShaderGroupCaptureReplayHandle provided 6697**** 6698 6699include::{generated}/validity/structs/VkRayTracingShaderGroupCreateInfoKHR.adoc[] 6700-- 6701endif::VK_KHR_ray_tracing_pipeline[] 6702 6703[open,refpage='VkRayTracingShaderGroupTypeKHR',desc='Shader group types',type='enums',alias='VkRayTracingShaderGroupTypeNV'] 6704-- 6705:refpage: VkRayTracingShaderGroupTypeKHR 6706 6707Possible values of pname:type in sname:VkRayTracingShaderGroupCreateInfoKHR 6708are: 6709 6710include::{generated}/api/enums/VkRayTracingShaderGroupTypeKHR.adoc[] 6711 6712ifdef::VK_NV_ray_tracing[] 6713or the equivalent 6714 6715include::{generated}/api/enums/VkRayTracingShaderGroupTypeNV.adoc[] 6716endif::VK_NV_ray_tracing[] 6717 6718 * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR indicates a shader 6719 group with a single ename:VK_SHADER_STAGE_RAYGEN_BIT_KHR, 6720 ename:VK_SHADER_STAGE_MISS_BIT_KHR, or 6721 ename:VK_SHADER_STAGE_CALLABLE_BIT_KHR shader in it. 6722 * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR specifies 6723 a shader group that only hits triangles and must: not contain an 6724 intersection shader, only closest hit and any-hit shaders. 6725 * ename:VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR 6726 specifies a shader group that only intersects with custom geometry and 6727 must: contain an intersection shader and may: contain closest hit and 6728 any-hit shaders. 6729 6730[NOTE] 6731.Note 6732==== 6733For current group types, the hit group type could be inferred from the 6734presence or absence of the intersection shader, but we provide the type 6735explicitly for future hit groups that do not have that property. 6736==== 6737-- 6738 6739ifdef::VK_KHR_ray_tracing_pipeline[] 6740[open,refpage='VkRayTracingPipelineInterfaceCreateInfoKHR',desc='Structure specifying additional interface information when using libraries',type='structs'] 6741-- 6742:refpage: VkRayTracingPipelineInterfaceCreateInfoKHR 6743 6744The sname:VkRayTracingPipelineInterfaceCreateInfoKHR structure is defined 6745as: 6746 6747include::{generated}/api/structs/VkRayTracingPipelineInterfaceCreateInfoKHR.adoc[] 6748 6749 * pname:sType is a elink:VkStructureType value identifying this structure. 6750 * pname:pNext is `NULL` or a pointer to a structure extending this 6751 structure. 6752 * pname:maxPipelineRayPayloadSize is the maximum payload size in bytes 6753 used by any shader in the pipeline. 6754 * pname:maxPipelineRayHitAttributeSize is the maximum attribute structure 6755 size in bytes used by any shader in the pipeline. 6756 6757pname:maxPipelineRayPayloadSize is calculated as the maximum number of bytes 6758used by any block declared in the code:RayPayloadKHR or 6759code:IncomingRayPayloadKHR storage classes. 6760pname:maxPipelineRayHitAttributeSize is calculated as the maximum number of 6761bytes used by any block declared in the code:HitAttributeKHR storage class. 6762As variables in these storage classes do not have explicit offsets, the size 6763should be calculated as if each variable has a 6764<<interfaces-alignment-requirements, scalar alignment>> equal to the largest 6765scalar alignment of any of the block's members. 6766 6767[NOTE] 6768.Note 6769==== 6770There is no explicit upper limit for pname:maxPipelineRayPayloadSize, but in 6771practice it should be kept as small as possible. 6772Similar to invocation local memory, it must be allocated for each shader 6773invocation and for devices which support many simultaneous invocations, this 6774storage can rapidly be exhausted, resulting in failure. 6775==== 6776 6777.Valid Usage 6778**** 6779 * [[VUID-VkRayTracingPipelineInterfaceCreateInfoKHR-maxPipelineRayHitAttributeSize-03605]] 6780 pname:maxPipelineRayHitAttributeSize must: be less than or equal to 6781 slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:maxRayHitAttributeSize 6782**** 6783 6784include::{generated}/validity/structs/VkRayTracingPipelineInterfaceCreateInfoKHR.adoc[] 6785-- 6786endif::VK_KHR_ray_tracing_pipeline[] 6787 6788[open,refpage='vkGetRayTracingShaderGroupHandlesKHR',desc='Query ray tracing pipeline shader group handles',type='protos',alias='vkGetRayTracingShaderGroupHandlesNV'] 6789-- 6790:refpage: vkGetRayTracingShaderGroupHandlesKHR 6791 6792To query the opaque handles of shaders in the ray tracing pipeline, call: 6793 6794ifdef::VK_KHR_ray_tracing_pipeline[] 6795include::{generated}/api/protos/vkGetRayTracingShaderGroupHandlesKHR.adoc[] 6796endif::VK_KHR_ray_tracing_pipeline[] 6797 6798ifdef::VK_KHR_ray_tracing_pipeline+VK_NV_ray_tracing[or the equivalent command] 6799 6800ifdef::VK_NV_ray_tracing[] 6801include::{generated}/api/protos/vkGetRayTracingShaderGroupHandlesNV.adoc[] 6802endif::VK_NV_ray_tracing[] 6803 6804 * pname:device is the logical device containing the ray tracing pipeline. 6805 * pname:pipeline is the ray tracing pipeline object containing the 6806 shaders. 6807 * pname:firstGroup is the index of the first group to retrieve a handle 6808 for from the 6809ifdef::VK_KHR_ray_tracing_pipeline[] 6810slink:VkRayTracingPipelineCreateInfoKHR::pname:pGroups 6811endif::VK_KHR_ray_tracing_pipeline[] 6812ifdef::VK_KHR_ray_tracing_pipeline+VK_NV_ray_tracing[or] 6813ifdef::VK_NV_ray_tracing[] 6814slink:VkRayTracingPipelineCreateInfoNV::pname:pGroups 6815endif::VK_NV_ray_tracing[] 6816 array. 6817 * pname:groupCount is the number of shader handles to retrieve. 6818 * pname:dataSize is the size in bytes of the buffer pointed to by 6819 pname:pData. 6820 * pname:pData is a pointer to a user-allocated buffer where the results 6821 will be written. 6822 6823ifdef::VK_EXT_pipeline_library_group_handles[] 6824If pname:pipeline was created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6825and the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>> 6826feature is enabled applications can: query group handles from that pipeline, 6827even if the pipeline is a library and is never bound to a command buffer. 6828These group handles remain bitwise identical for any pname:pipeline which 6829references the pipeline library. 6830Group indices are assigned as-if the pipeline was created without 6831ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR. 6832endif::VK_EXT_pipeline_library_group_handles[] 6833 6834.Valid Usage 6835**** 6836 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-04619]] 6837 pname:pipeline must: be a ray tracing pipeline 6838 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-04050]] 6839 pname:firstGroup must: be less than the number of shader groups in 6840 pname:pipeline 6841 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-firstGroup-02419]] 6842 The sum of pname:firstGroup and pname:groupCount must: be less than or 6843 equal to the number of shader groups in pname:pipeline 6844 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-dataSize-02420]] 6845 pname:dataSize must: be at least 6846 [eq]#slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleSize 6847 {times} pname:groupCount# 6848ifdef::VK_KHR_pipeline_library[] 6849ifdef::VK_EXT_pipeline_library_group_handles[] 6850 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-07828]] 6851 If the 6852 <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>> 6853 feature is not enabled, pname:pipeline must: not have been created with 6854 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6855endif::VK_EXT_pipeline_library_group_handles[] 6856ifndef::VK_EXT_pipeline_library_group_handles[] 6857 * [[VUID-vkGetRayTracingShaderGroupHandlesKHR-pipeline-03482]] 6858 pname:pipeline must: not have been created with 6859 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6860endif::VK_EXT_pipeline_library_group_handles[] 6861endif::VK_KHR_pipeline_library[] 6862**** 6863 6864include::{generated}/validity/protos/vkGetRayTracingShaderGroupHandlesKHR.adoc[] 6865-- 6866 6867ifdef::VK_KHR_ray_tracing_pipeline[] 6868[open,refpage='vkGetRayTracingCaptureReplayShaderGroupHandlesKHR',desc='Query opaque capture replay data for pipeline shader group handles',type='protos'] 6869-- 6870:refpage: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR 6871 6872To query the opaque capture data of shader groups in a ray tracing pipeline, 6873call: 6874 6875include::{generated}/api/protos/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.adoc[] 6876 6877 * pname:device is the logical device containing the ray tracing pipeline. 6878 * pname:pipeline is the ray tracing pipeline object containing the 6879 shaders. 6880 * pname:firstGroup is the index of the first group to retrieve a handle 6881 for from the slink:VkRayTracingPipelineCreateInfoKHR::pname:pGroups 6882 array. 6883 * pname:groupCount is the number of shader handles to retrieve. 6884 * pname:dataSize is the size in bytes of the buffer pointed to by 6885 pname:pData. 6886 * pname:pData is a pointer to a user-allocated buffer where the results 6887 will be written. 6888 6889Once queried, this opaque data can: be provided at pipeline creation time 6890(in a subsequent execution), using 6891slink:VkRayTracingShaderGroupCreateInfoKHR::pname:pShaderGroupCaptureReplayHandle, 6892as described in <<ray-tracing-capture-replay, Ray Tracing Capture Replay>>. 6893 6894ifdef::VK_EXT_pipeline_library_group_handles[] 6895If pname:pipeline was created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6896and the <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>> 6897feature is enabled applications can: query capture replay group handles from 6898that pipeline. 6899The capture replay handle remains bitwise identical for any pname:pipeline 6900which references the pipeline library. 6901Group indices are assigned as-if the pipeline was created without 6902ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR. 6903endif::VK_EXT_pipeline_library_group_handles[] 6904 6905.Valid Usage 6906**** 6907 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-04620]] 6908 pname:pipeline must: be a ray tracing pipeline 6909 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-04051]] 6910 pname:firstGroup must: be less than the number of shader groups in 6911 pname:pipeline 6912 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-firstGroup-03483]] 6913 The sum of pname:firstGroup and pname:groupCount must: be less than or 6914 equal to the number of shader groups in pname:pipeline 6915 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-dataSize-03484]] 6916 pname:dataSize must: be at least 6917 [eq]#slink:VkPhysicalDeviceRayTracingPipelinePropertiesKHR::pname:shaderGroupHandleCaptureReplaySize 6918 {times} pname:groupCount# 6919 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-rayTracingPipelineShaderGroupHandleCaptureReplay-03606]] 6920 sname:VkPhysicalDeviceRayTracingPipelineFeaturesKHR::pname:rayTracingPipelineShaderGroupHandleCaptureReplay 6921 must: be enabled to call this function 6922 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-03607]] 6923 pname:pipeline must: have been created with a pname:flags that included 6924 ename:VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR 6925ifdef::VK_KHR_pipeline_library[] 6926ifdef::VK_EXT_pipeline_library_group_handles[] 6927 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-07829]] 6928 If the 6929 <<features-pipelineLibraryGroupHandles,pipelineLibraryGroupHandles>> 6930 feature is not enabled, pname:pipeline must: not have been created with 6931 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6932endif::VK_EXT_pipeline_library_group_handles[] 6933ifndef::VK_EXT_pipeline_library_group_handles[] 6934 * [[VUID-vkGetRayTracingCaptureReplayShaderGroupHandlesKHR-pipeline-07830]] 6935 pname:pipeline must: not have been created with 6936 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 6937endif::VK_EXT_pipeline_library_group_handles[] 6938endif::VK_KHR_pipeline_library[] 6939**** 6940 6941include::{generated}/validity/protos/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.adoc[] 6942-- 6943endif::VK_KHR_ray_tracing_pipeline[] 6944 6945ifdef::VK_NV_ray_tracing[] 6946Ray tracing pipelines can: contain more shaders than a graphics or compute 6947pipeline, so to allow parallel compilation of shaders within a pipeline, an 6948application can: choose to defer compilation until a later point in time. 6949 6950[open,refpage='vkCompileDeferredNV',desc='Deferred compilation of shaders',type='protos'] 6951-- 6952:refpage: vkCompileDeferredNV 6953 6954To compile a deferred shader in a pipeline call: 6955 6956include::{generated}/api/protos/vkCompileDeferredNV.adoc[] 6957 6958 * pname:device is the logical device containing the ray tracing pipeline. 6959 * pname:pipeline is the ray tracing pipeline object containing the 6960 shaders. 6961 * pname:shader is the index of the shader to compile. 6962 6963.Valid Usage 6964**** 6965 * [[VUID-vkCompileDeferredNV-pipeline-04621]] 6966 pname:pipeline must: be a ray tracing pipeline 6967 * [[VUID-vkCompileDeferredNV-pipeline-02237]] 6968 pname:pipeline must: have been created with 6969 ename:VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV 6970 * [[VUID-vkCompileDeferredNV-shader-02238]] 6971 pname:shader must: not have been called as a deferred compile before 6972**** 6973 6974include::{generated}/validity/protos/vkCompileDeferredNV.adoc[] 6975-- 6976endif::VK_NV_ray_tracing[] 6977 6978ifdef::VK_KHR_ray_tracing_pipeline[] 6979[open,refpage='vkGetRayTracingShaderGroupStackSizeKHR',desc='Query ray tracing pipeline shader group shader stack size',type='protos'] 6980-- 6981To query the pipeline stack size of shaders in a shader group in the ray 6982tracing pipeline, call: 6983 6984include::{generated}/api/protos/vkGetRayTracingShaderGroupStackSizeKHR.adoc[] 6985 6986 * pname:device is the logical device containing the ray tracing pipeline. 6987 * pname:pipeline is the ray tracing pipeline object containing the shaders 6988 groups. 6989 * pname:group is the index of the shader group to query. 6990 * pname:groupShader is the type of shader from the group to query. 6991 6992The return value is the ray tracing pipeline stack size in bytes for the 6993specified shader as called from the specified shader group. 6994 6995.Valid Usage 6996**** 6997 * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-pipeline-04622]] 6998 pname:pipeline must: be a ray tracing pipeline 6999 * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-group-03608]] 7000 The value of pname:group must be less than the number of shader groups 7001 in pname:pipeline 7002 * [[VUID-vkGetRayTracingShaderGroupStackSizeKHR-groupShader-03609]] 7003 The shader identified by pname:groupShader in pname:group must: not be 7004 ename:VK_SHADER_UNUSED_KHR 7005**** 7006 7007include::{generated}/validity/protos/vkGetRayTracingShaderGroupStackSizeKHR.adoc[] 7008-- 7009 7010[open,refpage='VkShaderGroupShaderKHR',desc='Shader group shaders',type='enums'] 7011-- 7012Possible values of pname:groupShader in 7013flink:vkGetRayTracingShaderGroupStackSizeKHR are: 7014 7015include::{generated}/api/enums/VkShaderGroupShaderKHR.adoc[] 7016 7017 * ename:VK_SHADER_GROUP_SHADER_GENERAL_KHR uses the shader specified in 7018 the group with 7019 slink:VkRayTracingShaderGroupCreateInfoKHR::pname:generalShader 7020 * ename:VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR uses the shader specified 7021 in the group with 7022 slink:VkRayTracingShaderGroupCreateInfoKHR::pname:closestHitShader 7023 * ename:VK_SHADER_GROUP_SHADER_ANY_HIT_KHR uses the shader specified in 7024 the group with 7025 slink:VkRayTracingShaderGroupCreateInfoKHR::pname:anyHitShader 7026 * ename:VK_SHADER_GROUP_SHADER_INTERSECTION_KHR uses the shader specified 7027 in the group with 7028 slink:VkRayTracingShaderGroupCreateInfoKHR::pname:intersectionShader 7029-- 7030 7031[open,refpage='vkCmdSetRayTracingPipelineStackSizeKHR',desc='Set the stack size dynamically for a ray tracing pipeline',type='protos'] 7032-- 7033:refpage: vkCmdSetRayTracingPipelineStackSizeKHR 7034 7035To <<pipelines-dynamic-state, dynamically set>> the stack size for a ray 7036tracing pipeline, call: 7037 7038include::{generated}/api/protos/vkCmdSetRayTracingPipelineStackSizeKHR.adoc[] 7039 7040 * pname:commandBuffer is the command buffer into which the command will be 7041 recorded. 7042 * pname:pipelineStackSize is the stack size to use for subsequent ray 7043 tracing trace commands. 7044 7045This command sets the stack size for subsequent ray tracing commands when 7046the ray tracing pipeline is created with 7047ename:VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR set in 7048slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates. 7049Otherwise, the stack size is computed as described in 7050<<ray-tracing-pipeline-stack, Ray Tracing Pipeline Stack>>. 7051 7052.Valid Usage 7053**** 7054 * [[VUID-vkCmdSetRayTracingPipelineStackSizeKHR-pipelineStackSize-03610]] 7055 pname:pipelineStackSize must: be large enough for any dynamic execution 7056 through the shaders in the ray tracing pipeline used by a subsequent 7057 trace call 7058**** 7059include::{generated}/validity/protos/vkCmdSetRayTracingPipelineStackSizeKHR.adoc[] 7060-- 7061endif::VK_KHR_ray_tracing_pipeline[] 7062endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 7063 7064 7065[[pipelines-destruction]] 7066== Pipeline Destruction 7067 7068[open,refpage='vkDestroyPipeline',desc='Destroy a pipeline object',type='protos'] 7069-- 7070To destroy a pipeline, call: 7071 7072include::{generated}/api/protos/vkDestroyPipeline.adoc[] 7073 7074 * pname:device is the logical device that destroys the pipeline. 7075 * pname:pipeline is the handle of the pipeline to destroy. 7076 * pname:pAllocator controls host memory allocation as described in the 7077 <<memory-allocation, Memory Allocation>> chapter. 7078 7079.Valid Usage 7080**** 7081 * [[VUID-vkDestroyPipeline-pipeline-00765]] 7082 All submitted commands that refer to pname:pipeline must: have completed 7083 execution 7084ifndef::VKSC_VERSION_1_0[] 7085 * [[VUID-vkDestroyPipeline-pipeline-00766]] 7086 If sname:VkAllocationCallbacks were provided when pname:pipeline was 7087 created, a compatible set of callbacks must: be provided here 7088 * [[VUID-vkDestroyPipeline-pipeline-00767]] 7089 If no sname:VkAllocationCallbacks were provided when pname:pipeline was 7090 created, pname:pAllocator must: be `NULL` 7091endif::VKSC_VERSION_1_0[] 7092**** 7093 7094include::{generated}/validity/protos/vkDestroyPipeline.adoc[] 7095-- 7096 7097 7098[[pipelines-multiple]] 7099== Multiple Pipeline Creation 7100 7101Multiple pipelines can: be created simultaneously by passing an array of 7102slink:VkGraphicsPipelineCreateInfo, 7103ifdef::VK_KHR_ray_tracing_pipeline[slink:VkRayTracingPipelineCreateInfoKHR,] 7104ifdef::VK_NV_ray_tracing[slink:VkRayTracingPipelineCreateInfoNV,] 7105or slink:VkComputePipelineCreateInfo structures into the 7106flink:vkCreateGraphicsPipelines, 7107ifdef::VK_KHR_ray_tracing_pipeline[flink:vkCreateRayTracingPipelinesKHR,] 7108ifdef::VK_NV_ray_tracing[flink:vkCreateRayTracingPipelinesNV,] 7109and flink:vkCreateComputePipelines commands, respectively. 7110Applications can: group together similar pipelines to be created in a single 7111call, and implementations are encouraged to look for reuse opportunities 7112within a group-create. 7113 7114When an application attempts to create many pipelines in a single command, 7115it is possible that some subset may: fail creation. 7116In that case, the corresponding entries in the pname:pPipelines output array 7117will be filled with dlink:VK_NULL_HANDLE values. 7118If any pipeline fails creation despite valid arguments (for example, due to 7119out of memory errors), the elink:VkResult code returned by 7120ftext:vkCreate*Pipelines will indicate why. 7121The implementation will attempt to create all pipelines, and only return 7122dlink:VK_NULL_HANDLE values for those that actually failed. 7123 7124ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7125If creation fails for a pipeline that had 7126ename:VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT set, pipelines at an 7127index in the pname:pPipelines array greater than or equal to that of the 7128failing pipeline must: be set to dlink:VK_NULL_HANDLE. 7129endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7130 7131If multiple pipelines fail to be created, the elink:VkResult must: be the 7132return value of any of the pipelines which did not return ename:VK_SUCCESS. 7133 7134 7135[[pipelines-pipeline-derivatives]] 7136== Pipeline Derivatives 7137 7138 7139A pipeline derivative is a child pipeline created from a parent pipeline, 7140where the child and parent are expected to have much commonality. 7141 7142ifndef::VKSC_VERSION_1_0[] 7143The goal of derivative pipelines is that they be cheaper to create using the 7144parent as a starting point, and that it be more efficient (on either host or 7145device) to switch/bind between children of the same parent. 7146 7147A derivative pipeline is created by setting the 7148ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag in the 7149stext:Vk*PipelineCreateInfo structure. 7150If this is set, then exactly one of pname:basePipelineHandle or 7151pname:basePipelineIndex members of the structure must: have a valid 7152handle/index, and specifies the parent pipeline. 7153If pname:basePipelineHandle is used, the parent pipeline must: have already 7154been created. 7155If pname:basePipelineIndex is used, then the parent is being created in the 7156same command. 7157dlink:VK_NULL_HANDLE acts as the invalid handle for 7158pname:basePipelineHandle, and -1 is the invalid index for 7159pname:basePipelineIndex. 7160If pname:basePipelineIndex is used, the base pipeline must: appear earlier 7161in the array. 7162The base pipeline must: have been created with the 7163ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag set. 7164endif::VKSC_VERSION_1_0[] 7165ifdef::VKSC_VERSION_1_0[] 7166Pipeline derivatives are not supported in Vulkan SC due to the use of 7167read-only offline generated pipeline caches <<SCID-8>>. 7168endif::VKSC_VERSION_1_0[] 7169 7170[[pipelines-cache]] 7171== Pipeline Cache 7172 7173[open,refpage='VkPipelineCache',desc='Opaque handle to a pipeline cache object',type='handles'] 7174-- 7175ifndef::VKSC_VERSION_1_0[] 7176Pipeline cache objects allow the result of pipeline construction to be 7177reused between pipelines and between runs of an application. 7178Reuse between pipelines is achieved by passing the same pipeline cache 7179object when creating multiple related pipelines. 7180Reuse across runs of an application is achieved by retrieving pipeline cache 7181contents in one run of an application, saving the contents, and using them 7182to preinitialize a pipeline cache on a subsequent run. 7183The contents of the pipeline cache objects are managed by the 7184implementation. 7185Applications can: manage the host memory consumed by a pipeline cache object 7186and control the amount of data retrieved from a pipeline cache object. 7187endif::VKSC_VERSION_1_0[] 7188ifdef::VKSC_VERSION_1_0[] 7189Pipeline cache objects allow the application to load multiple binary 7190pipeline objects generated by an offline cache creation tool into pipeline 7191cache objects. 7192The cache can then be used during pipeline creation to load offline pipeline 7193data. 7194endif::VKSC_VERSION_1_0[] 7195 7196Pipeline cache objects are represented by sname:VkPipelineCache handles: 7197 7198include::{generated}/api/handles/VkPipelineCache.adoc[] 7199-- 7200 7201 7202[[pipelines-cache-create]] 7203=== Creating a Pipeline Cache 7204 7205[open,refpage='vkCreatePipelineCache',desc='Creates a new pipeline cache',type='protos'] 7206-- 7207:refpage: vkCreatePipelineCache 7208:objectnameplural: pipeline caches 7209:objectnamecamelcase: pipelineCache 7210:objectcount: 1 7211 7212To create pipeline cache objects, call: 7213 7214include::{generated}/api/protos/vkCreatePipelineCache.adoc[] 7215 7216 * pname:device is the logical device that creates the pipeline cache 7217 object. 7218 * pname:pCreateInfo is a pointer to a slink:VkPipelineCacheCreateInfo 7219 structure containing initial parameters for the pipeline cache object. 7220 * pname:pAllocator controls host memory allocation as described in the 7221 <<memory-allocation, Memory Allocation>> chapter. 7222 * pname:pPipelineCache is a pointer to a slink:VkPipelineCache handle in 7223 which the resulting pipeline cache object is returned. 7224 7225ifndef::VKSC_VERSION_1_0[] 7226[NOTE] 7227.Note 7228==== 7229Applications can: track and manage the total host memory size of a pipeline 7230cache object using the pname:pAllocator. 7231Applications can: limit the amount of data retrieved from a pipeline cache 7232object in fname:vkGetPipelineCacheData. 7233Implementations should: not internally limit the total number of entries 7234added to a pipeline cache object or the total host memory consumed. 7235==== 7236endif::VKSC_VERSION_1_0[] 7237 7238ifdef::VKSC_VERSION_1_0[] 7239If the pipeline cache data pointed to by 7240slink:VkPipelineCacheCreateInfo::pname:pInitialData is not compatible with 7241the device, pipeline cache creation will fail and 7242ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA will be returned. 7243endif::VKSC_VERSION_1_0[] 7244 7245Once created, a pipeline cache can: be passed to the 7246flink:vkCreateGraphicsPipelines 7247ifdef::VK_KHR_ray_tracing_pipeline[flink:vkCreateRayTracingPipelinesKHR,] 7248ifdef::VK_NV_ray_tracing[flink:vkCreateRayTracingPipelinesNV,] 7249and flink:vkCreateComputePipelines commands. 7250ifndef::VKSC_VERSION_1_0[] 7251If the pipeline cache passed into these commands is not 7252dlink:VK_NULL_HANDLE, the implementation will query it for possible reuse 7253opportunities and update it with new content. 7254endif::VKSC_VERSION_1_0[] 7255ifdef::VKSC_VERSION_1_0[] 7256The pipeline cache passed into these commands will be queried by the 7257implementation for matching pipelines on pipeline creation. 7258After the cache is created, its contents cannot be updated. 7259endif::VKSC_VERSION_1_0[] 7260The use of the pipeline cache object in these commands is internally 7261synchronized, and the same pipeline cache object can: be used in multiple 7262threads simultaneously. 7263 7264ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7265If pname:flags of pname:pCreateInfo includes 7266ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, all commands 7267that modify the returned pipeline cache object must: be 7268<<fundamentals-threadingbehavior,externally synchronized>>. 7269endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7270 7271ifndef::VKSC_VERSION_1_0[] 7272[NOTE] 7273.Note 7274==== 7275Implementations should: make every effort to limit any critical sections to 7276the actual accesses to the cache, which is expected to be significantly 7277shorter than the duration of the ftext:vkCreate*Pipelines commands. 7278==== 7279endif::VKSC_VERSION_1_0[] 7280 7281include::{chapters}/commonvalidity/no_dynamic_allocations_common.adoc[] 7282 7283ifdef::VKSC_VERSION_1_0[] 7284.Valid Usage 7285**** 7286 * [[VUID-vkCreatePipelineCache-pCreateInfo-05045]] 7287 The contents of the structure pointed to by pname:pCreateInfo and the 7288 data pointed to by pname:pCreateInfo->pInitialData must: be the same as 7289 specified in one of the 7290 slink:VkDeviceObjectReservationCreateInfo::pname:pPipelineCacheCreateInfos 7291 structures when the device was created 7292include::{chapters}/commonvalidity/memory_reservation_request_count_common.adoc[] 7293**** 7294endif::VKSC_VERSION_1_0[] 7295 7296include::{generated}/validity/protos/vkCreatePipelineCache.adoc[] 7297-- 7298 7299[open,refpage='VkPipelineCacheCreateInfo',desc='Structure specifying parameters of a newly created pipeline cache',type='structs'] 7300-- 7301The sname:VkPipelineCacheCreateInfo structure is defined as: 7302 7303include::{generated}/api/structs/VkPipelineCacheCreateInfo.adoc[] 7304 7305 * pname:sType is a elink:VkStructureType value identifying this structure. 7306 * pname:pNext is `NULL` or a pointer to a structure extending this 7307 structure. 7308ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7309 * pname:flags is a bitmask of elink:VkPipelineCacheCreateFlagBits 7310 specifying the behavior of the pipeline cache. 7311endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7312ifndef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7313 * pname:flags is reserved for future use. 7314endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7315 * pname:initialDataSize is the number of bytes in pname:pInitialData. 7316ifndef::VKSC_VERSION_1_0[] 7317 If pname:initialDataSize is zero, the pipeline cache will initially be 7318 empty. 7319 * pname:pInitialData is a pointer to previously retrieved pipeline cache 7320 data. 7321 If the pipeline cache data is incompatible (as defined below) with the 7322 device, the pipeline cache will be initially empty. 7323 If pname:initialDataSize is zero, pname:pInitialData is ignored. 7324endif::VKSC_VERSION_1_0[] 7325ifdef::VKSC_VERSION_1_0[] 7326 * pname:pInitialData is a pointer to pipeline cache data that has been 7327 generated offline. 7328 If the pipeline cache data is incompatible (as defined below) with the 7329 device, ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA is returned. 7330ifdef::hidden[] 7331// tag::scdeviation[] 7332 * slink:VkPipelineCacheCreateInfo::pname:pInitialData must: point to a 7333 valid pipeline cache that has been generated offline <<SCID-1>>, 7334 <<SCID-8>>. 7335// end::scdeviation[] 7336endif::hidden[] 7337endif::VKSC_VERSION_1_0[] 7338 7339.Valid Usage 7340**** 7341ifndef::VKSC_VERSION_1_0[] 7342 * [[VUID-VkPipelineCacheCreateInfo-initialDataSize-00768]] 7343 If pname:initialDataSize is not `0`, it must: be equal to the size of 7344 pname:pInitialData, as returned by fname:vkGetPipelineCacheData when 7345 pname:pInitialData was originally retrieved 7346 * [[VUID-VkPipelineCacheCreateInfo-initialDataSize-00769]] 7347 If pname:initialDataSize is not `0`, pname:pInitialData must: have been 7348 retrieved from a previous call to fname:vkGetPipelineCacheData 7349endif::VKSC_VERSION_1_0[] 7350ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7351 * [[VUID-VkPipelineCacheCreateInfo-pipelineCreationCacheControl-02892]] 7352 If the <<features-pipelineCreationCacheControl, 7353 pname:pipelineCreationCacheControl>> feature is not enabled, pname:flags 7354 must: not include 7355 ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT 7356endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7357ifdef::VKSC_VERSION_1_0[] 7358 * [[VUID-VkPipelineCacheCreateInfo-flags-05043]] 7359 pname:flags must: include ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT 7360 * [[VUID-VkPipelineCacheCreateInfo-flags-05044]] 7361 pname:flags must: include 7362 ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT 7363 * [[VUID-VkPipelineCacheCreateInfo-pInitialData-05139]] 7364 The pipeline cache data pointed to by pname:pInitialData must: not 7365 contain any pipelines with duplicate pipeline identifiers. 7366endif::VKSC_VERSION_1_0[] 7367**** 7368ifdef::VKSC_VERSION_1_0[] 7369ifdef::hidden[] 7370// tag::scdeviation[] 7371 * slink:VkPipelineCacheCreateInfo::pname:initialDataSize must: not be `0` 7372 <<SCID-1>>, <<SCID-8>>. 7373 * slink:VkPipelineCacheCreateInfo::pname:pInitialData must: not be `NULL` 7374 <<SCID-1>>, <<SCID-8>>. 7375 * slink:VkPipelineCacheCreateInfo::pname:flags must: include 7376 ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT <<SCID-1>>, <<SCID-8>>. 7377 * slink:VkPipelineCacheCreateInfo::pname:flags must: include 7378 ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT <<SCID-2>>. 7379 * The contents of slink:VkPipelineCacheCreateInfo, including the data 7380 pointed to by slink:VkPipelineCacheCreateInfo::pname:pInitialData, 7381 passed to flink:vkCreatePipelineCache must: be the same as specified in 7382 one of the 7383 slink:VkDeviceObjectReservationCreateInfo::pname:pPipelineCacheCreateInfos 7384 structures when the device was created <<SCID-1>>. 7385// end::scdeviation[] 7386endif::hidden[] 7387endif::VKSC_VERSION_1_0[] 7388 7389include::{generated}/validity/structs/VkPipelineCacheCreateInfo.adoc[] 7390-- 7391 7392[open,refpage='VkPipelineCacheCreateFlags', desc='Bitmask of VkPipelineCreateFlagBits', type='flags'] 7393-- 7394include::{generated}/api/flags/VkPipelineCacheCreateFlags.adoc[] 7395 7396ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7397tname:VkPipelineCacheCreateFlags is a bitmask type for setting a mask of 7398zero or more elink:VkPipelineCacheCreateFlagBits. 7399endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7400ifndef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7401tname:VkPipelineCacheCreateFlags is a bitmask type for setting a mask, but 7402is currently reserved for future use. 7403endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7404-- 7405 7406ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7407[open,refpage='VkPipelineCacheCreateFlagBits',desc='Bitmask specifying the behavior of the pipeline cache',type='enums'] 7408-- 7409Bits which can: be set in slink:VkPipelineCacheCreateInfo::pname:flags, 7410specifying behavior of the pipeline cache, are: 7411 7412include::{generated}/api/enums/VkPipelineCacheCreateFlagBits.adoc[] 7413 7414ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7415 * ename:VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT specifies 7416 that all commands that modify the created slink:VkPipelineCache will be 7417 <<fundamentals-threadingbehavior,externally synchronized>>. 7418 When set, the implementation may: skip any unnecessary processing needed 7419 to support simultaneous modification from multiple threads where 7420 allowed. 7421endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control[] 7422ifdef::VKSC_VERSION_1_0[] 7423 * ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT specifies that the new 7424 pipeline cache will be read-only. 7425 * ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT specifies 7426 that the application will maintain the contents of the memory pointed to 7427 by pname:pInitialData for the lifetime of the pipeline cache object 7428 created, avoiding the need for the implementation to make a copy of the 7429 data. 7430 The memory pointed to by pname:pInitialData can: be modified or released 7431 by the application only after any pipeline cache objects created using 7432 it have been destroyed. 7433ifdef::hidden[] 7434// tag::scaddition[] 7435 * extending elink:VkPipelineCacheCreateFlagBits 7436 ** ename:VK_PIPELINE_CACHE_CREATE_READ_ONLY_BIT <<SCID-1>>, <<SCID-8>> 7437 ** ename:VK_PIPELINE_CACHE_CREATE_USE_APPLICATION_STORAGE_BIT <<SCID-2>> 7438// end::scaddition[] 7439endif::hidden[] 7440endif::VKSC_VERSION_1_0[] 7441-- 7442endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_cache_control,VKSC_VERSION_1_0[] 7443 7444ifdef::VKSC_VERSION_1_0[] 7445ifdef::hidden[] 7446// tag::scremoved[] 7447 * fname:vkMergePipelineCaches, fname:vkGetPipelineCacheData <<SCID-1>>, 7448 <<SCID-8>> 7449// end::scremoved[] 7450endif::hidden[] 7451endif::VKSC_VERSION_1_0[] 7452ifndef::VKSC_VERSION_1_0[] 7453 7454 7455[[pipelines-cache-merge]] 7456=== Merging Pipeline Caches 7457 7458[open,refpage='vkMergePipelineCaches',desc='Combine the data stores of pipeline caches',type='protos'] 7459-- 7460Pipeline cache objects can: be merged using the command: 7461 7462include::{generated}/api/protos/vkMergePipelineCaches.adoc[] 7463 7464 * pname:device is the logical device that owns the pipeline cache objects. 7465 * pname:dstCache is the handle of the pipeline cache to merge results 7466 into. 7467 * pname:srcCacheCount is the length of the pname:pSrcCaches array. 7468 * pname:pSrcCaches is a pointer to an array of pipeline cache handles, 7469 which will be merged into pname:dstCache. 7470 The previous contents of pname:dstCache are included after the merge. 7471 7472[NOTE] 7473.Note 7474==== 7475The details of the merge operation are implementation-dependent, but 7476implementations should: merge the contents of the specified pipelines and 7477prune duplicate entries. 7478==== 7479 7480.Valid Usage 7481**** 7482 * [[VUID-vkMergePipelineCaches-dstCache-00770]] 7483 pname:dstCache must: not appear in the list of source caches 7484**** 7485 7486include::{generated}/validity/protos/vkMergePipelineCaches.adoc[] 7487-- 7488endif::VKSC_VERSION_1_0[] 7489ifndef::VKSC_VERSION_1_0[] 7490 7491 7492[[pipelines-cache-retrieval]] 7493=== Retrieving Pipeline Cache Data 7494 7495[open,refpage='vkGetPipelineCacheData',desc='Get the data store from a pipeline cache',type='protos'] 7496-- 7497Data can: be retrieved from a pipeline cache object using the command: 7498 7499include::{generated}/api/protos/vkGetPipelineCacheData.adoc[] 7500 7501 * pname:device is the logical device that owns the pipeline cache. 7502 * pname:pipelineCache is the pipeline cache to retrieve data from. 7503 * pname:pDataSize is a pointer to a code:size_t value related to the 7504 amount of data in the pipeline cache, as described below. 7505 * pname:pData is either `NULL` or a pointer to a buffer. 7506 7507If pname:pData is `NULL`, then the maximum size of the data that can: be 7508retrieved from the pipeline cache, in bytes, is returned in pname:pDataSize. 7509Otherwise, pname:pDataSize must: point to a variable set by the user to the 7510size of the buffer, in bytes, pointed to by pname:pData, and on return the 7511variable is overwritten with the amount of data actually written to 7512pname:pData. 7513If pname:pDataSize is less than the maximum size that can: be retrieved by 7514the pipeline cache, at most pname:pDataSize bytes will be written to 7515pname:pData, and ename:VK_INCOMPLETE will be returned instead of 7516ename:VK_SUCCESS, to indicate that not all of the pipeline cache was 7517returned. 7518 7519Any data written to pname:pData is valid and can: be provided as the 7520pname:pInitialData member of the slink:VkPipelineCacheCreateInfo structure 7521passed to fname:vkCreatePipelineCache. 7522 7523Two calls to fname:vkGetPipelineCacheData with the same parameters must: 7524retrieve the same data unless a command that modifies the contents of the 7525cache is called between them. 7526 7527The initial bytes written to pname:pData must: be a header as described in 7528the <<pipelines-cache-header, Pipeline Cache Header>> section. 7529 7530If pname:pDataSize is less than what is necessary to store this header, 7531nothing will be written to pname:pData and zero will be written to 7532pname:pDataSize. 7533 7534include::{generated}/validity/protos/vkGetPipelineCacheData.adoc[] 7535-- 7536endif::VKSC_VERSION_1_0[] 7537 7538 7539[[pipelines-cache-header]] 7540=== Pipeline Cache Header 7541 7542ifdef::VKSC_VERSION_1_0[] 7543Applications must: load data from <<pipelines-offline-compilation,offline 7544compiled>> pipeline caches into pipeline cache objects. 7545The results of pipeline compilations may: depend on the vendor ID, device 7546ID, driver version, and other details of the target device. 7547To allow detection of pipeline cache data that is incompatible with the 7548device, the pipeline cache data must: begin with a valid pipeline cache 7549header. 7550endif::VKSC_VERSION_1_0[] 7551 7552ifndef::VKSC_VERSION_1_0[] 7553Applications can: store the data retrieved from the pipeline cache, and use 7554these data, possibly in a future run of the application, to populate new 7555pipeline cache objects. 7556The results of pipeline compiles, however, may: depend on the vendor ID, 7557device ID, driver version, and other details of the device. 7558To enable applications to detect when previously retrieved data is 7559incompatible with the device, the pipeline cache data must: begin with a 7560valid pipeline cache header. 7561endif::VKSC_VERSION_1_0[] 7562 7563[NOTE] 7564.Note 7565==== 7566Structures described in this section are not part of the Vulkan API and are 7567only used to describe the representation of data elements in pipeline cache 7568data. 7569Accordingly, the valid usage clauses defined for structures defined in this 7570section do not define valid usage conditions for APIs accepting pipeline 7571cache data as input, as providing invalid pipeline cache data as input to 7572any Vulkan API commands will result 7573ifndef::VKSC_VERSION_1_0[] 7574in the provided pipeline cache data being ignored. 7575endif::VKSC_VERSION_1_0[] 7576ifdef::VKSC_VERSION_1_0[] 7577in the runtime error ename:VK_ERROR_INVALID_PIPELINE_CACHE_DATA. 7578endif::VKSC_VERSION_1_0[] 7579==== 7580 7581[open,refpage='VkPipelineCacheHeaderVersionOne',desc='Structure describing the layout of the pipeline cache header',type='structs'] 7582-- 7583Version one of the pipeline cache header is defined as: 7584 7585include::{generated}/api/structs/VkPipelineCacheHeaderVersionOne.adoc[] 7586 7587 * pname:headerSize is the length in bytes of the pipeline cache header. 7588 * pname:headerVersion is a elink:VkPipelineCacheHeaderVersion value 7589 specifying the version of the header. 7590 A consumer of the pipeline cache should: use the cache version to 7591 interpret the remainder of the cache header. 7592 * pname:vendorID is the sname:VkPhysicalDeviceProperties::pname:vendorID 7593 of the implementation. 7594 * pname:deviceID is the sname:VkPhysicalDeviceProperties::pname:deviceID 7595 of the implementation. 7596 * pname:pipelineCacheUUID is the 7597 sname:VkPhysicalDeviceProperties::pname:pipelineCacheUUID of the 7598 implementation. 7599 7600Unlike most structures declared by the Vulkan API, all fields of this 7601structure are written with the least significant byte first, regardless of 7602host byte-order. 7603 7604The C language specification does not define the packing of structure 7605members. 7606This layout assumes tight structure member packing, with members laid out in 7607the order listed in the structure, and the intended size of the structure is 760832 bytes. 7609If a compiler produces code that diverges from that pattern, applications 7610must: employ another method to set values at the correct offsets. 7611 7612.Valid Usage 7613**** 7614ifndef::VKSC_VERSION_1_0[] 7615 * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-04967]] 7616 pname:headerSize must: be 32 7617 * [[VUID-VkPipelineCacheHeaderVersionOne-headerVersion-04968]] 7618 pname:headerVersion must: be ename:VK_PIPELINE_CACHE_HEADER_VERSION_ONE 7619endif::VKSC_VERSION_1_0[] 7620ifdef::VKSC_VERSION_1_0[] 7621 * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-05075]] 7622 pname:headerSize must: be 56 7623 * [[VUID-VkPipelineCacheHeaderVersionOne-headerVersion-05076]] 7624 pname:headerVersion must: be 7625 ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE 7626endif::VKSC_VERSION_1_0[] 7627 * [[VUID-VkPipelineCacheHeaderVersionOne-headerSize-08990]] 7628 pname:headerSize must: not exceed the size of the pipeline cache 7629**** 7630ifdef::VKSC_VERSION_1_0[] 7631ifdef::hidden[] 7632// tag::scdeviation[] 7633 * slink:VkPipelineCacheHeaderVersionOne::pname:headerSize must: be 56 7634 <<SCID-1>>. 7635 * slink:VkPipelineCacheHeaderVersionOne::pname:headerVersion must: be 7636 ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE <<SCID-1>>. 7637// end::scdeviation[] 7638endif::hidden[] 7639endif::VKSC_VERSION_1_0[] 7640 7641include::{generated}/validity/structs/VkPipelineCacheHeaderVersionOne.adoc[] 7642-- 7643 7644[open,refpage='VkPipelineCacheHeaderVersion',desc='Encode pipeline cache version',type='enums',xrefs='vkCreatePipelineCache vkGetPipelineCacheData'] 7645-- 7646Possible values of the pname:headerVersion value of the pipeline cache 7647header are: 7648 7649include::{generated}/api/enums/VkPipelineCacheHeaderVersion.adoc[] 7650 7651 * ename:VK_PIPELINE_CACHE_HEADER_VERSION_ONE specifies version one of the 7652 pipeline cache, described by slink:VkPipelineCacheHeaderVersionOne. 7653ifdef::VKSC_VERSION_1_0[] 7654 * ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE specifies 7655 version one of the pipeline cache for Vulkan SC, described by 7656 slink:VkPipelineCacheHeaderVersionSafetyCriticalOne. 7657endif::VKSC_VERSION_1_0[] 7658-- 7659 7660ifdef::VKSC_VERSION_1_0[] 7661[open,refpage='VkPipelineCacheHeaderVersionSafetyCriticalOne',desc='Structure describing the layout of the pipeline cache header for safety critical',type='structs'] 7662-- 7663Version one of the pipeline cache header for Vulkan SC is defined as: 7664 7665include::{generated}/api/structs/VkPipelineCacheHeaderVersionSafetyCriticalOne.adoc[] 7666 7667 * pname:headerVersionOne is a slink:VkPipelineCacheHeaderVersionOne 7668 structure. 7669 * pname:validationVersion is a elink:VkPipelineCacheValidationVersion enum 7670 value specifying the version of any validation information that is 7671 included in this pipeline cache. 7672 * pname:implementationData is 4 bytes of padding to ensure structure 7673 members are consistently aligned on all platforms. 7674 The contents of this field may: be used for implementation-specific 7675 information. 7676 * pname:pipelineIndexCount is the number of entries contained in the 7677 pipeline cache index. 7678 * pname:pipelineIndexStride is the number of bytes between consecutive 7679 pipeline cache index entries. 7680 * pname:pipelineIndexOffset is the offset in bytes from the beginning of 7681 the pipeline cache header to the pipeline cache index. 7682 7683The <<pipelines-cache-index, pipeline cache index>> consists of 7684pname:pipelineIndexCount slink:VkPipelineCacheSafetyCriticalIndexEntry 7685structures containing an index of all the pipelines in this cache. 7686The pipeline cache index is located starting at pname:pipelineIndexOffset 7687bytes into the cache and the location of pipeline code:i is calculated as: 7688[eq]#pname:pipelineIndexOffset + code:i {times} pname:pipelineIndexStride#. 7689The slink:VkPipelineCacheSafetyCriticalIndexEntry structures may: not be 7690tightly packed, enabling additional implementation-specific data to be 7691stored with each entry, or for future extensibility. 7692 7693[NOTE] 7694.Note 7695==== 7696Because the pipeline cache index is keyed by pipeline identifier, 7697applications and offline compilers must ensure that there are no pipelines 7698with identical pipeline indentifiers in the same pipeline cache. 7699==== 7700 7701Unlike most structures declared by the Vulkan API, all fields of this 7702structure are written with the least significant byte first, regardless of 7703host byte-order. 7704 7705The C language specification does not define the packing of structure 7706members. 7707This layout assumes tight structure member packing, with members laid out in 7708the order listed in the structure, and the intended size of the structure is 770956 bytes. 7710If a compiler produces code that diverges from that pattern, applications 7711must: employ another method to set values at the correct offsets. 7712 7713.Valid Usage 7714**** 7715 * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-validationVersion-05077]] 7716 pname:validationVersion must: be 7717 ename:VK_PIPELINE_CACHE_VALIDATION_VERSION_SAFETY_CRITICAL_ONE 7718 * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-pipelineIndexStride-05078]] 7719 pname:pipelineIndexStride must: be greater than or equal to 56 (the size 7720 of the slink:VkPipelineCacheSafetyCriticalIndexEntry structure) 7721 * [[VUID-VkPipelineCacheHeaderVersionSafetyCriticalOne-pipelineIndexOffset-05079]] 7722 [eq]#pname:pipelineIndexOffset + pname:pipelineIndexCount {times} 7723 pname:pipelineIndexStride# must: not exceed the size of the pipeline 7724 cache 7725**** 7726 7727include::{generated}/validity/structs/VkPipelineCacheHeaderVersionSafetyCriticalOne.adoc[] 7728-- 7729 7730[open,refpage='VkPipelineCacheValidationVersion',desc='Encode pipeline cache validation version',type='enums'] 7731-- 7732The elink:VkPipelineCacheValidationVersion enumeration determines the 7733contents of the pipeline cache validation information. 7734Possible values are: 7735 7736include::{generated}/api/enums/VkPipelineCacheValidationVersion.adoc[] 7737 7738 * ename:VK_PIPELINE_CACHE_VALIDATION_VERSION_SAFETY_CRITICAL_ONE specifies 7739 version one of the pipeline cache validation information for Vulkan SC. 7740-- 7741 7742[[pipelines-cache-index]] 7743[open,refpage='VkPipelineCacheSafetyCriticalIndexEntry',desc='Structure describing the pipeline cache index entry',type='structs'] 7744-- 7745Each pipeline cache index entry consists of a 7746sname:VkPipelineCacheSafetyCriticalIndexEntry structure: 7747 7748include::{generated}/api/structs/VkPipelineCacheSafetyCriticalIndexEntry.adoc[] 7749 7750 * pname:pipelineIdentifier is the <<pipelines-identifier, pipeline 7751 identifier>> indicating which pipeline the information is associated 7752 with. 7753 * pname:pipelineMemorySize is the number of bytes of pipeline memory 7754 required for this pipeline. 7755 This is the minimum value that can: be successfully used for 7756 slink:VkPipelineOfflineCreateInfo::pname:poolEntrySize when this 7757 pipeline is used. 7758 * pname:jsonSize is the size in bytes of the pipeline JSON data 7759 representing the pipeline state for this pipeline. 7760 This value may: be zero, indicating the JSON data is not present in the 7761 pipeline cache for this pipeline. 7762 * pname:jsonOffset is the offset in bytes from the beginning of the 7763 pipeline cache header to the pipeline JSON data for this pipeline. 7764 This value must: be zero if the JSON data is not present in the pipeline 7765 cache for this pipeline. 7766 * pname:stageIndexCount is the number of entries in the pipeline cache 7767 stage validation index for this pipeline. 7768 This value may: be zero, indicating that no stage validation information 7769 is present in the pipeline cache for this pipeline. 7770 * pname:stageIndexStride is the number of bytes between consecutive stage 7771 validation index entries. 7772 * pname:stageIndexOffset is the offset in bytes from the beginning of the 7773 pipeline cache header to the <<pipelines-cache-stage-validation-index, 7774 stage validation index>> for this pipeline. 7775 This value must: be zero if no stage validation information is present 7776 for this pipeline. 7777 7778The JSON data and the stage validation index are optionally: included in the 7779pipeline cache index entry. 7780They are only intended to be used for validation and debugging. 7781If present they must: include both the JSON data and the corresponding 7782SPIR-V modules that were used by the offline compiler to compile the 7783pipeline cache entry. 7784 7785The data at pname:jsonOffset consists of a byte stream of pname:jsonSize 7786bytes of UTF-8 encoded JSON that was used by the 7787<<pipelines-offline-compilation, offline pipeline compiler>> to create this 7788pipeline cache entry. 7789 7790The <<pipelines-cache-stage-validation-index, stage validation index>> 7791consists of pname:stageIndexCount 7792slink:VkPipelineCacheStageValidationIndexEntry structures which provide the 7793SPIR-V modules used by this pipeline and these are provided in the same 7794order as provided to the slink:VkPipelineShaderStageCreateInfo structure(s) 7795in the stext:Vk*PipelineCreateInfo structure for this pipeline. 7796The stage validation index is located at pname:stageIndexOffset bytes into 7797the cache and the location of stage code:i is calculated as: 7798[eq]#pname:stageIndexOffset {plus} code:i {times} pname:stageIndexStride#. 7799The slink:VkPipelineCacheStageValidationIndexEntry structures may: not be 7800tightly packed, enabling additional implementation-specific data to be 7801stored with each entry, or for future extensibility. 7802 7803Unlike most structures declared by the Vulkan API, all fields of this 7804structure are written with the least significant byte first, regardless of 7805host byte-order. 7806 7807The C language specification does not define the packing of structure 7808members. 7809This layout assumes tight structure member packing, with members laid out in 7810the order listed in the structure, and the intended size of the structure is 781156 bytes. 7812If a compiler produces code that diverges from that pattern, applications 7813must: employ another method to set values at the correct offsets. 7814 7815.Valid Usage 7816**** 7817 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-05080]] 7818 If pname:jsonSize is 0, pname:jsonOffset must: be 0 7819 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-05081]] 7820 If pname:jsonSize is 0, pname:stageIndexCount must: be 0 7821 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-jsonSize-08991]] 7822 If pname:jsonSize is not 0, [eq]#pname:jsonOffset {plus} pname:jsonSize# 7823 must: not exceed the size of the pipeline cache 7824 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05082]] 7825 If pname:stageIndexCount is 0, pname:stageIndexOffset and 7826 pname:stageIndexStride must: be 0 7827 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05083]] 7828 If pname:stageIndexCount is not 0, pname:stageIndexStride must: be 7829 greater than or equal to 16 (the size of the 7830 slink:VkPipelineCacheStageValidationIndexEntry structure) 7831 * [[VUID-VkPipelineCacheSafetyCriticalIndexEntry-stageIndexCount-05084]] 7832 If pname:stageIndexCount is not 0, [eq]#pname:stageIndexOffset {plus} 7833 pname:stageIndexCount {times} pname:stageIndexStride# must: not exceed 7834 the size of the pipeline cache 7835**** 7836 7837include::{generated}/validity/structs/VkPipelineCacheSafetyCriticalIndexEntry.adoc[] 7838-- 7839 7840[[pipelines-cache-stage-validation-index]] 7841[open,refpage='VkPipelineCacheStageValidationIndexEntry',desc='Structure describing the pipeline cache stage validation index',type='structs'] 7842-- 7843Each pipeline cache stage validation index entry consists of a 7844sname:VkPipelineCacheStageValidationIndexEntry structure: 7845 7846include::{generated}/api/structs/VkPipelineCacheStageValidationIndexEntry.adoc[] 7847 7848 * pname:codeSize is the size in bytes of the SPIR-V module for this 7849 pipeline stage. 7850 * pname:codeOffset is the offset in bytes from the beginning of the 7851 pipeline cache header to the SPIR-V module for this pipeline stage. 7852 7853The data at pname:codeOffset consists of pname:codeSize bytes of SPIR-V 7854module as described in <<spirvenv, Appendix A>> that was used by the 7855<<pipelines-offline-compilation, offline pipeline compiler>> for this shader 7856stage when creating this pipeline cache entry. 7857 7858Unlike most structures declared by the Vulkan API, all fields of this 7859structure are written with the least significant byte first, regardless of 7860host byte-order. 7861 7862The C language specification does not define the packing of structure 7863members. 7864This layout assumes tight structure member packing, with members laid out in 7865the order listed in the structure, and the intended size of the structure is 786616 bytes. 7867If a compiler produces code that diverges from that pattern, applications 7868must: employ another method to set values at the correct offsets. 7869 7870.Valid Usage 7871**** 7872 * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05085]] 7873 pname:codeSize must: be greater than 0 7874 * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeSize-05086]] 7875 pname:codeSize must: be a multiple of 4 7876 * [[VUID-VkPipelineCacheStageValidationIndexEntry-codeOffset-05087]] 7877 [eq]#pname:codeOffset {plus} pname:codeSize# must: not exceed the size 7878 of the pipeline cache 7879**** 7880 7881include::{generated}/validity/structs/VkPipelineCacheStageValidationIndexEntry.adoc[] 7882-- 7883 7884ifdef::hidden[] 7885// tag::scaddition[] 7886 * extending elink:VkPipelineCacheHeaderVersion 7887 ** ename:VK_PIPELINE_CACHE_HEADER_VERSION_SAFETY_CRITICAL_ONE <<SCID-1>>, 7888 <<SCID-8>> 7889 * slink:VkPipelineCacheHeaderVersionSafetyCriticalOne <<SCID-1>>, 7890 <<SCID-8>> 7891 * elink:VkPipelineCacheValidationVersion <<SCID-1>>, <<SCID-8>> 7892 * slink:VkPipelineCacheSafetyCriticalIndexEntry <<SCID-1>>, <<SCID-8>> 7893 * slink:VkPipelineCacheStageValidationIndexEntry<<SCID-1>>, <<SCID-8>> 7894// end::scaddition[] 7895endif::hidden[] 7896endif::VKSC_VERSION_1_0[] 7897 7898 7899[[pipelines-cache-destroy]] 7900=== Destroying a Pipeline Cache 7901 7902[open,refpage='vkDestroyPipelineCache',desc='Destroy a pipeline cache object',type='protos'] 7903-- 7904To destroy a pipeline cache, call: 7905 7906include::{generated}/api/protos/vkDestroyPipelineCache.adoc[] 7907 7908 * pname:device is the logical device that destroys the pipeline cache 7909 object. 7910 * pname:pipelineCache is the handle of the pipeline cache to destroy. 7911 * pname:pAllocator controls host memory allocation as described in the 7912 <<memory-allocation, Memory Allocation>> chapter. 7913 7914ifndef::VKSC_VERSION_1_0[] 7915.Valid Usage 7916**** 7917 * [[VUID-vkDestroyPipelineCache-pipelineCache-00771]] 7918 If sname:VkAllocationCallbacks were provided when pname:pipelineCache 7919 was created, a compatible set of callbacks must: be provided here 7920 * [[VUID-vkDestroyPipelineCache-pipelineCache-00772]] 7921 If no sname:VkAllocationCallbacks were provided when pname:pipelineCache 7922 was created, pname:pAllocator must: be `NULL` 7923**** 7924endif::VKSC_VERSION_1_0[] 7925 7926include::{generated}/validity/protos/vkDestroyPipelineCache.adoc[] 7927-- 7928 7929ifdef::VKSC_VERSION_1_0[] 7930[[pipelines-offline-compilation]] 7931== Offline Pipeline Compilation 7932 7933In Vulkan SC, the pipeline compilation process occurs offline <<SCID-8>>. 7934 7935The <<shader-modules,SPIR-V shader module>> and pipeline state are supplied 7936to an offline pipeline cache compiler which creates a pipeline cache entry 7937for the pipeline. 7938The set of pipeline cache entries are combined offline into one or more 7939<<pipelines-cache, pipeline caches>>. 7940At application run-time, the offline generated pipeline cache is provided to 7941device creation as part of the slink:VkDeviceObjectReservationCreateInfo 7942structure and then loaded into a slink:VkPipelineCache object by the 7943application. 7944The device, pipeline, and pipeline cache creation functions can: extract 7945implementation-specific information from the pipeline cache. 7946The specific pipeline to be loaded from the cache is specified at pipeline 7947creation time using a <<pipelines-identifier,pipeline identifier>>. 7948The pipeline state that is provided at runtime to pipeline creation must: 7949match the state that was specified to the offline pipeline cache compiler 7950when the pipeline cache entry was created offline (with the exception of the 7951slink:VkPipelineShaderStageCreateInfo structure). 7952 7953In order to assist with the specification of pipeline state for the offline 7954pipeline cache compiler, Khronos has defined a _pipeline JSON schema_ to 7955represent the pipeline state required to compile a SPIR-V module to 7956device-specific machine code and a set of utilities to help with reading and 7957writing of the JSON files. 7958See https://github.com/KhronosGroup/VulkanSC-Docs/wiki/JSON-schema for more 7959information. 7960 7961[[pipelines-memory-reservation]] 7962== Pipeline Memory Reservation 7963 7964Pipeline memory is allocated from a pool that is reserved at device creation 7965time. 7966The offline pipeline cache compiler writes the pipeline memory size 7967requirements for each pipeline into the pipeline's 7968slink:VkPipelineCacheSafetyCriticalIndexEntry::pname:pipelineMemorySize 7969entry in the <<pipelines-cache-index,pipeline cache index>>. 7970The offline pipeline cache compiler may: also report it separately. 7971The elements of 7972slink:VkDeviceObjectReservationCreateInfo::pname:pPipelinePoolSizes are 7973requests for pname:poolEntryCount pool entries each of pool size 7974pname:poolEntrySize, and any pipeline with a 7975slink:VkPipelineCacheSafetyCriticalIndexEntry::pname:pipelineMemorySize less 7976than or equal to slink:VkPipelineOfflineCreateInfo::pname:poolEntrySize can: 7977be placed in one of those pool entries. 7978The application should: request a set of pool sizes that best suits its 7979anticipated worst-case usage. 7980 7981On implementations where 7982slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory is 7983ename:VK_FALSE, the memory for the pipeline pool is not recycled when a 7984pipeline is destroyed, and once an entry has been used it cannot: be reused. 7985On implementations where 7986slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory is 7987ename:VK_TRUE, the memory for the pipeline pool is recycled when a pipeline 7988is destroyed, and the entry it was using becomes available to be reused. 7989 7990[[pipelines-identifier]] 7991== Pipeline Identifier 7992 7993A _pipeline identifier_ is an identifier that can be used to identify a 7994specific pipeline independently from the pipeline description, shader stages 7995and any relevant fixed-function stages, that were used to create the 7996pipeline object. 7997 7998The slink:VkPipelineOfflineCreateInfo structure allows an identifier to be 7999specified for the pipeline at pipeline creation via the pname:pNext field of 8000the slink:VkGraphicsPipelineCreateInfo, 8001ifdef::VK_KHR_ray_tracing_pipeline[slink:VkRayTracingPipelineCreateInfoKHR,] 8002ifdef::VK_NV_ray_tracing[slink:VkRayTracingPipelineCreateInfoNV,] 8003and slink:VkComputePipelineCreateInfo structures. 8004If a sname:VkPipelineOfflineCreateInfo structure is not included in the 8005pname:pNext chain then pipeline creation will fail and 8006ename:VK_ERROR_NO_PIPELINE_MATCH will be returned by the corresponding 8007ftext:vkCreate*Pipelines command. 8008 8009The identifier must: be used by the implementation to match against the 8010existing content of the pipeline cache at pipeline creation. 8011This is required for Vulkan SC where pipelines are generated offline and 8012there is no shader code in the pipeline cache to match at runtime. 8013 8014[NOTE] 8015.Note 8016==== 8017The identifier values must be specified or generated during the offline 8018pipeline cache generation and embedded in to the pipeline cache blob. 8019==== 8020 8021[open,refpage='VkPipelineOfflineCreateInfo',desc='Structure specifying pipeline UUID and pipeline pool size to use',type='structs'] 8022-- 8023The sname:VkPipelineOfflineCreateInfo structure is defined as: 8024 8025include::{generated}/api/structs/VkPipelineOfflineCreateInfo.adoc[] 8026 8027 * pname:sType is a elink:VkStructureType value identifying this structure. 8028 * pname:pNext is `NULL` or a pointer to a structure extending this 8029 structure. 8030 * pname:pipelineIdentifier is an array of ename:VK_UUID_SIZE code:uint8_t 8031 values representing an identifier for the pipeline. 8032 * pname:matchControl is a elink:VkPipelineMatchControl value specifying 8033 the type of identifier being used and how the match should be performed. 8034 * pname:poolEntrySize is the size of the entry in pipeline memory to use 8035 for this pipeline. 8036 It must: be a size that was requested via slink:VkPipelinePoolSize when 8037 the device was created. 8038 8039If a match in the pipeline cache is not found then 8040ename:VK_ERROR_NO_PIPELINE_MATCH will be returned to the application. 8041 8042If pname:poolEntrySize is too small for the pipeline, or the number of 8043entries for the requested pool size exceeds the reserved count for that pool 8044size, pipeline creation will fail and ename:VK_ERROR_OUT_OF_POOL_MEMORY will 8045be returned by the corresponding ftext:vkCreate*Pipelines command. 8046 8047.Valid Usage 8048**** 8049 * [[VUID-VkPipelineOfflineCreateInfo-poolEntrySize-05028]] 8050 pname:poolEntrySize must: be one of the sizes requested via 8051 slink:VkPipelinePoolSize when the device was created 8052 * [[VUID-VkPipelineOfflineCreateInfo-recyclePipelineMemory-05029]] 8053 If 8054 slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory 8055 is ename:VK_TRUE, the number of currently existing pipelines created 8056 with this same value of pname:poolEntrySize plus 1 must: be less than or 8057 equal to the sum of the slink:VkPipelinePoolSize::pname:poolEntryCount 8058 values with the same value of pname:poolEntrySize 8059 * [[VUID-VkPipelineOfflineCreateInfo-recyclePipelineMemory-05030]] 8060 If 8061 slink:VkPhysicalDeviceVulkanSC10Properties::pname:recyclePipelineMemory 8062 is ename:VK_FALSE, the total number of pipelines ever created with this 8063 same value of pname:poolEntrySize plus 1 must: be less than or equal to 8064 the sum of the slink:VkPipelinePoolSize::pname:poolEntryCount values 8065 with the same value of pname:poolEntrySize 8066**** 8067ifdef::hidden[] 8068// tag::scaddition[] 8069 * slink:VkPipelineOfflineCreateInfo <<SCID-1>>, <<SCID-8>> 8070 * elink:VkPipelineMatchControl <<SCID-1>> 8071// end::scaddition[] 8072endif::hidden[] 8073 8074include::{generated}/validity/structs/VkPipelineOfflineCreateInfo.adoc[] 8075-- 8076 8077[open,refpage='VkPipelineMatchControl',desc='Describes the type of Identifier and Match being used',type='enums',xrefs='VkPipelineOfflineCreateInfo'] 8078-- 8079Possible values of the pname:matchControl member of 8080sname:VkPipelineOfflineCreateInfo 8081 8082include::{generated}/api/enums/VkPipelineMatchControl.adoc[] 8083 8084are: 8085 8086 * ename:VK_PIPELINE_MATCH_CONTROL_APPLICATION_UUID_EXACT_MATCH specifies 8087 that the identifier is a UUID generated by the application and the 8088 identifiers must be an exact match. 8089 8090-- 8091endif::VKSC_VERSION_1_0[] 8092 8093[[pipelines-specialization-constants]] 8094== Specialization Constants 8095 8096ifndef::VKSC_VERSION_1_0[] 8097Specialization constants are a mechanism whereby constants in a SPIR-V 8098module can: have their constant value specified at the time the 8099sname:VkPipeline is created. 8100This allows a SPIR-V module to have constants that can: be modified while 8101executing an application that uses the Vulkan API. 8102 8103[NOTE] 8104.Note 8105==== 8106Specialization constants are useful to allow a compute shader to have its 8107local workgroup size changed at runtime by the user, for example. 8108==== 8109 8110endif::VKSC_VERSION_1_0[] 8111ifdef::VKSC_VERSION_1_0[] 8112Specialization constants are a mechanism whereby constants in a SPIR-V 8113module can: have their constant value specified at the time the 8114sname:VkPipeline is compiled offline. 8115This allows a SPIR-V module to have constants that can: be modified at 8116compilation time rather than in the SPIR-V source. 8117The pname:pSpecializationInfo parameters are not used at runtime and should: 8118be ignored by the implementation. 8119If provided, the application must: set the pname:pSpecializationInfo 8120parameters to the values that were specified for the offline compilation of 8121this pipeline. 8122 8123[NOTE] 8124.Note 8125==== 8126Specialization constants are useful to allow a compute shader to have its 8127local workgroup size changed at pipeline compilation time, for example. 8128==== 8129endif::VKSC_VERSION_1_0[] 8130 8131Each slink:VkPipelineShaderStageCreateInfo structure contains a 8132pname:pSpecializationInfo member, which can: be `NULL` to indicate no 8133specialization constants, or point to a sname:VkSpecializationInfo 8134structure. 8135 8136[open,refpage='VkSpecializationInfo',desc='Structure specifying specialization information',type='structs'] 8137-- 8138The sname:VkSpecializationInfo structure is defined as: 8139 8140include::{generated}/api/structs/VkSpecializationInfo.adoc[] 8141 8142 * pname:mapEntryCount is the number of entries in the pname:pMapEntries 8143 array. 8144 * pname:pMapEntries is a pointer to an array of 8145 sname:VkSpecializationMapEntry structures, which map constant IDs to 8146 offsets in pname:pData. 8147 * pname:dataSize is the byte size of the pname:pData buffer. 8148 * pname:pData contains the actual constant values to specialize with. 8149 8150.Valid Usage 8151**** 8152 * [[VUID-VkSpecializationInfo-offset-00773]] 8153 The pname:offset member of each element of pname:pMapEntries must: be 8154 less than pname:dataSize 8155 * [[VUID-VkSpecializationInfo-pMapEntries-00774]] 8156 The pname:size member of each element of pname:pMapEntries must: be less 8157 than or equal to pname:dataSize minus pname:offset 8158 * [[VUID-VkSpecializationInfo-constantID-04911]] 8159 The pname:constantID value of each element of pname:pMapEntries must: be 8160 unique within pname:pMapEntries 8161**** 8162 8163include::{generated}/validity/structs/VkSpecializationInfo.adoc[] 8164-- 8165 8166[open,refpage='VkSpecializationMapEntry',desc='Structure specifying a specialization map entry',type='structs'] 8167-- 8168The sname:VkSpecializationMapEntry structure is defined as: 8169 8170include::{generated}/api/structs/VkSpecializationMapEntry.adoc[] 8171 8172 * pname:constantID is the ID of the specialization constant in SPIR-V. 8173 * pname:offset is the byte offset of the specialization constant value 8174 within the supplied data buffer. 8175 * pname:size is the byte size of the specialization constant value within 8176 the supplied data buffer. 8177 8178If a pname:constantID value is not a specialization constant ID used in the 8179shader, that map entry does not affect the behavior of the pipeline. 8180 8181.Valid Usage 8182**** 8183 * [[VUID-VkSpecializationMapEntry-constantID-00776]] 8184 For a pname:constantID specialization constant declared in a shader, 8185 pname:size must: match the byte size of the pname:constantID. 8186 If the specialization constant is of type code:boolean, pname:size must: 8187 be the byte size of basetype:VkBool32 8188**** 8189 8190include::{generated}/validity/structs/VkSpecializationMapEntry.adoc[] 8191-- 8192 8193In human readable SPIR-V: 8194 8195[source,glsl] 8196---- 8197OpDecorate %x SpecId 13 ; decorate .x component of WorkgroupSize with ID 13 8198OpDecorate %y SpecId 42 ; decorate .y component of WorkgroupSize with ID 42 8199OpDecorate %z SpecId 3 ; decorate .z component of WorkgroupSize with ID 3 8200OpDecorate %wgsize BuiltIn WorkgroupSize ; decorate WorkgroupSize onto constant 8201%i32 = OpTypeInt 32 0 ; declare an unsigned 32-bit type 8202%uvec3 = OpTypeVector %i32 3 ; declare a 3 element vector type of unsigned 32-bit 8203%x = OpSpecConstant %i32 1 ; declare the .x component of WorkgroupSize 8204%y = OpSpecConstant %i32 1 ; declare the .y component of WorkgroupSize 8205%z = OpSpecConstant %i32 1 ; declare the .z component of WorkgroupSize 8206%wgsize = OpSpecConstantComposite %uvec3 %x %y %z ; declare WorkgroupSize 8207---- 8208 8209From the above we have three specialization constants, one for each of the 8210x, y & z elements of the WorkgroupSize vector. 8211 8212Now to specialize the above via the specialization constants mechanism: 8213 8214[source,c++] 8215---- 8216const VkSpecializationMapEntry entries[] = 8217{ 8218 { 8219 .constantID = 13, 8220 .offset = 0 * sizeof(uint32_t), 8221 .size = sizeof(uint32_t) 8222 }, 8223 { 8224 .constantID = 42, 8225 .offset = 1 * sizeof(uint32_t), 8226 .size = sizeof(uint32_t) 8227 }, 8228 { 8229 .constantID = 3, 8230 .offset = 2 * sizeof(uint32_t), 8231 .size = sizeof(uint32_t) 8232 } 8233}; 8234 8235const uint32_t data[] = { 16, 8, 4 }; // our workgroup size is 16x8x4 8236 8237const VkSpecializationInfo info = 8238{ 8239 .mapEntryCount = 3, 8240 .pMapEntries = entries, 8241 .dataSize = 3 * sizeof(uint32_t), 8242 .pData = data, 8243}; 8244---- 8245 8246Then when calling flink:vkCreateComputePipelines, and passing the 8247sname:VkSpecializationInfo we defined as the pname:pSpecializationInfo 8248parameter of slink:VkPipelineShaderStageCreateInfo, we will create a compute 8249pipeline with the runtime specified local workgroup size. 8250 8251Another example would be that an application has a SPIR-V module that has 8252some platform-dependent constants they wish to use. 8253 8254In human readable SPIR-V: 8255 8256// [source,glsl] 8257[source,glsl] 8258---- 8259OpDecorate %1 SpecId 0 ; decorate our signed 32-bit integer constant 8260OpDecorate %2 SpecId 12 ; decorate our 32-bit floating-point constant 8261%i32 = OpTypeInt 32 1 ; declare a signed 32-bit type 8262%float = OpTypeFloat 32 ; declare a 32-bit floating-point type 8263%1 = OpSpecConstant %i32 -1 ; some signed 32-bit integer constant 8264%2 = OpSpecConstant %float 0.5 ; some 32-bit floating-point constant 8265---- 8266 8267From the above we have two specialization constants, one is a signed 32-bit 8268integer and the second is a 32-bit floating-point value. 8269 8270Now to specialize the above via the specialization constants mechanism: 8271 8272[source,c++] 8273---- 8274struct SpecializationData { 8275 int32_t data0; 8276 float data1; 8277}; 8278 8279const VkSpecializationMapEntry entries[] = 8280{ 8281 { 8282 .constantID = 0, 8283 .offset = offsetof(SpecializationData, data0), 8284 .size = sizeof(SpecializationData::data0) 8285 }, 8286 { 8287 .constantID = 12, 8288 .offset = offsetof(SpecializationData, data1), 8289 .size = sizeof(SpecializationData::data1) 8290 } 8291}; 8292 8293SpecializationData data; 8294data.data0 = -42; // set the data for the 32-bit integer 8295data.data1 = 42.0f; // set the data for the 32-bit floating-point 8296 8297const VkSpecializationInfo info = 8298{ 8299 .mapEntryCount = 2, 8300 .pMapEntries = entries, 8301 .dataSize = sizeof(data), 8302 .pdata = &data, 8303}; 8304---- 8305 8306It is legal for a SPIR-V module with specializations to be compiled into a 8307pipeline where no specialization information was provided. 8308SPIR-V specialization constants contain default values such that if a 8309specialization is not provided, the default value will be used. 8310In the examples above, it would be valid for an application to only 8311specialize some of the specialization constants within the SPIR-V module, 8312and let the other constants use their default values encoded within the 8313OpSpecConstant declarations. 8314 8315 8316ifdef::VK_KHR_pipeline_library[] 8317[[pipelines-library]] 8318== Pipeline Libraries 8319 8320A pipeline library is a special pipeline that was created using the 8321ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and cannot be bound, instead it 8322defines a set of pipeline state which can be linked into other pipelines. 8323ifdef::VK_KHR_ray_tracing_pipeline[] 8324For ray tracing pipelines this includes shaders and shader groups. 8325endif::VK_KHR_ray_tracing_pipeline[] 8326ifdef::VK_EXT_graphics_pipeline_library[] 8327For graphics pipelines this includes distinct library types defined by 8328elink:VkGraphicsPipelineLibraryFlagBitsEXT. 8329endif::VK_EXT_graphics_pipeline_library[] 8330The application must: maintain the lifetime of a pipeline library based on 8331the pipelines that link with it. 8332 8333This linkage is achieved by using the following structure within the 8334appropriate creation mechanisms: 8335 8336[open,refpage='VkPipelineLibraryCreateInfoKHR',desc='Structure specifying pipeline libraries to use when creating a pipeline',type='structs'] 8337-- 8338The sname:VkPipelineLibraryCreateInfoKHR structure is defined as: 8339 8340include::{generated}/api/structs/VkPipelineLibraryCreateInfoKHR.adoc[] 8341 8342 * pname:sType is a elink:VkStructureType value identifying this structure. 8343 * pname:pNext is `NULL` or a pointer to a structure extending this 8344 structure. 8345 * pname:libraryCount is the number of pipeline libraries in 8346 pname:pLibraries. 8347 * pname:pLibraries is a pointer to an array of slink:VkPipeline structures 8348 specifying pipeline libraries to use when creating a pipeline. 8349 8350.Valid Usage 8351**** 8352 * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-03381]] 8353 Each element of pname:pLibraries must: have been created with 8354 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 8355ifdef::VK_EXT_shader_module_identifier[] 8356 * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-06855]] 8357 If any library in pname:pLibraries was created with a shader stage with 8358 slink:VkPipelineShaderStageModuleIdentifierCreateInfoEXT and 8359 pname:identifierSize not equal to 0, the pipeline must: be created with 8360 the ename:VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT flag 8361 set 8362endif::VK_EXT_shader_module_identifier[] 8363ifdef::VK_EXT_descriptor_buffer[] 8364 * [[VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-08096]] 8365 If any element of pname:pLibraries was created with 8366 ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all elements must: 8367 have been created with 8368 ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT 8369endif::VK_EXT_descriptor_buffer[] 8370ifdef::VK_EXT_pipeline_protected_access[] 8371 * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07404]] 8372 If pname:pipeline is being created with 8373 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element of 8374 pname:pLibraries must: have been created with 8375 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT 8376 * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07405]] 8377 If pname:pipeline is being created without 8378 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element of 8379 pname:pLibraries must: have been created without 8380 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT 8381 * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07406]] 8382 If pname:pipeline is being created with 8383 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element of 8384 pname:pLibraries must: have been created with 8385 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT 8386 * [[VUID-VkPipelineLibraryCreateInfoKHR-pipeline-07407]] 8387 If pname:pipeline is being created without 8388 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element of 8389 pname:pLibraries must: have been created without 8390 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT 8391endif::VK_EXT_pipeline_protected_access[] 8392**** 8393 8394include::{generated}/validity/structs/VkPipelineLibraryCreateInfoKHR.adoc[] 8395-- 8396 8397Pipelines created with ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR libraries 8398can: depend on other pipeline libraries in 8399slink:VkPipelineLibraryCreateInfoKHR. 8400 8401A pipeline library is considered in-use, as long as one of the linking 8402pipelines is in-use. 8403This applies recursively if a pipeline library includes other pipeline 8404libraries. 8405 8406endif::VK_KHR_pipeline_library[] 8407 8408 8409[[pipelines-binding]] 8410== Pipeline Binding 8411 8412[open,refpage='vkCmdBindPipeline',desc='Bind a pipeline object to a command buffer',type='protos'] 8413-- 8414Once a pipeline has been created, it can: be bound to the command buffer 8415using the command: 8416 8417include::{generated}/api/protos/vkCmdBindPipeline.adoc[] 8418 8419 * pname:commandBuffer is the command buffer that the pipeline will be 8420 bound to. 8421 * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying 8422 to which bind point the pipeline is bound. 8423 Binding one does not disturb the others. 8424 * pname:pipeline is the pipeline to be bound. 8425 8426[[pipelines-bindpoint-commands]] 8427Once bound, a pipeline binding affects subsequent commands that interact 8428with the given pipeline type in the command buffer until a different 8429pipeline of the same type is bound to the bind 8430ifdef::VK_EXT_shader_object[] 8431point, or until the pipeline bind point is disturbed by binding a 8432<<shaders-objects, shader object>> as described in 8433<<shaders-objects-pipeline-interaction, Interaction with Pipelines>>. 8434endif::VK_EXT_shader_object[] 8435ifndef::VK_EXT_shader_object[] 8436point. 8437endif::VK_EXT_shader_object[] 8438Commands that do not interact with the <<shaders-binding,given pipeline>> 8439type must: not be affected by the pipeline state. 8440 8441.Valid Usage 8442**** 8443 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00777]] 8444 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, the 8445 sname:VkCommandPool that pname:commandBuffer was allocated from must: 8446 support compute operations 8447 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00778]] 8448 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, the 8449 sname:VkCommandPool that pname:commandBuffer was allocated from must: 8450 support graphics operations 8451 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00779]] 8452 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, 8453 pname:pipeline must: be a compute pipeline 8454 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-00780]] 8455 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, 8456 pname:pipeline must: be a graphics pipeline 8457 * [[VUID-vkCmdBindPipeline-pipeline-00781]] 8458 If the <<features-variableMultisampleRate, 8459 pname:variableMultisampleRate>> feature is not supported, pname:pipeline 8460 is a graphics pipeline, the current subpass <<renderpass-noattachments, 8461 uses no attachments>>, and this is not the first call to this function 8462 with a graphics pipeline after transitioning to the current subpass, 8463 then the sample count specified by this pipeline must: match that set in 8464 the previous pipeline 8465ifdef::VK_EXT_sample_locations[] 8466 * [[VUID-vkCmdBindPipeline-variableSampleLocations-01525]] 8467 If 8468 slink:VkPhysicalDeviceSampleLocationsPropertiesEXT::pname:variableSampleLocations 8469 is ename:VK_FALSE, and pname:pipeline is a graphics pipeline created 8470 with a slink:VkPipelineSampleLocationsStateCreateInfoEXT structure 8471 having its pname:sampleLocationsEnable member set to ename:VK_TRUE but 8472 without ename:VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT enabled then the 8473 current render pass instance must: have been begun by specifying a 8474 slink:VkRenderPassSampleLocationsBeginInfoEXT structure whose 8475 pname:pPostSubpassSampleLocations member contains an element with a 8476 pname:subpassIndex matching the current subpass index and the 8477 pname:sampleLocationsInfo member of that element must: match the 8478 pname:sampleLocationsInfo specified in 8479 slink:VkPipelineSampleLocationsStateCreateInfoEXT when the pipeline was 8480 created 8481endif::VK_EXT_sample_locations[] 8482ifdef::VK_EXT_transform_feedback[] 8483 * [[VUID-vkCmdBindPipeline-None-02323]] 8484 This command must: not be recorded when transform feedback is active 8485endif::VK_EXT_transform_feedback[] 8486ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 8487 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-02391]] 8488 If pname:pipelineBindPoint is 8489 ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, the sname:VkCommandPool 8490 that pname:commandBuffer was allocated from must: support compute 8491 operations 8492 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-02392]] 8493 If pname:pipelineBindPoint is 8494 ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, pname:pipeline must: be a 8495 ray tracing pipeline 8496 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-06721]] 8497 If pname:pipelineBindPoint is 8498 ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, pname:commandBuffer must: 8499 not be a protected command buffer 8500endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 8501ifdef::VK_EXT_pipeline_protected_access[] 8502 * [[VUID-vkCmdBindPipeline-pipelineProtectedAccess-07408]] 8503 If the <<features-pipelineProtectedAccess, 8504 pname:pipelineProtectedAccess>> feature is enabled, and 8505 pname:commandBuffer is a protected command buffer, pname:pipeline must: 8506 have been created without 8507 ename:VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT 8508 * [[VUID-vkCmdBindPipeline-pipelineProtectedAccess-07409]] 8509 If the <<features-pipelineProtectedAccess, 8510 pname:pipelineProtectedAccess>> feature is enabled, and 8511 pname:commandBuffer is not a protected command buffer, pname:pipeline 8512 must: have been created without 8513 ename:VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT 8514endif::VK_EXT_pipeline_protected_access[] 8515ifdef::VK_KHR_pipeline_library[] 8516 * [[VUID-vkCmdBindPipeline-pipeline-03382]] 8517 pname:pipeline must: not have been created with 8518 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR set 8519endif::VK_KHR_pipeline_library[] 8520ifdef::VK_NV_inherited_viewport_scissor[] 8521 * [[VUID-vkCmdBindPipeline-commandBuffer-04808]] 8522 If pname:commandBuffer is a secondary command buffer with 8523 slink:VkCommandBufferInheritanceViewportScissorInfoNV::pname:viewportScissor2D 8524 enabled and pname:pipelineBindPoint is 8525 ename:VK_PIPELINE_BIND_POINT_GRAPHICS, then the pname:pipeline must: 8526 have been created with ename:VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT or 8527 ename:VK_DYNAMIC_STATE_VIEWPORT, and 8528 ename:VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT or 8529 ename:VK_DYNAMIC_STATE_SCISSOR enabled 8530endif::VK_NV_inherited_viewport_scissor[] 8531ifdef::VK_NV_inherited_viewport_scissor,VK_EXT_discard_rectangles[] 8532 * [[VUID-vkCmdBindPipeline-commandBuffer-04809]] 8533 If pname:commandBuffer is a secondary command buffer with 8534 slink:VkCommandBufferInheritanceViewportScissorInfoNV::pname:viewportScissor2D 8535 enabled and pname:pipelineBindPoint is 8536 ename:VK_PIPELINE_BIND_POINT_GRAPHICS and pname:pipeline was created 8537 with slink:VkPipelineDiscardRectangleStateCreateInfoEXT structure and 8538 its pname:discardRectangleCount member is not `0`, or the pipeline was 8539 created with ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT 8540 enabled, then the pipeline must: have been created with 8541 ename:VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT enabled 8542endif::VK_NV_inherited_viewport_scissor,VK_EXT_discard_rectangles[] 8543ifdef::VK_EXT_provoking_vertex[] 8544 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04881]] 8545 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS and 8546 the <<limits-provokingVertexModePerPipeline, 8547 pname:provokingVertexModePerPipeline>> limit is ename:VK_FALSE, then 8548 pipeline's 8549 slink:VkPipelineRasterizationProvokingVertexStateCreateInfoEXT::pname:provokingVertexMode 8550 must: be the same as that of any other pipelines previously bound to 8551 this bind point within the current render pass instance, including any 8552 pipeline already bound when beginning the render pass instance 8553endif::VK_EXT_provoking_vertex[] 8554ifdef::VK_HUAWEI_subpass_shading[] 8555 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04949]] 8556 If pname:pipelineBindPoint is 8557 ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, the 8558 sname:VkCommandPool that pname:commandBuffer was allocated from must: 8559 support compute operations 8560 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-04950]] 8561 If pname:pipelineBindPoint is 8562 ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, pname:pipeline 8563 must: be a subpass shading pipeline 8564endif::VK_HUAWEI_subpass_shading[] 8565ifdef::VK_EXT_graphics_pipeline_library[] 8566 * [[VUID-vkCmdBindPipeline-pipelineBindPoint-06653]] 8567 If pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, 8568 pname:pipeline must: have been created without 8569 ename:VK_PIPELINE_CREATE_LIBRARY_BIT_KHR 8570endif::VK_EXT_graphics_pipeline_library[] 8571**** 8572 8573include::{generated}/validity/protos/vkCmdBindPipeline.adoc[] 8574-- 8575 8576[open,refpage='VkPipelineBindPoint',desc='Specify the bind point of a pipeline object to a command buffer',type='enums'] 8577-- 8578Possible values of flink:vkCmdBindPipeline::pname:pipelineBindPoint, 8579specifying the bind point of a pipeline object, are: 8580 8581include::{generated}/api/enums/VkPipelineBindPoint.adoc[] 8582 8583 * ename:VK_PIPELINE_BIND_POINT_COMPUTE specifies binding as a compute 8584 pipeline. 8585 * ename:VK_PIPELINE_BIND_POINT_GRAPHICS specifies binding as a graphics 8586 pipeline. 8587ifdef::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 8588 * ename:VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR specifies binding as a ray 8589 tracing pipeline. 8590endif::VK_NV_ray_tracing,VK_KHR_ray_tracing_pipeline[] 8591ifdef::VK_HUAWEI_subpass_shading[] 8592 * ename:VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI specifies binding as 8593 a subpass shading pipeline. 8594endif::VK_HUAWEI_subpass_shading[] 8595ifdef::VK_AMDX_shader_enqueue[] 8596 * ename:VK_PIPELINE_BIND_POINT_EXECUTION_GRAPH_AMDX specifies binding as 8597 an <<executiongraphs, execution graph pipeline>>. 8598endif::VK_AMDX_shader_enqueue[] 8599-- 8600 8601ifdef::VK_NV_device_generated_commands[] 8602[open,refpage='vkCmdBindPipelineShaderGroupNV',desc='Bind a pipeline object's shader group to a command buffer',type='protos'] 8603-- 8604For pipelines that were created with the support of multiple shader groups 8605(see <<graphics-shadergroups,Graphics Pipeline Shader Groups>>), the regular 8606fname:vkCmdBindPipeline command will bind Shader Group `0`. 8607To explicitly bind a shader group use: 8608 8609include::{generated}/api/protos/vkCmdBindPipelineShaderGroupNV.adoc[] 8610 8611 * pname:commandBuffer is the command buffer that the pipeline will be 8612 bound to. 8613 * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying 8614 the bind point to which the pipeline will be bound. 8615 * pname:pipeline is the pipeline to be bound. 8616 * pname:groupIndex is the shader group to be bound. 8617 8618 8619.Valid Usage 8620**** 8621 * [[VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02893]] 8622 pname:groupIndex must: be `0` or less than the effective 8623 slink:VkGraphicsPipelineShaderGroupsCreateInfoNV::pname:groupCount 8624 including the referenced pipelines 8625 * [[VUID-vkCmdBindPipelineShaderGroupNV-pipelineBindPoint-02894]] 8626 The pname:pipelineBindPoint must: be 8627 ename:VK_PIPELINE_BIND_POINT_GRAPHICS 8628 * [[VUID-vkCmdBindPipelineShaderGroupNV-groupIndex-02895]] 8629 The same restrictions as flink:vkCmdBindPipeline apply as if the bound 8630 pipeline was created only with the Shader Group from the 8631 pname:groupIndex information 8632 * [[VUID-vkCmdBindPipelineShaderGroupNV-deviceGeneratedCommands-02896]] 8633 The <<features-deviceGeneratedCommands, pname:deviceGeneratedCommands>> 8634 feature must: be enabled 8635**** 8636 8637include::{generated}/validity/protos/vkCmdBindPipelineShaderGroupNV.adoc[] 8638-- 8639endif::VK_NV_device_generated_commands[] 8640 8641ifdef::VK_EXT_shader_object[] 8642[[pipelines-shader-object-interaction]] 8643=== Interaction With Shader Objects 8644 8645If the <<features-shaderObject, pname:shaderObject>> feature is enabled, 8646applications can: use both pipelines and <<shaders-objects, shader objects>> 8647at the same time. 8648The interaction between pipelines and shader objects is described in 8649<<shaders-objects-pipeline-interaction, Interaction with Pipelines>>. 8650endif::VK_EXT_shader_object[] 8651 8652[[pipelines-dynamic-state]] 8653== Dynamic State 8654 8655When a pipeline object is bound, any pipeline object state that is not 8656specified as dynamic is applied to the command buffer state. 8657Pipeline object state that is specified as dynamic is not applied to the 8658command buffer state at this time. 8659Instead, dynamic state can: be modified at any time and persists for the 8660lifetime of the command buffer, or until modified by another dynamic state 8661setting command, or made invalid by another pipeline bind with that state 8662specified as static. 8663 8664When a pipeline object is bound, the following applies to each state 8665parameter: 8666 8667 * If the state is not specified as dynamic in the new pipeline object, 8668 then that command buffer state is overwritten by the state in the new 8669 pipeline object. 8670 Before any draw or dispatch call with this pipeline there must: not have 8671 been any calls to any of the corresponding dynamic state setting 8672 commands after this pipeline was bound. 8673 * If the state is specified as dynamic in the new pipeline object, then 8674 that command buffer state is not disturbed. 8675 Before any draw or dispatch call with this pipeline there must: have 8676 been at least one call to each of the corresponding dynamic state 8677 setting commands. 8678 The state-setting commands must: be recorded after command buffer 8679 recording was begun, or after the last command binding a pipeline object 8680 with that state specified as static, whichever was the latter. 8681 * If the state is not included (corresponding pointer in 8682 slink:VkGraphicsPipelineCreateInfo was `NULL` or was ignored) in the new 8683 pipeline object, then that command buffer state is not disturbed. 8684ifdef::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 8685 For example, mesh shading pipelines do not include vertex input state 8686 and therefore do not disturb any such command buffer state. 8687endif::VK_NV_mesh_shader,VK_EXT_mesh_shader[] 8688 8689Dynamic state that does not affect the result of operations can: be left 8690undefined:. 8691 8692[NOTE] 8693.Note 8694==== 8695For example, if blending is disabled by the pipeline object state then the 8696dynamic color blend constants do not need to be specified in the command 8697buffer, even if this state is specified as dynamic in the pipeline object. 8698==== 8699 8700 8701ifdef::VK_AMD_shader_info,VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[] 8702[[pipelines-shader-information]] 8703== Pipeline Properties and Shader Information 8704endif::VK_AMD_shader_info,VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[] 8705 8706ifdef::VK_KHR_pipeline_executable_properties[] 8707[open,refpage='vkGetPipelineExecutablePropertiesKHR',desc='Get the executables associated with a pipeline',type='protos'] 8708-- 8709When a pipeline is created, its state and shaders are compiled into zero or 8710more device-specific executables, which are used when executing commands 8711against that pipeline. 8712To query the properties of these pipeline executables, call: 8713 8714include::{generated}/api/protos/vkGetPipelineExecutablePropertiesKHR.adoc[] 8715 8716 * pname:device is the device that created the pipeline. 8717 * pname:pPipelineInfo describes the pipeline being queried. 8718 * pname:pExecutableCount is a pointer to an integer related to the number 8719 of pipeline executables available or queried, as described below. 8720 * pname:pProperties is either `NULL` or a pointer to an array of 8721 slink:VkPipelineExecutablePropertiesKHR structures. 8722 8723If pname:pProperties is `NULL`, then the number of pipeline executables 8724associated with the pipeline is returned in pname:pExecutableCount. 8725Otherwise, pname:pExecutableCount must: point to a variable set by the user 8726to the number of elements in the pname:pProperties array, and on return the 8727variable is overwritten with the number of structures actually written to 8728pname:pProperties. 8729If pname:pExecutableCount is less than the number of pipeline executables 8730associated with the pipeline, at most pname:pExecutableCount structures will 8731be written, and ename:VK_INCOMPLETE will be returned instead of 8732ename:VK_SUCCESS, to indicate that not all the available properties were 8733returned. 8734 8735.Valid Usage 8736**** 8737 * [[VUID-vkGetPipelineExecutablePropertiesKHR-pipelineExecutableInfo-03270]] 8738 The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>> 8739 feature must: be enabled 8740 * [[VUID-vkGetPipelineExecutablePropertiesKHR-pipeline-03271]] 8741 The pname:pipeline member of pname:pPipelineInfo must: have been created 8742 with pname:device 8743**** 8744 8745include::{generated}/validity/protos/vkGetPipelineExecutablePropertiesKHR.adoc[] 8746-- 8747 8748[open,refpage='VkPipelineExecutablePropertiesKHR',desc='Structure describing a pipeline executable',type='structs'] 8749-- 8750The sname:VkPipelineExecutablePropertiesKHR structure is defined as: 8751 8752include::{generated}/api/structs/VkPipelineExecutablePropertiesKHR.adoc[] 8753 8754 * pname:sType is a elink:VkStructureType value identifying this structure. 8755 * pname:pNext is `NULL` or a pointer to a structure extending this 8756 structure. 8757 * pname:stages is a bitmask of zero or more elink:VkShaderStageFlagBits 8758 indicating which shader stages (if any) were principally used as inputs 8759 to compile this pipeline executable. 8760 * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 8761 containing a null-terminated UTF-8 string which is a short human 8762 readable name for this pipeline executable. 8763 * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 8764 containing a null-terminated UTF-8 string which is a human readable 8765 description for this pipeline executable. 8766 * pname:subgroupSize is the subgroup size with which this pipeline 8767 executable is dispatched. 8768 8769Not all implementations have a 1:1 mapping between shader stages and 8770pipeline executables and some implementations may: reduce a given shader 8771stage to fixed function hardware programming such that no pipeline 8772executable is available. 8773No guarantees are provided about the mapping between shader stages and 8774pipeline executables and pname:stages should: be considered a best effort 8775hint. 8776Because the application cannot: rely on the pname:stages field to provide an 8777exact description, pname:name and pname:description provide a human readable 8778name and description which more accurately describes the given pipeline 8779executable. 8780 8781include::{generated}/validity/structs/VkPipelineExecutablePropertiesKHR.adoc[] 8782-- 8783endif::VK_KHR_pipeline_executable_properties[] 8784 8785ifdef::VK_EXT_pipeline_properties[] 8786[open,refpage='vkGetPipelinePropertiesEXT',desc='Query pipeline properties',type='protos'] 8787-- 8788To query the pipeline properties call: 8789 8790include::{generated}/api/protos/vkGetPipelinePropertiesEXT.adoc[] 8791 8792 * pname:device is the logical device that created the pipeline. 8793 * pname:pPipelineInfo is a pointer to a slink:VkPipelineInfoEXT structure 8794 which describes the pipeline being queried. 8795 * pname:pPipelineProperties is a pointer to a slink:VkBaseOutStructure 8796 structure in which the pipeline properties will be written. 8797 8798To query a pipeline's pname:pipelineIdentifier pass a 8799slink:VkPipelinePropertiesIdentifierEXT structure in 8800pname:pPipelineProperties. 8801Each pipeline is associated with a pname:pipelineIdentifier and the 8802identifier is implementation specific. 8803 8804.Valid Usage 8805**** 8806 * [[VUID-vkGetPipelinePropertiesEXT-pipeline-06738]] 8807 The pname:pipeline member of pname:pPipelineInfo must have been created 8808 with pname:device 8809 * [[VUID-vkGetPipelinePropertiesEXT-pPipelineProperties-06739]] 8810 pname:pPipelineProperties must: be a valid pointer to a 8811 slink:VkPipelinePropertiesIdentifierEXT structure 8812 * [[VUID-vkGetPipelinePropertiesEXT-None-06766]] 8813 The <<features-pipelinePropertiesIdentifier, 8814 pname:pipelinePropertiesIdentifier>> feature must: be enabled 8815**** 8816 8817include::{generated}/validity/protos/vkGetPipelinePropertiesEXT.adoc[] 8818-- 8819 8820[open,refpage='VkPipelinePropertiesIdentifierEXT',desc='Structure used to retrieve pipeline properties',type='structs'] 8821-- 8822The sname:VkPipelinePropertiesIdentifierEXT structure is defined as: 8823 8824include::{generated}/api/structs/VkPipelinePropertiesIdentifierEXT.adoc[] 8825 8826 * pname:sType is a elink:VkStructureType value identifying this structure. 8827 * pname:pNext is `NULL` or a pointer to a structure extending this 8828 structure. 8829 * pname:pipelineIdentifier is an array of ename:VK_UUID_SIZE code:uint8_t 8830 values into which the pipeline identifier will be written. 8831 8832include::{generated}/validity/structs/VkPipelinePropertiesIdentifierEXT.adoc[] 8833-- 8834endif::VK_EXT_pipeline_properties[] 8835 8836// This structure is used by both vkGetPipelineExecutablePropertiesKHR and 8837// vkGetPipelinePropertiesEXT above, placing it in a nonstandard position. 8838ifdef::VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[] 8839[open,refpage='VkPipelineInfoKHR',desc='Structure describing a pipeline',type='structs',alias='VkPipelineInfoEXT'] 8840-- 8841The sname:VkPipelineInfoKHR structure is defined as: 8842 8843include::{generated}/api/structs/VkPipelineInfoKHR.adoc[] 8844 8845ifdef::VK_EXT_pipeline_properties[] 8846or the equivalent 8847 8848include::{generated}/api/structs/VkPipelineInfoEXT.adoc[] 8849endif::VK_EXT_pipeline_properties[] 8850 8851 * pname:sType is a elink:VkStructureType value identifying this structure. 8852 * pname:pNext is `NULL` or a pointer to a structure extending this 8853 structure. 8854 * pname:pipeline is a sname:VkPipeline handle. 8855 8856include::{generated}/validity/structs/VkPipelineInfoKHR.adoc[] 8857-- 8858endif::VK_KHR_pipeline_executable_properties,VK_EXT_pipeline_properties[] 8859 8860ifdef::VK_KHR_pipeline_executable_properties[] 8861[open,refpage='vkGetPipelineExecutableStatisticsKHR',desc='Get compile time statistics associated with a pipeline executable',type='protos'] 8862-- 8863Each pipeline executable may: have a set of statistics associated with it 8864that are generated by the pipeline compilation process. 8865These statistics may: include things such as instruction counts, amount of 8866spilling (if any), maximum number of simultaneous threads, or anything else 8867which may: aid developers in evaluating the expected performance of a 8868shader. 8869To query the compile time statistics associated with a pipeline executable, 8870call: 8871 8872include::{generated}/api/protos/vkGetPipelineExecutableStatisticsKHR.adoc[] 8873 8874 * pname:device is the device that created the pipeline. 8875 * pname:pExecutableInfo describes the pipeline executable being queried. 8876 * pname:pStatisticCount is a pointer to an integer related to the number 8877 of statistics available or queried, as described below. 8878 * pname:pStatistics is either `NULL` or a pointer to an array of 8879 slink:VkPipelineExecutableStatisticKHR structures. 8880 8881If pname:pStatistics is `NULL`, then the number of statistics associated 8882with the pipeline executable is returned in pname:pStatisticCount. 8883Otherwise, pname:pStatisticCount must: point to a variable set by the user 8884to the number of elements in the pname:pStatistics array, and on return the 8885variable is overwritten with the number of structures actually written to 8886pname:pStatistics. 8887If pname:pStatisticCount is less than the number of statistics associated 8888with the pipeline executable, at most pname:pStatisticCount structures will 8889be written, and ename:VK_INCOMPLETE will be returned instead of 8890ename:VK_SUCCESS, to indicate that not all the available statistics were 8891returned. 8892 8893.Valid Usage 8894**** 8895 * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipelineExecutableInfo-03272]] 8896 The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>> 8897 feature must: be enabled 8898 * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03273]] 8899 The pname:pipeline member of pname:pExecutableInfo must: have been 8900 created with pname:device 8901 * [[VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274]] 8902 The pname:pipeline member of pname:pExecutableInfo must: have been 8903 created with ename:VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR 8904**** 8905 8906include::{generated}/validity/protos/vkGetPipelineExecutableStatisticsKHR.adoc[] 8907-- 8908 8909[open,refpage='VkPipelineExecutableInfoKHR',desc='Structure describing a pipeline executable to query for associated statistics or internal representations',type='structs'] 8910-- 8911The sname:VkPipelineExecutableInfoKHR structure is defined as: 8912 8913include::{generated}/api/structs/VkPipelineExecutableInfoKHR.adoc[] 8914 8915 * pname:sType is a elink:VkStructureType value identifying this structure. 8916 * pname:pNext is `NULL` or a pointer to a structure extending this 8917 structure. 8918 * pname:pipeline is the pipeline to query. 8919 * pname:executableIndex is the index of the pipeline executable to query 8920 in the array of executable properties returned by 8921 flink:vkGetPipelineExecutablePropertiesKHR. 8922 8923.Valid Usage 8924**** 8925 * [[VUID-VkPipelineExecutableInfoKHR-executableIndex-03275]] 8926 pname:executableIndex must: be less than the number of pipeline 8927 executables associated with pname:pipeline as returned in the 8928 pname:pExecutableCount parameter of 8929 fname:vkGetPipelineExecutablePropertiesKHR 8930**** 8931 8932include::{generated}/validity/structs/VkPipelineExecutableInfoKHR.adoc[] 8933-- 8934 8935[open,refpage='VkPipelineExecutableStatisticKHR',desc='Structure describing a compile time pipeline executable statistic',type='structs'] 8936-- 8937The sname:VkPipelineExecutableStatisticKHR structure is defined as: 8938 8939include::{generated}/api/structs/VkPipelineExecutableStatisticKHR.adoc[] 8940 8941 * pname:sType is a elink:VkStructureType value identifying this structure. 8942 * pname:pNext is `NULL` or a pointer to a structure extending this 8943 structure. 8944 * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 8945 containing a null-terminated UTF-8 string which is a short human 8946 readable name for this statistic. 8947 * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 8948 containing a null-terminated UTF-8 string which is a human readable 8949 description for this statistic. 8950 * pname:format is a elink:VkPipelineExecutableStatisticFormatKHR value 8951 specifying the format of the data found in pname:value. 8952 * pname:value is the value of this statistic. 8953 8954include::{generated}/validity/structs/VkPipelineExecutableStatisticKHR.adoc[] 8955-- 8956 8957[open,refpage='VkPipelineExecutableStatisticFormatKHR',desc='Enum describing a pipeline executable statistic's data format',type='enums'] 8958-- 8959The ename:VkPipelineExecutableStatisticFormatKHR enum is defined as: 8960 8961include::{generated}/api/enums/VkPipelineExecutableStatisticFormatKHR.adoc[] 8962 8963 * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR specifies that 8964 the statistic is returned as a 32-bit boolean value which must: be 8965 either ename:VK_TRUE or ename:VK_FALSE and should: be read from the 8966 fname:b32 field of sname:VkPipelineExecutableStatisticValueKHR. 8967 * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR specifies that 8968 the statistic is returned as a signed 64-bit integer and should: be read 8969 from the fname:i64 field of sname:VkPipelineExecutableStatisticValueKHR. 8970 * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR specifies that 8971 the statistic is returned as an unsigned 64-bit integer and should: be 8972 read from the fname:u64 field of 8973 sname:VkPipelineExecutableStatisticValueKHR. 8974 * ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR specifies that 8975 the statistic is returned as a 64-bit floating-point value and should: 8976 be read from the fname:f64 field of 8977 sname:VkPipelineExecutableStatisticValueKHR. 8978-- 8979 8980[open,refpage='VkPipelineExecutableStatisticValueKHR',desc='A union describing a pipeline executable statistic's value',type='structs'] 8981-- 8982The sname:VkPipelineExecutableStatisticValueKHR union is defined as: 8983 8984include::{generated}/api/structs/VkPipelineExecutableStatisticValueKHR.adoc[] 8985 8986 * pname:b32 is the 32-bit boolean value if the 8987 ename:VkPipelineExecutableStatisticFormatKHR is 8988 ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR. 8989 * pname:i64 is the signed 64-bit integer value if the 8990 ename:VkPipelineExecutableStatisticFormatKHR is 8991 ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR. 8992 * pname:u64 is the unsigned 64-bit integer value if the 8993 ename:VkPipelineExecutableStatisticFormatKHR is 8994 ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR. 8995 * pname:f64 is the 64-bit floating-point value if the 8996 ename:VkPipelineExecutableStatisticFormatKHR is 8997 ename:VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR. 8998 8999include::{generated}/validity/structs/VkPipelineExecutableStatisticValueKHR.adoc[] 9000-- 9001 9002[open,refpage='vkGetPipelineExecutableInternalRepresentationsKHR',desc='Get internal representations of the pipeline executable',type='protos'] 9003-- 9004Each pipeline executable may: have one or more text or binary internal 9005representations associated with it which are generated as part of the 9006compile process. 9007These may: include the final shader assembly, a binary form of the compiled 9008shader, or the shader compiler's internal representation at any number of 9009intermediate compile steps. 9010To query the internal representations associated with a pipeline executable, 9011call: 9012 9013include::{generated}/api/protos/vkGetPipelineExecutableInternalRepresentationsKHR.adoc[] 9014 9015 * pname:device is the device that created the pipeline. 9016 * pname:pExecutableInfo describes the pipeline executable being queried. 9017 * pname:pInternalRepresentationCount is a pointer to an integer related to 9018 the number of internal representations available or queried, as 9019 described below. 9020 * pname:pInternalRepresentations is either `NULL` or a pointer to an array 9021 of slink:VkPipelineExecutableInternalRepresentationKHR structures. 9022 9023If pname:pInternalRepresentations is `NULL`, then the number of internal 9024representations associated with the pipeline executable is returned in 9025pname:pInternalRepresentationCount. 9026Otherwise, pname:pInternalRepresentationCount must: point to a variable set 9027by the user to the number of elements in the pname:pInternalRepresentations 9028array, and on return the variable is overwritten with the number of 9029structures actually written to pname:pInternalRepresentations. 9030If pname:pInternalRepresentationCount is less than the number of internal 9031representations associated with the pipeline executable, at most 9032pname:pInternalRepresentationCount structures will be written, and 9033ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to 9034indicate that not all the available representations were returned. 9035 9036While the details of the internal representations remain 9037implementation-dependent, the implementation should: order the internal 9038representations in the order in which they occur in the compiled pipeline 9039with the final shader assembly (if any) last. 9040 9041.Valid Usage 9042**** 9043 * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipelineExecutableInfo-03276]] 9044 The <<features-pipelineExecutableInfo, pname:pipelineExecutableInfo>> 9045 feature must: be enabled 9046 * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03277]] 9047 The pname:pipeline member of pname:pExecutableInfo must: have been 9048 created with pname:device 9049 * [[VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03278]] 9050 The pname:pipeline member of pname:pExecutableInfo must: have been 9051 created with 9052 ename:VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR 9053**** 9054 9055include::{generated}/validity/protos/vkGetPipelineExecutableInternalRepresentationsKHR.adoc[] 9056-- 9057 9058[open,refpage='VkPipelineExecutableInternalRepresentationKHR',desc='Structure describing the textual form of a pipeline executable internal representation',type='structs'] 9059-- 9060The sname:VkPipelineExecutableInternalRepresentationKHR structure is defined 9061as: 9062 9063include::{generated}/api/structs/VkPipelineExecutableInternalRepresentationKHR.adoc[] 9064 9065 * pname:sType is a elink:VkStructureType value identifying this structure. 9066 * pname:pNext is `NULL` or a pointer to a structure extending this 9067 structure. 9068 * pname:name is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 9069 containing a null-terminated UTF-8 string which is a short human 9070 readable name for this internal representation. 9071 * pname:description is an array of ename:VK_MAX_DESCRIPTION_SIZE code:char 9072 containing a null-terminated UTF-8 string which is a human readable 9073 description for this internal representation. 9074 * pname:isText specifies whether the returned data is text or opaque data. 9075 If pname:isText is ename:VK_TRUE then the data returned in pname:pData 9076 is text and is guaranteed to be a null-terminated UTF-8 string. 9077 * pname:dataSize is an integer related to the size, in bytes, of the 9078 internal representation's data, as described below. 9079 * pname:pData is either `NULL` or a pointer to a block of data into which 9080 the implementation will write the internal representation. 9081 9082If pname:pData is `NULL`, then the size, in bytes, of the internal 9083representation data is returned in pname:dataSize. 9084Otherwise, pname:dataSize must be the size of the buffer, in bytes, pointed 9085to by pname:pData and on return pname:dataSize is overwritten with the 9086number of bytes of data actually written to pname:pData including any 9087trailing null character. 9088If pname:dataSize is less than the size, in bytes, of the internal 9089representation's data, at most pname:dataSize bytes of data will be written 9090to pname:pData, and ename:VK_INCOMPLETE will be returned instead of 9091ename:VK_SUCCESS, to indicate that not all the available representation was 9092returned. 9093 9094If pname:isText is ename:VK_TRUE and pname:pData is not `NULL` and 9095pname:dataSize is not zero, the last byte written to pname:pData will be a 9096null character. 9097 9098include::{generated}/validity/structs/VkPipelineExecutableInternalRepresentationKHR.adoc[] 9099-- 9100endif::VK_KHR_pipeline_executable_properties[] 9101 9102 9103ifdef::VK_AMD_shader_info[] 9104include::{chapters}/VK_AMD_shader_info.adoc[] 9105endif::VK_AMD_shader_info[] 9106 9107 9108// These includes have their own section headers 9109 9110ifdef::VK_AMD_pipeline_compiler_control[] 9111include::{chapters}/VK_AMD_pipeline_compiler_control.adoc[] 9112endif::VK_AMD_pipeline_compiler_control[] 9113 9114ifdef::VK_VERSION_1_3,VK_EXT_pipeline_creation_feedback[] 9115include::{chapters}/VK_EXT_pipeline_creation_feedback/pipelines.adoc[] 9116endif::VK_VERSION_1_3,VK_EXT_pipeline_creation_feedback[] 9117