Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkGraphicsPipelineCreateInfo

extends Struct<VkGraphicsPipelineCreateInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying parameters of a newly created graphics pipeline.
Description

The parameters basePipelineHandle and basePipelineIndex are described in more detail in Pipeline Derivatives.

If any shader stage fails to compile, the compile log will be reported back to the application, and ERROR_INVALID_SHADER_NV will be generated.

Note

With VK_EXT_extended_dynamic_state3, it is possible that many of the VkGraphicsPipelineCreateInfo members above can be NULL because all their state is dynamic and therefore ignored. This is optional so the application can still use a valid pointer if it needs to set the pNext or flags fields to specify state for other extensions.

The state required for a graphics pipeline is divided into vertex input state, pre-rasterization shader state, fragment shader state, and fragment output state.

Vertex input state is defined by:

If this pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and its pStages includes a vertex shader, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Pre-rasterization shader state is defined by:

This state must be specified to create a complete graphics pipeline.

If either the pNext chain includes a VkGraphicsPipelineLibraryCreateInfoEXT structure with GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT included in flags, or it is not specified and would default to include that value, this state must be specified in the pipeline.

Fragment shader state is defined by:

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and rasterizerDiscardEnable is set to FALSE or DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Fragment output state is defined by:

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and rasterizerDiscardEnable is set to FALSE or DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Dynamic state values set via pDynamicState must be ignored if the state they correspond to is not otherwise statically set by one of the state subsets used to create the pipeline. Additionally, setting dynamic state values must not modify whether state in a linked library is static or dynamic; this is set and unchangeable when the library is created. For example, if a pipeline only included pre-rasterization shader state, then any dynamic state value corresponding to depth or stencil testing has no effect. Any linked library that has dynamic state enabled that same dynamic state must also be enabled in all the other linked libraries to which that dynamic state applies.

A complete graphics pipeline always includes pre-rasterization shader state, with other subsets included depending on that state as specified in the above sections.

If different subsets are linked together with pipeline layouts created with PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the final effective pipeline layout is effectively the union of the linked pipeline layouts. When binding descriptor sets for this pipeline, the pipeline layout used must be compatible with this union. This pipeline layout can be overridden when linking with PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is compatible with this union other than PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, or when linking without PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is fully compatible with this union.

If a VkPipelineCreateFlags2CreateInfoKHR structure is present in the pNext chain, VkPipelineCreateFlags2CreateInfoKHR::flags from that structure is used instead of flags from this structure.

Valid Usage
Valid Usage (Implicit)
See Also

VkPipelineColorBlendStateCreateInfo, VkPipelineDepthStencilStateCreateInfo, VkPipelineDynamicStateCreateInfo, VkPipelineInputAssemblyStateCreateInfo, VkPipelineMultisampleStateCreateInfo, VkPipelineRasterizationStateCreateInfo, VkPipelineShaderStageCreateInfo, VkPipelineTessellationStateCreateInfo, VkPipelineVertexInputStateCreateInfo, VkPipelineViewportStateCreateInfo, CreateGraphicsPipelines

Layout


