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.NativeResource
Structure specifying parameters of a newly created pipeline shader stage.Valid Usage
- If the geometry shaders feature is not enabled,
stage
must not beSHADER_STAGE_GEOMETRY_BIT
- If the tessellation shaders feature is not enabled,
stage
must not beSHADER_STAGE_TESSELLATION_CONTROL_BIT
orSHADER_STAGE_TESSELLATION_EVALUATION_BIT
- If the mesh shader feature is not enabled,
stage
must not beSHADER_STAGE_MESH_BIT_NV
- If the task shader feature is not enabled,
stage
must not beSHADER_STAGE_TASK_BIT_NV
stage
must not beSHADER_STAGE_ALL_GRAPHICS
, orSHADER_STAGE_ALL
pName
must be the name of anOpEntryPoint
inmodule
with an execution model that matchesstage
- If the identified entry point includes any variable in its interface that is declared with the
ClipDistance
BuiltIn
decoration, 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
CullDistance
BuiltIn
decoration, 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
ClipDistance
orCullDistance
BuiltIn
decoration, 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
SampleMask
BuiltIn
decoration, that variable must not have an array size greater thanVkPhysicalDeviceLimits
::maxSampleMaskWords
- If
stage
isSHADER_STAGE_VERTEX_BIT
, the identified entry point must not include any input variable in its interface that is decorated withCullDistance
- If
stage
isSHADER_STAGE_TESSELLATION_CONTROL_BIT
orSHADER_STAGE_TESSELLATION_EVALUATION_BIT
, and the identified entry point has anOpExecutionMode
instruction that specifies a patch size withOutputVertices
, the patch size must be greater than 0 and less than or equal toVkPhysicalDeviceLimits
::maxTessellationPatchSize
- If
stage
isSHADER_STAGE_GEOMETRY_BIT
, the identified entry point must have anOpExecutionMode
instruction that specifies a maximum output vertex count that is greater than 0 and less than or equal toVkPhysicalDeviceLimits
::maxGeometryOutputVertices
- If
stage
isSHADER_STAGE_GEOMETRY_BIT
, the identified entry point must have anOpExecutionMode
instruction that specifies an invocation count that is greater than 0 and less than or equal toVkPhysicalDeviceLimits
::maxGeometryShaderInvocations
- If
stage
is a vertex processing stage, and the identified entry point writes toLayer
for any primitive, it must write the same value toLayer
for all vertices of a given primitive - If
stage
is a vertex processing stage, and the identified entry point writes toViewportIndex
for any primitive, it must write the same value toViewportIndex
for all vertices of a given primitive - If
stage
isSHADER_STAGE_FRAGMENT_BIT
, the identified entry point must not include any output variables in its interface decorated withCullDistance
- If
stage
isSHADER_STAGE_FRAGMENT_BIT
, and the identified entry point writes toFragDepth
in any execution path, it must write toFragDepth
in all execution paths - If
stage
isSHADER_STAGE_FRAGMENT_BIT
, and the identified entry point writes toFragStencilRefEXT
in any execution path, it must write toFragStencilRefEXT
in all execution paths - If
stage
isSHADER_STAGE_MESH_BIT_NV
, the identified entry point must have anOpExecutionMode
instruction that specifies a maximum output vertex count,OutputVertices
, that is greater than 0 and less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV
::maxMeshOutputVertices
. - If
stage
isSHADER_STAGE_MESH_BIT_NV
, the identified entry point must have anOpExecutionMode
instruction that specifies a maximum output primitive count,OutputPrimitivesNV
, that is greater than 0 and less than or equal toVkPhysicalDeviceMeshShaderPropertiesNV
::maxMeshOutputPrimitives
. - If
flags
has thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
flag set, thesubgroupSizeControl
feature must be enabled. - If
flags
has thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
flag set, thecomputeFullSubgroups
feature must be enabled. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
structure is chained topNext
,flags
must not have thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
flag set. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
structure is chained topNext
, thesubgroupSizeControl
feature must be enabled, andstage
must be a valid bit specified inrequiredSubgroupSizeStages
. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
structure is chained topNext
andstage
is VK_SHADER_STAGE_COMPUTE_BIT then local workgroup size of the shader must be less than or equal to the product ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
::requiredSubgroupSize
andmaxComputeWorkgroupSubgroups
. - If a
VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
structure is chained topNext
, andflags
has thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
flag set, the local workgroup size in the X dimension of the pipeline must be a multiple ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
::requiredSubgroupSize
. - If
flags
has both thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
andPIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
flags set, the local workgroup size in the X dimension of the pipeline must be a multiple ofmaxSubgroupSize
. - If
flags
has thePIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT
flag set andflags
does not have thePIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT
flag set and noVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
structure is chained topNext
, the local workgroup size in the X dimension of the pipeline must be a multiple ofsubgroupSize
.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofVkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
flags
must be a valid combination ofVkPipelineShaderStageCreateFlagBits
valuesstage
must be a validVkShaderStageFlagBits
valuemodule
must be a validVkShaderModule
handlepName
must be a null-terminated UTF-8 string- If
pSpecializationInfo
is notNULL
,pSpecializationInfo
must be a valid pointer to a validVkSpecializationInfo
structure
See Also
VkComputePipelineCreateInfo
,VkGraphicsPipelineCreateInfo
,VkRayTracingPipelineCreateInfoNV
,VkSpecializationInfo
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.flags
– a bitmask ofVkPipelineShaderStageCreateFlagBits
specifying how the pipeline shader stage will be generated.stage
– aVkShaderStageFlagBits
value specifying a single pipeline stage.module
– aVkShaderModule
object 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;
VkSpecializationInfo
const * pSpecializationInfo; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkPipelineShaderStageCreateInfo.Buffer
An array ofVkPipelineShaderStageCreateInfo
structs.
-
Constructor Summary
Constructors Constructor Description VkPipelineShaderStageCreateInfo(java.nio.ByteBuffer container)
Creates aVkPipelineShaderStageCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkPipelineShaderStageCreateInfo
calloc()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated withmemCalloc
.static VkPipelineShaderStageCreateInfo.Buffer
calloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withmemCalloc
.static VkPipelineShaderStageCreateInfo
callocStack()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineShaderStageCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineShaderStageCreateInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineShaderStageCreateInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineShaderStageCreateInfo
create()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated withBufferUtils
.static VkPipelineShaderStageCreateInfo.Buffer
create(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withBufferUtils
.static VkPipelineShaderStageCreateInfo
create(long address)
Returns a newVkPipelineShaderStageCreateInfo
instance for the specified memory address.static VkPipelineShaderStageCreateInfo.Buffer
create(long address, int capacity)
Create aVkPipelineShaderStageCreateInfo.Buffer
instance at the specified memory.static VkPipelineShaderStageCreateInfo
createSafe(long address)
static VkPipelineShaderStageCreateInfo.Buffer
createSafe(long address, int capacity)
int
flags()
Returns the value of theflags
field.VkPipelineShaderStageCreateInfo
flags(int value)
Sets the specified value to theflags
field.static VkPipelineShaderStageCreateInfo
malloc()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated withmemAlloc
.static VkPipelineShaderStageCreateInfo.Buffer
malloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withmemAlloc
.static VkPipelineShaderStageCreateInfo
mallocStack()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the thread-localMemoryStack
.static VkPipelineShaderStageCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkPipelineShaderStageCreateInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkPipelineShaderStageCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the specifiedMemoryStack
.long
module()
Returns the value of themodule
field.VkPipelineShaderStageCreateInfo
module(long value)
Sets the specified value to themodule
field.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static long
nmodule(long struct)
Unsafe version ofmodule()
.static void
nmodule(long struct, long value)
Unsafe version ofmodule
.static java.nio.ByteBuffer
npName(long struct)
Unsafe version ofpName()
.static void
npName(long struct, java.nio.ByteBuffer value)
Unsafe version ofpName
.static java.lang.String
npNameString(long struct)
Unsafe version ofpNameString()
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkSpecializationInfo
npSpecializationInfo(long struct)
Unsafe version ofpSpecializationInfo()
.static void
npSpecializationInfo(long struct, VkSpecializationInfo value)
Unsafe version ofpSpecializationInfo
.static int
nstage(long struct)
Unsafe version ofstage()
.static void
nstage(long struct, int value)
Unsafe version ofstage
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.java.nio.ByteBuffer
pName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepName
field.VkPipelineShaderStageCreateInfo
pName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepName
field.java.lang.String
pNameString()
Decodes the null-terminated string pointed to by thepName
field.long
pNext()
Returns the value of thepNext
field.VkPipelineShaderStageCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.VkSpecializationInfo
pSpecializationInfo()
Returns aVkSpecializationInfo
view of the struct pointed to by thepSpecializationInfo
field.VkPipelineShaderStageCreateInfo
pSpecializationInfo(VkSpecializationInfo value)
Sets the address of the specifiedVkSpecializationInfo
to thepSpecializationInfo
field.VkPipelineShaderStageCreateInfo
set(int sType, long pNext, int flags, int stage, long module, java.nio.ByteBuffer pName, VkSpecializationInfo pSpecializationInfo)
Initializes this struct with the specified values.VkPipelineShaderStageCreateInfo
set(VkPipelineShaderStageCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
int
stage()
Returns the value of thestage
field.VkPipelineShaderStageCreateInfo
stage(int value)
Sets the specified value to thestage
field.int
sType()
Returns the value of thesType
field.VkPipelineShaderStageCreateInfo
sType(int value)
Sets the specified value to thesType
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkPipelineShaderStageCreateInfo
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
stage
public int stage()
Returns the value of thestage
field.
-
module
public long module()
Returns the value of themodule
field.
-
pName
public java.nio.ByteBuffer pName()
Returns aByteBuffer
view of the null-terminated string pointed to by thepName
field.
-
pNameString
public java.lang.String pNameString()
Decodes the null-terminated string pointed to by thepName
field.
-
pSpecializationInfo
@Nullable public VkSpecializationInfo pSpecializationInfo()
Returns aVkSpecializationInfo
view of the struct pointed to by thepSpecializationInfo
field.
-
sType
public VkPipelineShaderStageCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkPipelineShaderStageCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkPipelineShaderStageCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
stage
public VkPipelineShaderStageCreateInfo stage(int value)
Sets the specified value to thestage
field.
-
module
public VkPipelineShaderStageCreateInfo module(long value)
Sets the specified value to themodule
field.
-
pName
public VkPipelineShaderStageCreateInfo pName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thepName
field.
-
pSpecializationInfo
public VkPipelineShaderStageCreateInfo pSpecializationInfo(@Nullable VkSpecializationInfo value)
Sets the address of the specifiedVkSpecializationInfo
to thepSpecializationInfo
field.
-
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 newVkPipelineShaderStageCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPipelineShaderStageCreateInfo calloc()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPipelineShaderStageCreateInfo create()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkPipelineShaderStageCreateInfo create(long address)
Returns a newVkPipelineShaderStageCreateInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkPipelineShaderStageCreateInfo createSafe(long address)
-
malloc
public static VkPipelineShaderStageCreateInfo.Buffer malloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPipelineShaderStageCreateInfo.Buffer calloc(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineShaderStageCreateInfo.Buffer create(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineShaderStageCreateInfo.Buffer create(long address, int capacity)
Create aVkPipelineShaderStageCreateInfo.Buffer
instance 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 newVkPipelineShaderStageCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPipelineShaderStageCreateInfo callocStack()
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPipelineShaderStageCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPipelineShaderStageCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPipelineShaderStageCreateInfo.Buffer callocStack(int capacity)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
-
-