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.NativeResourceStructure specifying parameters of a newly created compute pipeline.Description
The parameters
basePipelineHandleandbasePipelineIndexare described in more detail in Pipeline Derivatives.stagepoints to a structure of typeVkPipelineShaderStageCreateInfo.Valid Usage
- If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineIndexis -1,basePipelineHandlemust be a valid handle to a computeVkPipeline - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineHandleisNULL_HANDLE,basePipelineIndexmust be a valid index into the calling command’spCreateInfosparameter - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineIndexis not -1,basePipelineHandlemust beNULL_HANDLE - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineHandleis notNULL_HANDLE,basePipelineIndexmust be -1 - The
stagemember ofstagemust beSHADER_STAGE_COMPUTE_BIT - The shader code for the entry point identified by
stageand the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter layoutmust be consistent with the layout of the compute shader specified instage- The number of resources in
layoutaccessible to the compute shader stage must be less than or equal toVkPhysicalDeviceLimits::maxPerStageResources
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkPipelineCompilerControlCreateInfoAMDorVkPipelineCreationFeedbackCreateInfoEXT - Each
sTypemember in thepNextchain must be unique flagsmust be a valid combination ofVkPipelineCreateFlagBitsvaluesstagemust be a validVkPipelineShaderStageCreateInfostructurelayoutmust be a validVkPipelineLayouthandle- Both of
basePipelineHandle, andlayoutthat are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkPipelineShaderStageCreateInfo,CreateComputePipelinesMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.flags– a bitmask ofVkPipelineCreateFlagBitsspecifying how the pipeline will be generated.stage– aVkPipelineShaderStageCreateInfodescribing 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 thepCreateInfosparameter to use as a pipeline to derive from
Layout
struct VkComputePipelineCreateInfo { VkStructureType sType; void const * pNext; VkPipelineCreateFlags flags;VkPipelineShaderStageCreateInfostage; VkPipelineLayout layout; VkPipeline basePipelineHandle; int32_t basePipelineIndex; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkComputePipelineCreateInfo.BufferAn array ofVkComputePipelineCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBASEPIPELINEHANDLE
BASEPIPELINEINDEX
FLAGS
LAYOUT
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTAGE
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkComputePipelineCreateInfo(java.nio.ByteBuffer container)Creates aVkComputePipelineCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longbasePipelineHandle()Returns the value of thebasePipelineHandlefield.VkComputePipelineCreateInfobasePipelineHandle(long value)Sets the specified value to thebasePipelineHandlefield.intbasePipelineIndex()Returns the value of thebasePipelineIndexfield.VkComputePipelineCreateInfobasePipelineIndex(int value)Sets the specified value to thebasePipelineIndexfield.static VkComputePipelineCreateInfocalloc()Returns a newVkComputePipelineCreateInfoinstance allocated withmemCalloc.static VkComputePipelineCreateInfo.Buffercalloc(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemCalloc.static VkComputePipelineCreateInfocallocStack()Returns a newVkComputePipelineCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfo.BuffercallocStack(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfocreate()Returns a newVkComputePipelineCreateInfoinstance allocated withBufferUtils.static VkComputePipelineCreateInfo.Buffercreate(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withBufferUtils.static VkComputePipelineCreateInfocreate(long address)Returns a newVkComputePipelineCreateInfoinstance for the specified memory address.static VkComputePipelineCreateInfo.Buffercreate(long address, int capacity)Create aVkComputePipelineCreateInfo.Bufferinstance at the specified memory.static VkComputePipelineCreateInfocreateSafe(long address)static VkComputePipelineCreateInfo.BuffercreateSafe(long address, int capacity)intflags()Returns the value of theflagsfield.VkComputePipelineCreateInfoflags(int value)Sets the specified value to theflagsfield.longlayout()Returns the value of thelayoutfield.VkComputePipelineCreateInfolayout(long value)Sets the specified value to thelayoutfield.static VkComputePipelineCreateInfomalloc()Returns a newVkComputePipelineCreateInfoinstance allocated withmemAlloc.static VkComputePipelineCreateInfo.Buffermalloc(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemAlloc.static VkComputePipelineCreateInfomallocStack()Returns a newVkComputePipelineCreateInfoinstance allocated on the thread-localMemoryStack.static VkComputePipelineCreateInfo.BuffermallocStack(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkComputePipelineCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkComputePipelineCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStack.static longnbasePipelineHandle(long struct)Unsafe version ofbasePipelineHandle().static voidnbasePipelineHandle(long struct, long value)Unsafe version ofbasePipelineHandle.static intnbasePipelineIndex(long struct)Unsafe version ofbasePipelineIndex().static voidnbasePipelineIndex(long struct, int value)Unsafe version ofbasePipelineIndex.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static longnlayout(long struct)Unsafe version oflayout().static voidnlayout(long struct, long value)Unsafe version oflayout.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkPipelineShaderStageCreateInfonstage(long struct)Unsafe version ofstage().static voidnstage(long struct, VkPipelineShaderStageCreateInfo value)Unsafe version ofstage.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()Returns the value of thepNextfield.VkComputePipelineCreateInfopNext(long value)Sets the specified value to thepNextfield.VkComputePipelineCreateInfoset(int sType, long pNext, int flags, VkPipelineShaderStageCreateInfo stage, long layout, long basePipelineHandle, int basePipelineIndex)Initializes this struct with the specified values.VkComputePipelineCreateInfoset(VkComputePipelineCreateInfo src)Copies the specified struct data to this struct.intsizeof()VkPipelineShaderStageCreateInfostage()Returns aVkPipelineShaderStageCreateInfoview of thestagefield.VkComputePipelineCreateInfostage(java.util.function.Consumer<VkPipelineShaderStageCreateInfo> consumer)Passes thestagefield to the specifiedConsumer.VkComputePipelineCreateInfostage(VkPipelineShaderStageCreateInfo value)Copies the specifiedVkPipelineShaderStageCreateInfoto thestagefield.intsType()Returns the value of thesTypefield.VkComputePipelineCreateInfosType(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
-
VkComputePipelineCreateInfo
public VkComputePipelineCreateInfo(java.nio.ByteBuffer container)
Creates aVkComputePipelineCreateInfoinstance 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 VkPipelineShaderStageCreateInfo stage()
Returns aVkPipelineShaderStageCreateInfoview of thestagefield.
-
layout
public long layout()
Returns the value of thelayoutfield.
-
basePipelineHandle
public long basePipelineHandle()
Returns the value of thebasePipelineHandlefield.
-
basePipelineIndex
public int basePipelineIndex()
Returns the value of thebasePipelineIndexfield.
-
sType
public VkComputePipelineCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkComputePipelineCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkComputePipelineCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
stage
public VkComputePipelineCreateInfo stage(VkPipelineShaderStageCreateInfo value)
Copies the specifiedVkPipelineShaderStageCreateInfoto thestagefield.
-
stage
public VkComputePipelineCreateInfo stage(java.util.function.Consumer<VkPipelineShaderStageCreateInfo> consumer)
Passes thestagefield to the specifiedConsumer.
-
layout
public VkComputePipelineCreateInfo layout(long value)
Sets the specified value to thelayoutfield.
-
basePipelineHandle
public VkComputePipelineCreateInfo basePipelineHandle(long value)
Sets the specified value to thebasePipelineHandlefield.
-
basePipelineIndex
public VkComputePipelineCreateInfo basePipelineIndex(int value)
Sets the specified value to thebasePipelineIndexfield.
-
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 newVkComputePipelineCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkComputePipelineCreateInfo calloc()
Returns a newVkComputePipelineCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkComputePipelineCreateInfo create()
Returns a newVkComputePipelineCreateInfoinstance allocated withBufferUtils.
-
create
public static VkComputePipelineCreateInfo create(long address)
Returns a newVkComputePipelineCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkComputePipelineCreateInfo createSafe(long address)
-
malloc
public static VkComputePipelineCreateInfo.Buffer malloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkComputePipelineCreateInfo.Buffer calloc(int capacity)
Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkComputePipelineCreateInfo.Buffer create(int capacity)
Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkComputePipelineCreateInfo.Buffer create(long address, int capacity)
Create aVkComputePipelineCreateInfo.Bufferinstance 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 newVkComputePipelineCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkComputePipelineCreateInfo callocStack()
Returns a newVkComputePipelineCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkComputePipelineCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkComputePipelineCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkComputePipelineCreateInfo.Buffer callocStack(int capacity)
Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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 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
-
-