struct VkGraphicsPipelineCreateInfo {
    VkStructureType sType;
    void const * pNext;
    VkPipelineCreateFlags flags;
    uint32_t stageCount;
    VkPipelineShaderStageCreateInfo const * pStages;
    VkPipelineVertexInputStateCreateInfo const * pVertexInputState;
    VkPipelineInputAssemblyStateCreateInfo const * pInputAssemblyState;
    VkPipelineTessellationStateCreateInfo const * pTessellationState;
    VkPipelineViewportStateCreateInfo const * pViewportState;
    VkPipelineRasterizationStateCreateInfo const * pRasterizationState;
    VkPipelineMultisampleStateCreateInfo const * pMultisampleState;
    VkPipelineDepthStencilStateCreateInfo const * pDepthStencilState;
    VkPipelineColorBlendStateCreateInfo const * pColorBlendState;
    VkPipelineDynamicStateCreateInfo const * pDynamicState;
    VkPipelineLayout layout;
    VkRenderPass renderPass;
    uint32_t subpass;
    VkPipeline basePipelineHandle;
    int32_t basePipelineIndex;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BASEPIPELINEHANDLE

The struct member offsets.

public static final int
BASEPIPELINEINDEX

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
LAYOUT

The struct member offsets.

public static final int
PCOLORBLENDSTATE

The struct member offsets.

public static final int
PDEPTHSTENCILSTATE

The struct member offsets.

public static final int
PDYNAMICSTATE

The struct member offsets.

public static final int
PINPUTASSEMBLYSTATE

The struct member offsets.

public static final int
PMULTISAMPLESTATE

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PRASTERIZATIONSTATE

The struct member offsets.

public static final int
PSTAGES

The struct member offsets.

public static final int
PTESSELLATIONSTATE

The struct member offsets.

public static final int
PVERTEXINPUTSTATE

The struct member offsets.

public static final int
PVIEWPORTSTATE

The struct member offsets.

public static final int
RENDERPASS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STAGECOUNT

The struct member offsets.

public static final int
STYPE

The struct member offsets.

public static final int
SUBPASS

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkGraphicsPipelineCreateInfo(long address, ByteBuffer container)

public
VkGraphicsPipelineCreateInfo(ByteBuffer container)

Creates a VkGraphicsPipelineCreateInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public long
basePipelineHandle()

a pipeline to derive from.

public VkGraphicsPipelineCreateInfo
basePipelineHandle(long value)

Sets the specified value to the basePipelineHandle field.

public int
basePipelineIndex()

an index into the pCreateInfos parameter to use as a pipeline to derive from.

public VkGraphicsPipelineCreateInfo
basePipelineIndex(int value)

Sets the specified value to the basePipelineIndex field.

public static VkGraphicsPipelineCreateInfo
calloc()

Returns a new VkGraphicsPipelineCreateInfo instance allocated with memCalloc.

public static VkGraphicsPipelineCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkGraphicsPipelineCreateInfo.Buffer instance allocated with memCalloc.

public static VkGraphicsPipelineCreateInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkGraphicsPipelineCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkGraphicsPipelineCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkGraphicsPipelineCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkGraphicsPipelineCreateInfo
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkGraphicsPipelineCreateInfo
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkGraphicsPipelineCreateInfo
create()

Returns a new VkGraphicsPipelineCreateInfo instance allocated with BufferUtils.

public static VkGraphicsPipelineCreateInfo
create(long address)

Returns a new VkGraphicsPipelineCreateInfo instance for the specified memory address.

public static VkGraphicsPipelineCreateInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkGraphicsPipelineCreateInfo.Buffer instance allocated with BufferUtils.

public static VkGraphicsPipelineCreateInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkGraphicsPipelineCreateInfo.Buffer instance at the specified memory.

public static VkGraphicsPipelineCreateInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkGraphicsPipelineCreateInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
flags()

a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

public VkGraphicsPipelineCreateInfo
flags(int value)

Sets the specified value to the flags field.

public long
layout()

the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.

public VkGraphicsPipelineCreateInfo
layout(long value)

Sets the specified value to the layout field.

public static VkGraphicsPipelineCreateInfo
malloc()

Returns a new VkGraphicsPipelineCreateInfo instance allocated with memAlloc.

public static VkGraphicsPipelineCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkGraphicsPipelineCreateInfo.Buffer instance allocated with memAlloc.

public static VkGraphicsPipelineCreateInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkGraphicsPipelineCreateInfo instance allocated on the specified MemoryStack.

public static VkGraphicsPipelineCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkGraphicsPipelineCreateInfo.Buffer instance allocated on the specified MemoryStack.

public static VkGraphicsPipelineCreateInfo
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkGraphicsPipelineCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static long
nbasePipelineHandle(long struct)

Unsafe version of basePipelineHandle.

public static void
nbasePipelineHandle(long struct, long value)

Unsafe version of basePipelineHandle.

public static int
nbasePipelineIndex(long struct)

Unsafe version of basePipelineIndex.

public static void
nbasePipelineIndex(long struct, int value)

Unsafe version of basePipelineIndex.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static long
nlayout(long struct)

Unsafe version of layout.

public static void
nlayout(long struct, long value)

Unsafe version of layout.

public static VkPipelineColorBlendStateCreateInfo
npColorBlendState(long struct)

Unsafe version of pColorBlendState.

public static void
public static VkPipelineDepthStencilStateCreateInfo
npDepthStencilState(long struct)

Unsafe version of pDepthStencilState.

public static void
public static VkPipelineDynamicStateCreateInfo
npDynamicState(long struct)

Unsafe version of pDynamicState.

public static void
npDynamicState(long struct, VkPipelineDynamicStateCreateInfo value)

Unsafe version of pDynamicState.

public static VkPipelineInputAssemblyStateCreateInfo
npInputAssemblyState(long struct)

Unsafe version of pInputAssemblyState.

public static void
public static VkPipelineMultisampleStateCreateInfo
npMultisampleState(long struct)

Unsafe version of pMultisampleState.

public static void
public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static VkPipelineRasterizationStateCreateInfo
npRasterizationState(long struct)

Unsafe version of pRasterizationState.

public static void
public static VkPipelineShaderStageCreateInfo.Buffer
npStages(long struct)

Unsafe version of pStages.

public static void
npStages(long struct, VkPipelineShaderStageCreateInfo.Buffer value)

Unsafe version of pStages.

public static VkPipelineTessellationStateCreateInfo
npTessellationState(long struct)

Unsafe version of pTessellationState.

public static void
public static VkPipelineVertexInputStateCreateInfo
npVertexInputState(long struct)

Unsafe version of pVertexInputState.

public static void
public static VkPipelineViewportStateCreateInfo
npViewportState(long struct)

Unsafe version of pViewportState.

public static void
public static long
nrenderPass(long struct)

Unsafe version of renderPass.

public static void
nrenderPass(long struct, long value)

Unsafe version of renderPass.

public static int
nstageCount(long struct)

Unsafe version of stageCount.

public static void
nstageCount(long struct, int value)

Sets the specified value to the stageCount field of the specified struct.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static int
nsubpass(long struct)

Unsafe version of subpass.

public static void
nsubpass(long struct, int value)

Unsafe version of subpass.

public VkPipelineColorBlendStateCreateInfo
pColorBlendState()

a pointer to a VkPipelineColorBlendStateCreateInfo structure defining color blend state used when rasterization is enabled for any color attachments accessed during rendering.

public VkGraphicsPipelineCreateInfo
public VkPipelineDepthStencilStateCreateInfo
pDepthStencilState()

a pointer to a VkPipelineDepthStencilStateCreateInfo structure defining depth/stencil state used when rasterization is enabled for depth or stencil attachments accessed during rendering.

public VkGraphicsPipelineCreateInfo
public VkPipelineDynamicStateCreateInfo
pDynamicState()

a pointer to a VkPipelineDynamicStateCreateInfo structure defining which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state.

public VkGraphicsPipelineCreateInfo
public VkPipelineInputAssemblyStateCreateInfo
pInputAssemblyState()

a pointer to a VkPipelineInputAssemblyStateCreateInfo structure which determines input assembly behavior for vertex shading, as described in Drawing Commands.

public VkGraphicsPipelineCreateInfo
public VkPipelineMultisampleStateCreateInfo
pMultisampleState()

a pointer to a VkPipelineMultisampleStateCreateInfo structure defining multisample state used when rasterization is enabled.

public VkGraphicsPipelineCreateInfo
public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkGraphicsPipelineCreateInfo
pNext(long value)

Sets the specified value to the pNext field.

public VkGraphicsPipelineCreateInfo
pNext(VkAttachmentSampleCountInfoAMD value)

Prepends the specified VkAttachmentSampleCountInfoAMD value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkAttachmentSampleCountInfoNV value)

