If module is not NULL_HANDLE, the shader code used by the pipeline is defined by module. If module is NULL_HANDLE, the shader code is defined by the chained VkShaderModuleCreateInfo if present.
If the shaderModuleIdentifier feature is enabled, applications can omit shader code for stage and instead provide a module identifier. This is done by including a VkPipelineShaderStageModuleIdentifierCreateInfoEXT struct with identifierSize not equal to 0 in the pNext chain. A shader stage created in this way is equivalent to one created using a shader module with the same identifier. The identifier allows an implementation to look up a pipeline without consuming a valid SPIR-V module. If a pipeline is not found, pipeline compilation is not possible and the implementation must fail as specified by PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT.
When an identifier is used in lieu of a shader module, implementations may fail pipeline compilation with PIPELINE_COMPILE_REQUIRED for any reason.
The rationale for the relaxed requirement on implementations to return a pipeline with VkPipelineShaderStageModuleIdentifierCreateInfoEXT is that layers or tools may intercept pipeline creation calls and require the full SPIR-V context to operate correctly. ICDs are not expected to fail pipeline compilation if the pipeline exists in a cache somewhere.
Applications can use identifiers when creating pipelines with PIPELINE_CREATE_LIBRARY_BIT_KHR. When creating such pipelines, SUCCESS may be returned, but subsequently fail when referencing the pipeline in a VkPipelineLibraryCreateInfoKHR struct. Applications must allow pipeline compilation to fail during link steps with PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT as it may not be possible to determine if a pipeline can be created from identifiers until the link step.
geometryShader feature is not enabled, stage must not be SHADER_STAGE_GEOMETRY_BITtessellationShader feature is not enabled, stage must not be SHADER_STAGE_TESSELLATION_CONTROL_BIT or SHADER_STAGE_TESSELLATION_EVALUATION_BITmeshShaders feature is not enabled, stage must not be SHADER_STAGE_MESH_BIT_EXTtaskShaders feature is not enabled, stage must not be SHADER_STAGE_TASK_BIT_EXTclustercullingShader feature is not enabled, stage must not be SHADER_STAGE_CLUSTER_CULLING_BIT_HUAWEIstage must not be SHADER_STAGE_ALL_GRAPHICS, or SHADER_STAGE_ALLpName must be the name of an OpEntryPoint in module with an execution model that matches stageClipDistance BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxClipDistancesCullDistance BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxCullDistancesClipDistance or CullDistance BuiltIn decoration, those variables must not have array sizes which sum to more than VkPhysicalDeviceLimits::maxCombinedClipAndCullDistancesSampleMask BuiltIn decoration, that variable must not have an array size greater than VkPhysicalDeviceLimits::maxSampleMaskWordsstage is SHADER_STAGE_VERTEX_BIT, the identified entry point must not include any input variable in its interface that is decorated with CullDistancestage is SHADER_STAGE_TESSELLATION_CONTROL_BIT or SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an OpExecutionMode instruction specifying a patch size with OutputVertices, the patch size must be greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxTessellationPatchSizestage is SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an OpExecutionMode instruction specifying a maximum output vertex count that is greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxGeometryOutputVerticesstage is SHADER_STAGE_GEOMETRY_BIT, the identified entry point must have an OpExecutionMode instruction specifying an invocation count that is greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxGeometryShaderInvocationsstage is either SHADER_STAGE_VERTEX_BIT, SHADER_STAGE_TESSELLATION_CONTROL_BIT, SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to Layer for any primitive, it must write the same value to Layer for all vertices of a given primitivestage is either SHADER_STAGE_VERTEX_BIT, SHADER_STAGE_TESSELLATION_CONTROL_BIT, SHADER_STAGE_TESSELLATION_EVALUATION_BIT, or SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to ViewportIndex for any primitive, it must write the same value to ViewportIndex for all vertices of a given primitivestage is SHADER_STAGE_FRAGMENT_BIT, the identified entry point must not include any output variables in its interface decorated with CullDistancestage is SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to FragDepth in any execution path, all execution paths that are not exclusive to helper invocations must either discard the fragment, or write or initialize the value of FragDepthstage is SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to FragStencilRefEXT in any execution path, all execution paths that are not exclusive to helper invocations must either discard the fragment, or write or initialize the value of FragStencilRefEXTflags has the PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag set, the subgroupSizeControl feature must be enabledflags has the PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set, the computeFullSubgroups feature must be enabledflags includes PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT, stage must be one of SHADER_STAGE_MESH_BIT_EXT, SHADER_STAGE_TASK_BIT_EXT, or SHADER_STAGE_COMPUTE_BITVkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain, flags must not have the PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag setVkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain, the subgroupSizeControl feature must be enabled, and stage must be a valid bit specified in requiredSubgroupSizeStagesVkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain and stage is SHADER_STAGE_COMPUTE_BIT, SHADER_STAGE_MESH_BIT_EXT, or SHADER_STAGE_TASK_BIT_EXT, the local workgroup size of the shader must be less than or equal to the product of VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::requiredSubgroupSize and maxComputeWorkgroupSubgroupsVkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain, and flags has the PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set, the local workgroup size in the X dimension of the pipeline must be a multiple of VkPipelineShaderStageRequiredSubgroupSizeCreateInfo::requiredSubgroupSizeflags has both the PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT and PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flags set, the local workgroup size in the X dimension of the pipeline must be a multiple of maxSubgroupSizeflags has the PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT flag set and flags does not have the PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT flag set and no VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure is included in the pNext chain, the local workgroup size in the X dimension of the pipeline must be a multiple of subgroupSizemodule uses the OpTypeCooperativeMatrixKHR instruction with a Scope equal to Subgroup, then the local workgroup size in the X dimension of the pipeline must be a multiple of subgroupSize.stage, a VkShaderModuleCreateInfo structure must not be present in the pNext chainstage, module must be a valid VkShaderModule or there must be a valid VkShaderModuleCreateInfo structure in the pNext chainstage, and neither the maintenance5 nor graphicsPipelineLibrary feature are enabled, module must be a valid VkShaderModulestage, module must be NULL_HANDLEpSpecializationInfo, if any, and then converting all specialization constants into fixed constantssType must be STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFOpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDebugUtilsObjectNameInfoEXT, VkPipelineRobustnessCreateInfoEXT, VkPipelineShaderStageModuleIdentifierCreateInfoEXT, VkPipelineShaderStageNodeCreateInfoAMDX, VkPipelineShaderStageRequiredSubgroupSizeCreateInfo, VkShaderModuleCreateInfo, or VkShaderModuleValidationCacheCreateInfoEXTsType value of each struct in the pNext chain must be uniqueflags must be a valid combination of VkPipelineShaderStageCreateFlagBits valuesstage must be a valid VkShaderStageFlagBits valuemodule is not NULL_HANDLE, module must be a valid VkShaderModule handlepName must be a null-terminated UTF-8 stringpSpecializationInfo is not NULL, pSpecializationInfo must be a valid pointer to a valid VkSpecializationInfo structureVkComputePipelineCreateInfo, VkExecutionGraphPipelineCreateInfoAMDX, VkGraphicsPipelineCreateInfo, VkGraphicsShaderGroupCreateInfoNV, VkRayTracingPipelineCreateInfoKHR, VkRayTracingPipelineCreateInfoNV, VkSpecializationInfo
struct VkPipelineShaderStageCreateInfo {
VkStructureType sType;
void const * pNext;
VkPipelineShaderStageCreateFlags flags;
VkShaderStageFlagBits stage;
VkShaderModule module;
char const * pName;
VkSpecializationInfo const * pSpecializationInfo;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkPipelineShaderStageCreateInfo.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | MODULE
The struct member offsets. |
| public static final int | PNAME
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | PSPECIALIZATIONINFO
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STAGE
The struct member offsets. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkPipelineShaderStageCreateInfo(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineShaderStageCreateInfo | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPipelineShaderStageCreateInfo. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo. | |
| public static VkPipelineShaderStageCreateInfo. | |
| protected VkPipelineShaderStageCreateInfo | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo | create(long address)
Returns a new |
| public static VkPipelineShaderStageCreateInfo. | create(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineShaderStageCreateInfo. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo. | |
| public int | flags()
a bitmask of |
| public VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineShaderStageCreateInfo | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPipelineShaderStageCreateInfo. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo | |
| public static VkPipelineShaderStageCreateInfo. | |
| public static VkPipelineShaderStageCreateInfo. | |
| public long | |
| public VkPipelineShaderStageCreateInfo | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static ByteBuffer | |
| public static void | |
| public static String | |
| public static long | |
| public static void | |
| public static VkSpecializationInfo | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public ByteBuffer | pName()
a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage. |
| public VkPipelineShaderStageCreateInfo | |
| public String | pNameString()
a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage. |
| public long | |
| public VkPipelineShaderStageCreateInfo | |
| public VkPipelineShaderStageCreateInfo | pNext(VkDebugUtilsObjectNameInfoEXT value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkPipelineRobustnessCreateInfoEXT value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkPipelineShaderStageModuleIdentifierCreateInfoEXT value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkPipelineShaderStageNodeCreateInfoAMDX value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkShaderModuleCreateInfo value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkShaderModuleValidationCacheCreateInfoEXT value)
Prepends the specified |
| public VkPipelineShaderStageCreateInfo | pNext(VkShaderRequiredSubgroupSizeCreateInfoEXT value)
Prepends the specified |
| public VkSpecializationInfo | pSpecializationInfo()
a pointer to a |
| public VkPipelineShaderStageCreateInfo | pSpecializationInfo(VkSpecializationInfo value)
Sets the address of the specified |
| public VkPipelineShaderStageCreateInfo | set(int sType, long pNext, int flags, int stage, long module, ByteBuffer pName, VkSpecializationInfo pSpecializationInfo)
Initializes this struct with the specified values. |
| public VkPipelineShaderStageCreateInfo | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkPipelineShaderStageCreateInfo | |
| public int | |
| public VkPipelineShaderStageCreateInfo | |
| public VkPipelineShaderStageCreateInfo | |
| public static void |