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.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 flagsmust not includePIPELINE_CREATE_LIBRARY_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRflagsmust not includePIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NVflagsmust not includePIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV- If the
pipelineCreationCacheControlfeature is not enabled,flagsmust not includePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BITorPIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT
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 ofVkPipelineCompilerControlCreateInfoAMD,VkPipelineCreationFeedbackCreateInfo, orVkSubpassShadingPipelineCreateInfoHUAWEI - The
sTypevalue of each struct in thepNextchain must be unique flagsmust be a valid combination ofVkPipelineCreateFlagBitsvaluesstagemust be a validVkPipelineShaderStageCreateInfostructurelayoutmust be a validVkPipelineLayouthandle- Both of
basePipelineHandle, andlayoutthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkPipelineShaderStageCreateInfo,CreateComputePipelinesLayout
struct VkComputePipelineCreateInfo { VkStructureTypesType(); void const *pNext(); VkPipelineCreateFlagsflags();VkPipelineShaderStageCreateInfostage(); VkPipelineLayoutlayout(); VkPipelinebasePipelineHandle(); int32_tbasePipelineIndex(); }
-
-
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 Deprecated Methods Modifier and Type Method Description longbasePipelineHandle()a pipeline to derive fromVkComputePipelineCreateInfobasePipelineHandle(long value)Sets the specified value to thebasePipelineHandle()field.intbasePipelineIndex()an index into thepCreateInfosparameter to use as a pipeline to derive fromVkComputePipelineCreateInfobasePipelineIndex(int value)Sets the specified value to thebasePipelineIndex()field.static VkComputePipelineCreateInfocalloc()Returns a newVkComputePipelineCreateInfoinstance allocated withmemCalloc.static VkComputePipelineCreateInfo.Buffercalloc(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemCalloc.static VkComputePipelineCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkComputePipelineCreateInfocallocStack()Deprecated.static VkComputePipelineCreateInfo.BuffercallocStack(int capacity)Deprecated.static VkComputePipelineCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkComputePipelineCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()a bitmask ofVkPipelineCreateFlagBitsspecifying how the pipeline will be generated.VkComputePipelineCreateInfoflags(int value)Sets the specified value to theflags()field.longlayout()the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.VkComputePipelineCreateInfolayout(long value)Sets the specified value to thelayout()field.static VkComputePipelineCreateInfomalloc()Returns a newVkComputePipelineCreateInfoinstance allocated withmemAlloc.static VkComputePipelineCreateInfo.Buffermalloc(int capacity)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated withmemAlloc.static VkComputePipelineCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkComputePipelineCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStack.static VkComputePipelineCreateInfomallocStack()Deprecated.static VkComputePipelineCreateInfo.BuffermallocStack(int capacity)Deprecated.static VkComputePipelineCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkComputePipelineCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()NULLor a pointer to a structure extending this structure.VkComputePipelineCreateInfopNext(long value)Sets the specified value to thepNext()field.VkComputePipelineCreateInfopNext(VkPipelineCompilerControlCreateInfoAMD value)Prepends the specifiedVkPipelineCompilerControlCreateInfoAMDvalue to thepNextchain.VkComputePipelineCreateInfopNext(VkPipelineCreationFeedbackCreateInfo value)Prepends the specifiedVkPipelineCreationFeedbackCreateInfovalue to thepNextchain.VkComputePipelineCreateInfopNext(VkPipelineCreationFeedbackCreateInfoEXT value)Prepends the specifiedVkPipelineCreationFeedbackCreateInfoEXTvalue to thepNextchain.VkComputePipelineCreateInfopNext(VkSubpassShadingPipelineCreateInfoHUAWEI value)Prepends the specifiedVkSubpassShadingPipelineCreateInfoHUAWEIvalue to thepNextchain.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()aVkPipelineShaderStageCreateInfostructure describing the compute shader.VkComputePipelineCreateInfostage(java.util.function.Consumer<VkPipelineShaderStageCreateInfo> consumer)Passes thestage()field to the specifiedConsumer.VkComputePipelineCreateInfostage(VkPipelineShaderStageCreateInfo value)Copies the specifiedVkPipelineShaderStageCreateInfoto thestage()field.intsType()the type of this structure.VkComputePipelineCreateInfosType(int value)Sets the specified value to thesType()field.VkComputePipelineCreateInfosType$Default()Sets theSTRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFOvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
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()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
a bitmask ofVkPipelineCreateFlagBitsspecifying how the pipeline will be generated.
-
stage
public VkPipelineShaderStageCreateInfo stage()
aVkPipelineShaderStageCreateInfostructure describing the compute shader.
-
layout
public long layout()
the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.
-
basePipelineHandle
public long basePipelineHandle()
a pipeline to derive from
-
basePipelineIndex
public int basePipelineIndex()
an index into thepCreateInfosparameter to use as a pipeline to derive from
-
sType
public VkComputePipelineCreateInfo sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkComputePipelineCreateInfo sType$Default()
Sets theSTRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFOvalue to thesType()field.
-
pNext
public VkComputePipelineCreateInfo pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkComputePipelineCreateInfo pNext(VkPipelineCompilerControlCreateInfoAMD value)
Prepends the specifiedVkPipelineCompilerControlCreateInfoAMDvalue to thepNextchain.
-
pNext
public VkComputePipelineCreateInfo pNext(VkPipelineCreationFeedbackCreateInfo value)
Prepends the specifiedVkPipelineCreationFeedbackCreateInfovalue to thepNextchain.
-
pNext
public VkComputePipelineCreateInfo pNext(VkPipelineCreationFeedbackCreateInfoEXT value)
Prepends the specifiedVkPipelineCreationFeedbackCreateInfoEXTvalue to thepNextchain.
-
pNext
public VkComputePipelineCreateInfo pNext(VkSubpassShadingPipelineCreateInfoHUAWEI value)
Prepends the specifiedVkSubpassShadingPipelineCreateInfoHUAWEIvalue to thepNextchain.
-
flags
public VkComputePipelineCreateInfo flags(int value)
Sets the specified value to theflags()field.
-
stage
public VkComputePipelineCreateInfo stage(VkPipelineShaderStageCreateInfo value)
Copies the specifiedVkPipelineShaderStageCreateInfoto 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 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
@Deprecated public static VkComputePipelineCreateInfo mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkComputePipelineCreateInfo callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkComputePipelineCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkComputePipelineCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkComputePipelineCreateInfo.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkComputePipelineCreateInfo.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkComputePipelineCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkComputePipelineCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkComputePipelineCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkComputePipelineCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkComputePipelineCreateInfo calloc(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
-
malloc
public static VkComputePipelineCreateInfo.Buffer malloc(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
-
calloc
public static VkComputePipelineCreateInfo.Buffer calloc(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
-
-