Prepends the specified VkAttachmentSampleCountInfoNV value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkGraphicsPipelineLibraryCreateInfoEXT value)

Prepends the specified VkGraphicsPipelineLibraryCreateInfoEXT value to the pNext chain.

public VkGraphicsPipelineCreateInfo
public VkGraphicsPipelineCreateInfo
pNext(VkMultiviewPerViewAttributesInfoNVX value)

Prepends the specified VkMultiviewPerViewAttributesInfoNVX value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineCompilerControlCreateInfoAMD value)

Prepends the specified VkPipelineCompilerControlCreateInfoAMD value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineCreateFlags2CreateInfoKHR value)

Prepends the specified VkPipelineCreateFlags2CreateInfoKHR value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineCreationFeedbackCreateInfo value)

Prepends the specified VkPipelineCreationFeedbackCreateInfo value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineCreationFeedbackCreateInfoEXT value)

Prepends the specified VkPipelineCreationFeedbackCreateInfoEXT value to the pNext chain.

public VkGraphicsPipelineCreateInfo
public VkGraphicsPipelineCreateInfo
public VkGraphicsPipelineCreateInfo
public VkGraphicsPipelineCreateInfo
pNext(VkPipelineLibraryCreateInfoKHR value)

Prepends the specified VkPipelineLibraryCreateInfoKHR value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineRenderingCreateInfo value)

