Package org.lwjgl.vulkan
Class VkComputePipelineCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkComputePipelineCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkComputePipelineCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying parameters of a newly created compute pipeline.Description
The parameters
basePipelineHandle
andbasePipelineIndex
are described in more detail in Pipeline Derivatives.stage
points to a structure of typeVkPipelineShaderStageCreateInfo
.Valid Usage
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineIndex
is -1,basePipelineHandle
must be a valid handle to a computeVkPipeline
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineHandle
isNULL_HANDLE
,basePipelineIndex
must be a valid index into the calling command’spCreateInfos
parameter - If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineIndex
is not -1,basePipelineHandle
must beNULL_HANDLE
- If
flags
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, andbasePipelineHandle
is notNULL_HANDLE
,basePipelineIndex
must be -1 - The
stage
member ofstage
must beSHADER_STAGE_COMPUTE_BIT
- The shader code for the entry point identified by
stage
and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter layout
must be consistent with the layout of the compute shader specified instage
- The number of resources in
layout
accessible to the compute shader stage must be less than or equal toVkPhysicalDeviceLimits
::maxPerStageResources
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkPipelineCompilerControlCreateInfoAMD
orVkPipelineCreationFeedbackCreateInfoEXT
- Each
sType
member in thepNext
chain must be unique flags
must be a valid combination ofVkPipelineCreateFlagBits
valuesstage
must be a validVkPipelineShaderStageCreateInfo
structurelayout
must be a validVkPipelineLayout
handle- Both of
basePipelineHandle
, andlayout
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkPipelineShaderStageCreateInfo
,CreateComputePipelines
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.flags
– a bitmask ofVkPipelineCreateFlagBits
specifying how the pipeline will be generated.stage
– aVkPipelineShaderStageCreateInfo
describing the compute shader.layout
– the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.basePipelineHandle
– a pipeline to derive frombasePipelineIndex
– an index into thepCreateInfos
parameter to use as a pipeline to derive from
Layout
struct VkComputePipelineCreateInfo { VkStructureType sType; void const * pNext; VkPipelineCreateFlags flags;
VkPipelineShaderStageCreateInfo
stage; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkComputePipelineCreateInfo.Buffer
An array ofVkComputePipelineCreateInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BASEPIPELINEHANDLE
BASEPIPELINEINDEX
FLAGS
LAYOUT
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STAGE
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkComputePipelineCreateInfo(java.nio.ByteBuffer container)
Creates aVkComputePipelineCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
basePipelineHandle()
Returns the value of thebasePipelineHandle
field.VkComputePipelineCreateInfo
basePipelineHandle(long value)
Sets the specified value to thebasePipelineHandle
field.int
basePipelineIndex()
Returns the value of thebasePipelineIndex
field.VkComputePipelineCreateInfo
basePipelineIndex(int value)
Sets the specified value to thebasePipelineIndex
field.static VkComputePipelineCreateInfo
calloc()
Returns a newVkComputePipelineCreateInfo
instance allocated withmemCalloc
.static VkComputePipelineCreateInfo.Buffer
calloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withmemCalloc
.static VkComputePipelineCreateInfo
callocStack()
Returns a newVkComputePipelineCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkComputePipelineCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkComputePipelineCreateInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComputePipelineCreateInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkComputePipelineCreateInfo
create()
Returns a newVkComputePipelineCreateInfo
instance allocated withBufferUtils
.static VkComputePipelineCreateInfo.Buffer
create(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withBufferUtils
.static VkComputePipelineCreateInfo
create(long address)
Returns a newVkComputePipelineCreateInfo
instance for the specified memory address.static VkComputePipelineCreateInfo.Buffer
create(long address, int capacity)
Create aVkComputePipelineCreateInfo.Buffer
instance at the specified memory.static VkComputePipelineCreateInfo
createSafe(long address)
static VkComputePipelineCreateInfo.Buffer
createSafe(long address, int capacity)
int
flags()
Returns the value of theflags
field.VkComputePipelineCreateInfo
flags(int value)
Sets the specified value to theflags
field.long
layout()
Returns the value of thelayout
field.VkComputePipelineCreateInfo
layout(long value)
Sets the specified value to thelayout
field.static VkComputePipelineCreateInfo
malloc()
Returns a newVkComputePipelineCreateInfo
instance allocated withmemAlloc
.static VkComputePipelineCreateInfo.Buffer
malloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withmemAlloc
.static VkComputePipelineCreateInfo
mallocStack()
Returns a newVkComputePipelineCreateInfo
instance allocated on the thread-localMemoryStack
.static VkComputePipelineCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkComputePipelineCreateInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkComputePipelineCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo
instance allocated on the specifiedMemoryStack
.static long
nbasePipelineHandle(long struct)
Unsafe version ofbasePipelineHandle()
.static void
nbasePipelineHandle(long struct, long value)
Unsafe version ofbasePipelineHandle
.static int
nbasePipelineIndex(long struct)
Unsafe version ofbasePipelineIndex()
.static void
nbasePipelineIndex(long struct, int value)
Unsafe version ofbasePipelineIndex
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static long
nlayout(long struct)
Unsafe version oflayout()
.static void
nlayout(long struct, long value)
Unsafe version oflayout
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkPipelineShaderStageCreateInfo
nstage(long struct)
Unsafe version ofstage()
.static void
nstage(long struct, VkPipelineShaderStageCreateInfo value)
Unsafe version ofstage
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.long
pNext()
Returns the value of thepNext
field.VkComputePipelineCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.VkComputePipelineCreateInfo
set(int sType, long pNext, int flags, VkPipelineShaderStageCreateInfo stage, long layout, long basePipelineHandle, int basePipelineIndex)
Initializes this struct with the specified values.VkComputePipelineCreateInfo
set(VkComputePipelineCreateInfo src)
Copies the specified struct data to this struct.int
sizeof()
VkPipelineShaderStageCreateInfo
stage()
Returns aVkPipelineShaderStageCreateInfo
view of thestage
field.VkComputePipelineCreateInfo
stage(java.util.function.Consumer<VkPipelineShaderStageCreateInfo> consumer)
Passes thestage
field to the specifiedConsumer
.VkComputePipelineCreateInfo
stage(VkPipelineShaderStageCreateInfo value)
Copies the specifiedVkPipelineShaderStageCreateInfo
to thestage
field.int
sType()
Returns the value of thesType
field.VkComputePipelineCreateInfo
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
-
VkComputePipelineCreateInfo
public VkComputePipelineCreateInfo(java.nio.ByteBuffer container)
Creates aVkComputePipelineCreateInfo
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 VkPipelineShaderStageCreateInfo stage()
Returns aVkPipelineShaderStageCreateInfo
view of thestage
field.
-
layout
public long layout()
Returns the value of thelayout
field.
-
basePipelineHandle
public long basePipelineHandle()
Returns the value of thebasePipelineHandle
field.
-
basePipelineIndex
public int basePipelineIndex()
Returns the value of thebasePipelineIndex
field.
-
sType
public VkComputePipelineCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkComputePipelineCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkComputePipelineCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
stage
public VkComputePipelineCreateInfo stage(VkPipelineShaderStageCreateInfo value)
Copies the specifiedVkPipelineShaderStageCreateInfo
to thestage
field.
-
stage
public VkComputePipelineCreateInfo stage(java.util.function.Consumer<VkPipelineShaderStageCreateInfo> consumer)
Passes thestage
field to the specifiedConsumer
.
-
layout
public VkComputePipelineCreateInfo layout(long value)
Sets the specified value to thelayout
field.
-
basePipelineHandle
public VkComputePipelineCreateInfo basePipelineHandle(long value)
Sets the specified value to thebasePipelineHandle
field.
-
basePipelineIndex
public VkComputePipelineCreateInfo basePipelineIndex(int value)
Sets the specified value to thebasePipelineIndex
field.
-
set
public VkComputePipelineCreateInfo set(int sType, long pNext, int flags, VkPipelineShaderStageCreateInfo stage, long layout, long basePipelineHandle, int basePipelineIndex)
Initializes this struct with the specified values.
-
set
public VkComputePipelineCreateInfo set(VkComputePipelineCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkComputePipelineCreateInfo malloc()
Returns a newVkComputePipelineCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkComputePipelineCreateInfo calloc()
Returns a newVkComputePipelineCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkComputePipelineCreateInfo create()
Returns a newVkComputePipelineCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkComputePipelineCreateInfo create(long address)
Returns a newVkComputePipelineCreateInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkComputePipelineCreateInfo createSafe(long address)
-
malloc
public static VkComputePipelineCreateInfo.Buffer malloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkComputePipelineCreateInfo.Buffer calloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkComputePipelineCreateInfo.Buffer create(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkComputePipelineCreateInfo.Buffer create(long address, int capacity)
Create aVkComputePipelineCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkComputePipelineCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkComputePipelineCreateInfo mallocStack()
Returns a newVkComputePipelineCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkComputePipelineCreateInfo callocStack()
Returns a newVkComputePipelineCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkComputePipelineCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkComputePipelineCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkComputePipelineCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkComputePipelineCreateInfo.Buffer callocStack(int capacity)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkComputePipelineCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkComputePipelineCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfo.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 VkPipelineShaderStageCreateInfo nstage(long struct)
Unsafe version ofstage()
.
-
nlayout
public static long nlayout(long struct)
Unsafe version oflayout()
.
-
nbasePipelineHandle
public static long nbasePipelineHandle(long struct)
Unsafe version ofbasePipelineHandle()
.
-
nbasePipelineIndex
public static int nbasePipelineIndex(long struct)
Unsafe version ofbasePipelineIndex()
.
-
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, VkPipelineShaderStageCreateInfo value)
Unsafe version ofstage
.
-
nlayout
public static void nlayout(long struct, long value)
Unsafe version oflayout
.
-
nbasePipelineHandle
public static void nbasePipelineHandle(long struct, long value)
Unsafe version ofbasePipelineHandle
.
-
nbasePipelineIndex
public static void nbasePipelineIndex(long struct, int value)
Unsafe version ofbasePipelineIndex
.
-
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
-
-