Package org.lwjgl.vulkan
Class VkPipelineShaderStageCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPipelineShaderStageCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkPipelineShaderStageCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters of a newly created pipeline shader stage.Valid Usage
- If the geometry shaders feature is not enabled,
stagemust not beSHADER_STAGE_GEOMETRY_BIT - If the tessellation shaders feature is not enabled,
stagemust not beSHADER_STAGE_TESSELLATION_CONTROL_BITorSHADER_STAGE_TESSELLATION_EVALUATION_BIT - If the mesh shader feature is not enabled,
stagemust not beSHADER_STAGE_MESH_BIT_NV - If the task shader feature is not enabled,
stagemust not beSHADER_STAGE_TASK_BIT_NV stagemust not beSHADER_STAGE_ALL_GRAPHICS, orSHADER_STAGE_ALLpNamemust be the name of anOpEntryPointinmodulewith an execution model that matchesstage- If the identified entry point includes any variable in its interface that is declared with the
ClipDistanceBuiltIndecoration, that variable must not have an array size greater thanVkPhysicalDeviceLimits::maxClipDistances - If the identified entry point includes any variable in its interface that is declared with the
CullDistanceBuiltIndecoration, that variable must not have an array size greater thanVkPhysicalDeviceLimits::maxCullDistances - If the identified entry point includes any variables in its interface that are declared with the
ClipDistanceorCullDistanceBuiltIndecoration, those variables must not have array sizes which sum to more thanVkPhysicalDeviceLimits::maxCombinedClipAndCullDistances - If the identified entry point includes any variable in its interface that is declared with the
SampleMaskBuiltIndecoration, that variable must not have an array size greater thanVkPhysicalDeviceLimits::maxSampleMaskWords - If
stageisSHADER_STAGE_VERTEX_BIT, the identified entry point must not include any input variable in its interface that is decorated withCullDistance - If
stageisSHADER_STAGE_TESSELLATION_CONTROL_BITorSHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has anOpExecutionModeinstruction that specifies a patch size withOutputVertices, the patch size must be greater than 0 and less than or equal toVkPhysicalDeviceLimits::maxTessellationPatchSize - If
stageisSHADER_STAGE_GEOMETRY_BIT, the identified entry point must have anOpExecutionModeinstruction that specifies a maximum output vertex count that is greater than 0 and less than or equal toVkPhysicalDeviceLimits::maxGeometryOutputVertices - If
stageisSHADER_STAGE_GEOMETRY_BIT, the identified entry point must have anOpExecutionModeinstruction that specifies an invocation count that is greater than 0 and less than or equal toVkPhysicalDeviceLimits::maxGeometryShaderInvocations - If
stageis a vertex processing stage, and the identified entry point writes toLayerfor any primitive, it must write the same value toLayerfor all vertices of a given primitive - If
stageis a vertex processing stage, and the identified entry point writes toViewportIndexfor any primitive, it must write the same value toViewportIndexfor all vertices of a given primitive - If
stageisSHADER_STAGE_FRAGMENT_BIT, the identified entry point must not include any output variables in its interface decorated withCullDistance - If
stageisSHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes toFragDepthin any execution path, it must write toFragDepthin all execution paths - If
stageisSHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes toFragStencilRefEXTin any execution path, it must write toFragStencilRefEXTin all execution paths - If
stageisSHADER_STAGE_MESH_BIT_NV, the identified entry point must have anOpExecutionModeinstruction that specifies a maximum output vertex count,OutputVertices, that is greater than 0 and less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV::maxMeshOutputVertices. - If
stageisSHADER_STAGE_MESH_BIT_NV, the identified entry point must have anOpExecutionModeinstruction that specifies a maximum output primitive count,OutputPrimitivesNV, that is greater than 0 and less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV::maxMeshOutputPrimitives. - If
flagshas thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTflag set, thesubgroupSizeControlfeature must be enabled. - If
flagshas thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTflag set, thecomputeFullSubgroupsfeature must be enabled. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTstructure is chained topNext,flagsmust not have thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTflag set. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTstructure is chained topNext, thesubgroupSizeControlfeature must be enabled, andstagemust be a valid bit specified inrequiredSubgroupSizeStages. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTstructure is chained topNextandstageis VK_SHADER_STAGE_COMPUTE_BIT then local workgroup size of the shader must be less than or equal to the product ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT::requiredSubgroupSizeandmaxComputeWorkgroupSubgroups. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTstructure is chained topNext, andflagshas thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTflag set, the local workgroup size in the X dimension of the pipeline must be a multiple ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT::requiredSubgroupSize. - If
flagshas both thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTandPIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTflags set, the local workgroup size in the X dimension of the pipeline must be a multiple ofmaxSubgroupSize. - If
flagshas thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXTflag set andflagsdoes not have thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXTflag set and noVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTstructure is chained topNext, the local workgroup size in the X dimension of the pipeline must be a multiple ofsubgroupSize.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFOpNextmust beNULLor a pointer to a valid instance ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXTflagsmust be a valid combination ofVkPipelineShaderStageCreateFlagBitsvaluesstagemust be a validVkShaderStageFlagBitsvaluemodulemust be a validVkShaderModulehandlepNamemust be a null-terminated UTF-8 string- If
pSpecializationInfois notNULL,pSpecializationInfomust be a valid pointer to a validVkSpecializationInfostructure
See Also
VkComputePipelineCreateInfo,VkGraphicsPipelineCreateInfo,VkRayTracingPipelineCreateInfoNV,VkSpecializationInfoMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.flags– a bitmask ofVkPipelineShaderStageCreateFlagBitsspecifying how the pipeline shader stage will be generated.stage– aVkShaderStageFlagBitsvalue specifying a single pipeline stage.module– aVkShaderModuleobject that contains the shader for this stage.pName– a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stage.pSpecializationInfo– a pointer toVkSpecializationInfo, as described in Specialization Constants, and can beNULL.
Layout
struct VkPipelineShaderStageCreateInfo { VkStructureType sType; void const * pNext; VkPipelineShaderStageCreateFlags flags; VkShaderStageFlagBits stage; VkShaderModule module; char const * pName;VkSpecializationInfoconst * pSpecializationInfo; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkPipelineShaderStageCreateInfo.BufferAn array ofVkPipelineShaderStageCreateInfostructs.
-
Constructor Summary
Constructors Constructor Description VkPipelineShaderStageCreateInfo(java.nio.ByteBuffer container)Creates aVkPipelineShaderStageCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkPipelineShaderStageCreateInfocalloc()Returns a newVkPipelineShaderStageCreateInfoinstance allocated withmemCalloc.static VkPipelineShaderStageCreateInfo.Buffercalloc(int capacity)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withmemCalloc.static VkPipelineShaderStageCreateInfocallocStack()Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineShaderStageCreateInfo.BuffercallocStack(int capacity)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineShaderStageCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineShaderStageCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineShaderStageCreateInfocreate()Returns a newVkPipelineShaderStageCreateInfoinstance allocated withBufferUtils.static VkPipelineShaderStageCreateInfo.Buffercreate(int capacity)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withBufferUtils.static VkPipelineShaderStageCreateInfocreate(long address)Returns a newVkPipelineShaderStageCreateInfoinstance for the specified memory address.static VkPipelineShaderStageCreateInfo.Buffercreate(long address, int capacity)Create aVkPipelineShaderStageCreateInfo.Bufferinstance at the specified memory.static VkPipelineShaderStageCreateInfocreateSafe(long address)static VkPipelineShaderStageCreateInfo.BuffercreateSafe(long address, int capacity)intflags()Returns the value of theflagsfield.VkPipelineShaderStageCreateInfoflags(int value)Sets the specified value to theflagsfield.static VkPipelineShaderStageCreateInfomalloc()Returns a newVkPipelineShaderStageCreateInfoinstance allocated withmemAlloc.static VkPipelineShaderStageCreateInfo.Buffermalloc(int capacity)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withmemAlloc.static VkPipelineShaderStageCreateInfomallocStack()Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the thread-localMemoryStack.static VkPipelineShaderStageCreateInfo.BuffermallocStack(int capacity)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkPipelineShaderStageCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkPipelineShaderStageCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the specifiedMemoryStack.longmodule()Returns the value of themodulefield.VkPipelineShaderStageCreateInfomodule(long value)Sets the specified value to themodulefield.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static longnmodule(long struct)Unsafe version ofmodule().static voidnmodule(long struct, long value)Unsafe version ofmodule.static java.nio.ByteBuffernpName(long struct)Unsafe version ofpName().static voidnpName(long struct, java.nio.ByteBuffer value)Unsafe version ofpName.static java.lang.StringnpNameString(long struct)Unsafe version ofpNameString().static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkSpecializationInfonpSpecializationInfo(long struct)Unsafe version ofpSpecializationInfo().static voidnpSpecializationInfo(long struct, VkSpecializationInfo value)Unsafe version ofpSpecializationInfo.static intnstage(long struct)Unsafe version ofstage().static voidnstage(long struct, int value)Unsafe version ofstage.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.java.nio.ByteBufferpName()Returns aByteBufferview of the null-terminated string pointed to by thepNamefield.VkPipelineShaderStageCreateInfopName(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thepNamefield.java.lang.StringpNameString()Decodes the null-terminated string pointed to by thepNamefield.longpNext()Returns the value of thepNextfield.VkPipelineShaderStageCreateInfopNext(long value)Sets the specified value to thepNextfield.VkSpecializationInfopSpecializationInfo()Returns aVkSpecializationInfoview of the struct pointed to by thepSpecializationInfofield.VkPipelineShaderStageCreateInfopSpecializationInfo(VkSpecializationInfo value)Sets the address of the specifiedVkSpecializationInfoto thepSpecializationInfofield.VkPipelineShaderStageCreateInfoset(int sType, long pNext, int flags, int stage, long module, java.nio.ByteBuffer pName, VkSpecializationInfo pSpecializationInfo)Initializes this struct with the specified values.VkPipelineShaderStageCreateInfoset(VkPipelineShaderStageCreateInfo src)Copies the specified struct data to this struct.intsizeof()intstage()Returns the value of thestagefield.VkPipelineShaderStageCreateInfostage(int value)Sets the specified value to thestagefield.intsType()Returns the value of thesTypefield.VkPipelineShaderStageCreateInfosType(int value)Sets the specified value to thesTypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkPipelineShaderStageCreateInfo
public VkPipelineShaderStageCreateInfo(java.nio.ByteBuffer container)
Creates aVkPipelineShaderStageCreateInfoinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
stage
public int stage()
Returns the value of thestagefield.
-
module
public long module()
Returns the value of themodulefield.
-
pName
public java.nio.ByteBuffer pName()
Returns aByteBufferview of the null-terminated string pointed to by thepNamefield.
-
pNameString
public java.lang.String pNameString()
Decodes the null-terminated string pointed to by thepNamefield.
-
pSpecializationInfo
@Nullable public VkSpecializationInfo pSpecializationInfo()
Returns aVkSpecializationInfoview of the struct pointed to by thepSpecializationInfofield.
-
sType
public VkPipelineShaderStageCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkPipelineShaderStageCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkPipelineShaderStageCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
stage
public VkPipelineShaderStageCreateInfo stage(int value)
Sets the specified value to thestagefield.
-
module
public VkPipelineShaderStageCreateInfo module(long value)
Sets the specified value to themodulefield.
-
pName
public VkPipelineShaderStageCreateInfo pName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepNamefield.
-
pSpecializationInfo
public VkPipelineShaderStageCreateInfo pSpecializationInfo(@Nullable VkSpecializationInfo value)
Sets the address of the specifiedVkSpecializationInfoto thepSpecializationInfofield.
-
set
public VkPipelineShaderStageCreateInfo set(int sType, long pNext, int flags, int stage, long module, java.nio.ByteBuffer pName, @Nullable VkSpecializationInfo pSpecializationInfo)
Initializes this struct with the specified values.
-
set
public VkPipelineShaderStageCreateInfo set(VkPipelineShaderStageCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkPipelineShaderStageCreateInfo malloc()
Returns a newVkPipelineShaderStageCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPipelineShaderStageCreateInfo calloc()
Returns a newVkPipelineShaderStageCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPipelineShaderStageCreateInfo create()
Returns a newVkPipelineShaderStageCreateInfoinstance allocated withBufferUtils.
-
create
public static VkPipelineShaderStageCreateInfo create(long address)
Returns a newVkPipelineShaderStageCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkPipelineShaderStageCreateInfo createSafe(long address)
-
malloc
public static VkPipelineShaderStageCreateInfo.Buffer malloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPipelineShaderStageCreateInfo.Buffer calloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineShaderStageCreateInfo.Buffer create(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineShaderStageCreateInfo.Buffer create(long address, int capacity)
Create aVkPipelineShaderStageCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkPipelineShaderStageCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkPipelineShaderStageCreateInfo mallocStack()
Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkPipelineShaderStageCreateInfo callocStack()
Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkPipelineShaderStageCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkPipelineShaderStageCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkPipelineShaderStageCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkPipelineShaderStageCreateInfo.Buffer callocStack(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkPipelineShaderStageCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkPipelineShaderStageCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nstage
public static int nstage(long struct)
Unsafe version ofstage().
-
nmodule
public static long nmodule(long struct)
Unsafe version ofmodule().
-
npName
public static java.nio.ByteBuffer npName(long struct)
Unsafe version ofpName().
-
npNameString
public static java.lang.String npNameString(long struct)
Unsafe version ofpNameString().
-
npSpecializationInfo
@Nullable public static VkSpecializationInfo npSpecializationInfo(long struct)
Unsafe version ofpSpecializationInfo().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nstage
public static void nstage(long struct, int value)Unsafe version ofstage.
-
nmodule
public static void nmodule(long struct, long value)Unsafe version ofmodule.
-
npName
public static void npName(long struct, java.nio.ByteBuffer value)Unsafe version ofpName.
-
npSpecializationInfo
public static void npSpecializationInfo(long struct, @Nullable VkSpecializationInfo value)Unsafe version ofpSpecializationInfo.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-