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, NativeResource, Pointer
public class VkPipelineShaderStageCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a shader stage should be created.
Valid Usage
sType
must beSTRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
pNext
must beNULL
flags
must be 0stage
must be a validVkShaderStageFlagBits
valuemodule
must be a validVkShaderModule
handlepName
must be a null-terminated string- If
pSpecializationInfo
is notNULL
,pSpecializationInfo
must be a pointer to a validVkSpecializationInfo
structure - 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
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
isSHADER_STAGE_GEOMETRY_BIT
, 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
isSHADER_STAGE_GEOMETRY_BIT
, 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
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
pNext
– reserved for use by extensionsflags
– reserved for future usestage
– aVkShaderStageFlagBits
naming the pipeline stage. One or more of:module
– aVkShaderModule
object that contains the shader for this stagepName
– a pointer to a null-terminated UTF-8 string specifying the entry point name of the shader for this stagepSpecializationInfo
– a pointer toVkSpecializationInfo
, can beNULL
Layout
struct VkPipelineShaderStageCreateInfo { VkStructureType sType; const void * pNext; VkPipelineShaderStageCreateFlags flags; VkShaderStageFlagBits stage; VkShaderModule module; const char * pName; const VkSpecializationInfo * pSpecializationInfo; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkPipelineShaderStageCreateInfo.Buffer
An array ofVkPipelineShaderStageCreateInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineShaderStageCreateInfo
callocStack(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 ornull
if the address isNULL
.static VkPipelineShaderStageCreateInfo.Buffer
create(long address, int capacity)
Create aVkPipelineShaderStageCreateInfo.Buffer
instance at the specified memory.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, MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkPipelineShaderStageCreateInfo
mallocStack(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.VkPipelineShaderStageCreateInfo
nset(long struct)
Unsafe version ofset
.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()
Returns thesizeof(struct)
.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)
CallsVkPipelineShaderStageCreateInfo.validate(long)
for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:Struct
Returns thesizeof(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
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(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, VkSpecializationInfo pSpecializationInfo)
Initializes this struct with the specified values.
-
nset
public VkPipelineShaderStageCreateInfo nset(long struct)
Unsafe version ofset
.
-
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 ornull
if the address isNULL
.
-
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
-
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(MemoryStack stack)
Returns a newVkPipelineShaderStageCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPipelineShaderStageCreateInfo callocStack(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, 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, 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
-
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)
CallsVkPipelineShaderStageCreateInfo.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-