Prepends the specified VkPipelineRenderingCreateInfo value to the pNext chain.

public VkGraphicsPipelineCreateInfo
pNext(VkPipelineRenderingCreateInfoKHR value)

Prepends the specified VkPipelineRenderingCreateInfoKHR value to the pNext chain.

public VkGraphicsPipelineCreateInfo
public VkGraphicsPipelineCreateInfo
pNext(VkPipelineRobustnessCreateInfoEXT value)

Prepends the specified VkPipelineRobustnessCreateInfoEXT value to the pNext chain.

public VkPipelineRasterizationStateCreateInfo
pRasterizationState()

a pointer to a VkPipelineRasterizationStateCreateInfo structure defining rasterization state.

public VkGraphicsPipelineCreateInfo
public VkPipelineShaderStageCreateInfo.Buffer
pStages()

a pointer to an array of stageCount VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the graphics pipeline.

public VkGraphicsPipelineCreateInfo
public VkPipelineTessellationStateCreateInfo
pTessellationState()

a pointer to a VkPipelineTessellationStateCreateInfo structure defining tessellation state used by tessellation shaders.

public VkGraphicsPipelineCreateInfo
public VkPipelineVertexInputStateCreateInfo
public VkGraphicsPipelineCreateInfo
public VkPipelineViewportStateCreateInfo
pViewportState()

a pointer to a VkPipelineViewportStateCreateInfo structure defining viewport state used when rasterization is enabled.

public VkGraphicsPipelineCreateInfo
public long
renderPass()

a handle to a render pass object describing the environment in which the pipeline will be used.

public VkGraphicsPipelineCreateInfo
renderPass(long value)

Sets the specified value to the renderPass field.

public VkGraphicsPipelineCreateInfo
set(int sType, long pNext, int flags, int stageCount, VkPipelineShaderStageCreateInfo.Buffer pStages, VkPipelineVertexInputStateCreateInfo pVertexInputState, VkPipelineInputAssemblyStateCreateInfo pInputAssemblyState, VkPipelineTessellationStateCreateInfo pTessellationState, VkPipelineViewportStateCreateInfo pViewportState, VkPipelineRasterizationStateCreateInfo pRasterizationState, VkPipelineMultisampleStateCreateInfo pMultisampleState, VkPipelineDepthStencilStateCreateInfo pDepthStencilState, VkPipelineColorBlendStateCreateInfo pColorBlendState, VkPipelineDynamicStateCreateInfo pDynamicState, long layout, long renderPass, int subpass, long basePipelineHandle, int basePipelineIndex)

Initializes this struct with the specified values.

public VkGraphicsPipelineCreateInfo

Returns:

this struct
set
(VkGraphicsPipelineCreateInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
stageCount()

the number of entries in the pStages array.

public VkGraphicsPipelineCreateInfo
stageCount(int value)

Sets the specified value to the stageCount field.

public int
sType()

a VkStructureType value identifying this structure.

public VkGraphicsPipelineCreateInfo
sType(int value)

Sets the specified value to the sType field.

public VkGraphicsPipelineCreateInfo
public int
subpass()

the index of the subpass in the render pass where this pipeline will be used.

public VkGraphicsPipelineCreateInfo
subpass(int value)

Sets the specified value to the subpass field.

public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate