Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkPipelineShaderStageCreateInfo

extends Struct<VkPipelineShaderStageCreateInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField 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.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
public
VkPipelineShaderStageCreateInfo(ByteBuffer container)

Creates a VkPipelineShaderStageCreateInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkPipelineShaderStageCreateInfo
calloc()

Returns a new VkPipelineShaderStageCreateInfo instance allocated with memCalloc.

public static VkPipelineShaderStageCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkPipelineShaderStageCreateInfo.Buffer instance allocated with memCalloc.

public static VkPipelineShaderStageCreateInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPipelineShaderStageCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkPipelineShaderStageCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPipelineShaderStageCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkPipelineShaderStageCreateInfo
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
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.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkPipelineShaderStageCreateInfo
create()

Returns a new VkPipelineShaderStageCreateInfo instance allocated with BufferUtils.

public static VkPipelineShaderStageCreateInfo
create(long address)

Returns a new VkPipelineShaderStageCreateInfo instance for the specified memory address.

public static VkPipelineShaderStageCreateInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkPipelineShaderStageCreateInfo.Buffer instance allocated with BufferUtils.

public static VkPipelineShaderStageCreateInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkPipelineShaderStageCreateInfo.Buffer instance at the specified memory.

public static VkPipelineShaderStageCreateInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkPipelineShaderStageCreateInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
flags()

a bitmask of VkPipelineShaderStageCreateFlagBits specifying how the pipeline shader stage will be generated.

public VkPipelineShaderStageCreateInfo
flags(int value)

Sets the specified value to the flags field.

public static VkPipelineShaderStageCreateInfo
malloc()

Returns a new VkPipelineShaderStageCreateInfo instance allocated with memAlloc.

public static VkPipelineShaderStageCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkPipelineShaderStageCreateInfo.Buffer instance allocated with memAlloc.

public static VkPipelineShaderStageCreateInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPipelineShaderStageCreateInfo instance allocated on the specified MemoryStack.

public static VkPipelineShaderStageCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkPipelineShaderStageCreateInfo.Buffer instance allocated on the specified MemoryStack.

public static VkPipelineShaderStageCreateInfo
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkPipelineShaderStageCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public long
module()

optionally a VkShaderModule object containing the shader code for this stage.

public VkPipelineShaderStageCreateInfo
module(long value)

Sets the specified value to the module field.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static long
nmodule(long struct)

Unsafe version of module.

public static void
nmodule(long struct, long value)

Unsafe version of module.

public static ByteBuffer
npName(long struct)

Unsafe version of pName.

public static void
npName(long struct, ByteBuffer value)

Unsafe version of pName.

public static String
npNameString(long struct)

Unsafe version of pNameString.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static VkSpecializationInfo
npSpecializationInfo(long struct)

Unsafe version of pSpecializationInfo.

public static void
npSpecializationInfo(long struct, VkSpecializationInfo value)

Unsafe version of pSpecializationInfo.

public static int
nstage(long struct)

Unsafe version of stage.

public static void
nstage(long struct, int value)

Unsafe version of stage.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

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
pName(ByteBuffer value)

Sets the address of the specified encoded string to the pName field.

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
pNext()

NULL or a pointer to a structure extending this structure.

public VkPipelineShaderStageCreateInfo
pNext(long value)

Sets the specified value to the pNext field.

public VkPipelineShaderStageCreateInfo
pNext(VkDebugUtilsObjectNameInfoEXT value)

Prepends the specified VkDebugUtilsObjectNameInfoEXT value to the pNext chain.

public VkPipelineShaderStageCreateInfo
pNext(VkPipelineRobustnessCreateInfoEXT value)

Prepends the specified VkPipelineRobustnessCreateInfoEXT value to the pNext chain.

public VkPipelineShaderStageCreateInfo
public VkPipelineShaderStageCreateInfo
pNext(VkPipelineShaderStageNodeCreateInfoAMDX value)

Prepends the specified VkPipelineShaderStageNodeCreateInfoAMDX value to the pNext chain.

public VkPipelineShaderStageCreateInfo
public VkPipelineShaderStageCreateInfo
public VkPipelineShaderStageCreateInfo
pNext(VkShaderModuleCreateInfo value)

Prepends the specified VkShaderModuleCreateInfo value to the pNext chain.

public VkPipelineShaderStageCreateInfo
public VkPipelineShaderStageCreateInfo
pNext(VkShaderRequiredSubgroupSizeCreateInfoEXT value)

Prepends the specified VkShaderRequiredSubgroupSizeCreateInfoEXT value to the pNext chain.

public VkSpecializationInfo
pSpecializationInfo()

a pointer to a VkSpecializationInfo structure, as described in Specialization Constants, or NULL.

public VkPipelineShaderStageCreateInfo
pSpecializationInfo(VkSpecializationInfo value)

Sets the address of the specified VkSpecializationInfo to the pSpecializationInfo field.

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 struct
set
(VkPipelineShaderStageCreateInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
stage()

a VkShaderStageFlagBits value specifying a single pipeline stage.

public VkPipelineShaderStageCreateInfo
stage(int value)

Sets the specified value to the stage field.

public int
sType()

a VkStructureType value identifying this structure.

public VkPipelineShaderStageCreateInfo
sType(int value)

Sets the specified value to the sType field.

public VkPipelineShaderStageCreateInfo
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate