Class VkPipelineShaderStageCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkPipelineShaderStageCreateInfo extends Struct<VkPipelineShaderStageCreateInfo> implements NativeResource
Structure specifying parameters of a newly created pipeline shader stage.
Description

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.

Note

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.

Valid Usage
Valid Usage (Implicit)
See Also

VkComputePipelineCreateInfo, VkExecutionGraphPipelineCreateInfoAMDX, VkGraphicsPipelineCreateInfo, VkGraphicsShaderGroupCreateInfoNV, VkRayTracingPipelineCreateInfoKHR, VkRayTracingPipelineCreateInfoNV, VkSpecializationInfo

Layout


 struct VkPipelineShaderStageCreateInfo {
     VkStructureType sType();
     void const * pNext();
     VkPipelineShaderStageCreateFlags flags();
     VkShaderStageFlagBits stage();
     VkShaderModule module();
     char const * pName();
     VkSpecializationInfo const * pSpecializationInfo();
 }