org.lwjgl.vulkan.VkGraphicsPipelineCreateInfo Maven / Gradle / Ivy
Show all versions of lwjgl-vulkan Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;
/**
* Structure specifying parameters of a newly created graphics pipeline.
*
* Description
*
* The parameters {@code basePipelineHandle} and {@code basePipelineIndex} are described in more detail in Pipeline Derivatives.
*
* {@code pStages} points to an array of {@link VkPipelineShaderStageCreateInfo} structures, which were previously described in Compute Pipelines.
*
* {@code pDynamicState} points to a structure of type {@link VkPipelineDynamicStateCreateInfo}.
*
* If any shader stage fails to compile, the compile log will be reported back to the application, and {@link NVGLSLShader#VK_ERROR_INVALID_SHADER_NV ERROR_INVALID_SHADER_NV} will be generated.
*
* Valid Usage
*
*
* - If {@code flags} contains the {@link VK10#VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and {@code basePipelineIndex} is -1, {@code basePipelineHandle} must be a valid handle to a graphics {@code VkPipeline}
* - If {@code flags} contains the {@link VK10#VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and {@code basePipelineHandle} is {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code basePipelineIndex} must be a valid index into the calling command’s {@code pCreateInfos} parameter
* - If {@code flags} contains the {@link VK10#VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and {@code basePipelineIndex} is not -1, {@code basePipelineHandle} must be {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
* - If {@code flags} contains the {@link VK10#VK_PIPELINE_CREATE_DERIVATIVE_BIT PIPELINE_CREATE_DERIVATIVE_BIT} flag, and {@code basePipelineHandle} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code basePipelineIndex} must be -1
* - The {@code stage} member of each element of {@code pStages} must be unique
* - The {@code stage} member of one element of {@code pStages} must be {@link VK10#VK_SHADER_STAGE_VERTEX_BIT SHADER_STAGE_VERTEX_BIT}
* - The {@code stage} member of each element of {@code pStages} must not be {@link VK10#VK_SHADER_STAGE_COMPUTE_BIT SHADER_STAGE_COMPUTE_BIT}
* - If {@code pStages} includes a tessellation control shader stage, it must include a tessellation evaluation shader stage
* - If {@code pStages} includes a tessellation evaluation shader stage, it must include a tessellation control shader stage
* - If {@code pStages} includes a tessellation control shader stage and a tessellation evaluation shader stage, {@code pTessellationState} must be a valid pointer to a valid {@link VkPipelineTessellationStateCreateInfo} structure
* - If {@code pStages} includes tessellation shader stages, the shader code of at least one stage must contain an {@code OpExecutionMode} instruction that specifies the type of subdivision in the pipeline
* - If {@code pStages} includes tessellation shader stages, and the shader code of both stages contain an {@code OpExecutionMode} instruction that specifies the type of subdivision in the pipeline, they must both specify the same subdivision mode
* - If {@code pStages} includes tessellation shader stages, the shader code of at least one stage must contain an {@code OpExecutionMode} instruction that specifies the output patch size in the pipeline
* - If {@code pStages} includes tessellation shader stages, and the shader code of both contain an {@code OpExecutionMode} instruction that specifies the out patch size in the pipeline, they must both specify the same patch size
* - If {@code pStages} includes tessellation shader stages, the {@code topology} member of {@code pInputAssembly} must be {@link VK10#VK_PRIMITIVE_TOPOLOGY_PATCH_LIST PRIMITIVE_TOPOLOGY_PATCH_LIST}
* - If the {@code topology} member of {@code pInputAssembly} is {@link VK10#VK_PRIMITIVE_TOPOLOGY_PATCH_LIST PRIMITIVE_TOPOLOGY_PATCH_LIST}, {@code pStages} must include tessellation shader stages
* - If {@code pStages} includes a geometry shader stage, and does not include any tessellation shader stages, its shader code must contain an {@code OpExecutionMode} instruction that specifies an input primitive type that is compatible with the primitive topology specified in {@code pInputAssembly}
* - If {@code pStages} includes a geometry shader stage, and also includes tessellation shader stages, its shader code must contain an {@code OpExecutionMode} instruction that specifies an input primitive type that is compatible with the primitive topology that is output by the tessellation stages
* - If {@code pStages} includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with {@code PrimitiveID}, then the geometry shader code must write to a matching output variable, decorated with {@code PrimitiveID}, in all execution paths
* - If {@code pStages} includes a fragment shader stage, its shader code must not read from any input attachment that is defined as {@link VK10#VK_ATTACHMENT_UNUSED ATTACHMENT_UNUSED} in {@code subpass}
* - The shader code for the entry points identified by {@code pStages}, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter
* - If rasterization is not disabled and {@code subpass} uses a depth/stencil attachment in {@code renderPass} that has a layout of {@link VK10#VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL} or {@link KHRMaintenance2#VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR} in the {@link VkAttachmentReference} defined by {@code subpass}, the {@code depthWriteEnable} member of {@code pDepthStencilState} must be {@link VK10#VK_FALSE FALSE}
* - If rasterization is not disabled and {@code subpass} uses a depth/stencil attachment in {@code renderPass} that has a layout of {@link VK10#VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL} or {@link KHRMaintenance2#VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR} in the {@link VkAttachmentReference} defined by {@code subpass}, the {@code failOp}, {@code passOp} and {@code depthFailOp} members of each of the {@code front} and {@code back} members of {@code pDepthStencilState} must be {@link VK10#VK_STENCIL_OP_KEEP STENCIL_OP_KEEP}
* - If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the {@code blendEnable} member of the corresponding element of the {@code pAttachment} member of {@code pColorBlendState} must be {@link VK10#VK_FALSE FALSE} if the {@code format} of the attachment does not support color blend operations, as specified by the {@link VK10#VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT} flag in {@link VkFormatProperties}{@code ::linearTilingFeatures} or {@link VkFormatProperties}{@code ::optimalTilingFeatures} returned by {@link VK10#vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties}
* - If rasterization is not disabled and the subpass uses color attachments, the {@code attachmentCount} member of {@code pColorBlendState} must be equal to the {@code colorAttachmentCount} used to create {@code subpass}
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link VK10#VK_DYNAMIC_STATE_VIEWPORT DYNAMIC_STATE_VIEWPORT}, the {@code pViewports} member of {@code pViewportState} must be a valid pointer to an array of {@code pViewportState}{@code ::viewportCount} {@link VkViewport} structures
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link VK10#VK_DYNAMIC_STATE_SCISSOR DYNAMIC_STATE_SCISSOR}, the {@code pScissors} member of {@code pViewportState} must be a valid pointer to an array of {@code pViewportState}{@code ::scissorCount} {@link VkRect2D} structures
* - If the wide lines feature is not enabled, and no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link VK10#VK_DYNAMIC_STATE_LINE_WIDTH DYNAMIC_STATE_LINE_WIDTH}, the {@code lineWidth} member of {@code pRasterizationState} must be {@code 1.0}
* - If the {@code rasterizerDiscardEnable} member of {@code pRasterizationState} is {@link VK10#VK_FALSE FALSE}, {@code pViewportState} must be a valid pointer to a valid {@link VkPipelineViewportStateCreateInfo} structure
* - If the {@code rasterizerDiscardEnable} member of {@code pRasterizationState} is {@link VK10#VK_FALSE FALSE}, {@code pMultisampleState} must be a valid pointer to a valid {@link VkPipelineMultisampleStateCreateInfo} structure
* - If the {@code rasterizerDiscardEnable} member of {@code pRasterizationState} is {@link VK10#VK_FALSE FALSE}, and {@code subpass} uses a depth/stencil attachment, {@code pDepthStencilState} must be a valid pointer to a valid {@link VkPipelineDepthStencilStateCreateInfo} structure
* - If the {@code rasterizerDiscardEnable} member of {@code pRasterizationState} is {@link VK10#VK_FALSE FALSE}, and {@code subpass} uses color attachments, {@code pColorBlendState} must be a valid pointer to a valid {@link VkPipelineColorBlendStateCreateInfo} structure
* - If the depth bias clamping feature is not enabled, no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link VK10#VK_DYNAMIC_STATE_DEPTH_BIAS DYNAMIC_STATE_DEPTH_BIAS}, and the {@code depthBiasEnable} member of {@code pRasterizationState} is {@link VK10#VK_TRUE TRUE}, the {@code depthBiasClamp} member of {@code pRasterizationState} must be {@code 0.0}
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link EXTSampleLocations#VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT}, and the {@code sampleLocationsEnable} member of a {@link VkPipelineSampleLocationsStateCreateInfoEXT} structure chained to the {@code pNext} chain of {@code pMultisampleState} is {@link VK10#VK_TRUE TRUE}, {@code sampleLocationsInfo.sampleLocationGridSize.width} must evenly divide {@link VkMultisamplePropertiesEXT}{@code ::sampleLocationGridSize}.width as returned by {@link EXTSampleLocations#vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT} with a {@code samples} parameter equaling {@code rasterizationSamples}
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link EXTSampleLocations#VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT}, and the {@code sampleLocationsEnable} member of a {@link VkPipelineSampleLocationsStateCreateInfoEXT} structure chained to the {@code pNext} chain of {@code pMultisampleState} is {@link VK10#VK_TRUE TRUE}, {@code sampleLocationsInfo.sampleLocationGridSize.height} must evenly divide {@link VkMultisamplePropertiesEXT}{@code ::sampleLocationGridSize}.height as returned by {@link EXTSampleLocations#vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT} with a {@code samples} parameter equaling {@code rasterizationSamples}
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link EXTSampleLocations#VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT}, and the {@code sampleLocationsEnable} member of a {@link VkPipelineSampleLocationsStateCreateInfoEXT} structure chained to the {@code pNext} chain of {@code pMultisampleState} is {@link VK10#VK_TRUE TRUE}, {@code sampleLocationsInfo.sampleLocationsPerPixel} must equal {@code rasterizationSamples}
* - If the {@code sampleLocationsEnable} member of a {@link VkPipelineSampleLocationsStateCreateInfoEXT} structure chained to the {@code pNext} chain of {@code pMultisampleState} is {@link VK10#VK_TRUE TRUE}, the fragment shader code must not statically use the extended instruction {@code InterpolateAtSample}
* - {@code layout} must be consistent with all shaders specified in {@code pStages}
* - If {@code subpass} uses color and/or depth/stencil attachments, then the {@code rasterizationSamples} member of {@code pMultisampleState} must equal the maximum of the sample counts of those subpass attachments
* - If {@code subpass} has a depth/stencil attachment and depth test, stencil test, or depth bounds test are enabled, then the {@code rasterizationSamples} member of {@code pMultisampleState} must be the same as the sample count of the depth/stencil attachment
* - If {@code subpass} has any color attachments, then the {@code rasterizationSamples} member of {@code pMultisampleState} must be greater than or equal to the sample count for those subpass attachments
* - If {@code subpass} does not use any color and/or depth/stencil attachments, then the {@code rasterizationSamples} member of {@code pMultisampleState} must follow the rules for a zero-attachment subpass
* - {@code subpass} must be a valid subpass within {@code renderPass}
* - If the {@code renderPass} has multiview enabled and {@code subpass} has more than one bit set in the view mask and {@code multiviewTessellationShader} is not enabled, then {@code pStages} must not include tessellation shaders.
* - If the {@code renderPass} has multiview enabled and {@code subpass} has more than one bit set in the view mask and {@code multiviewGeometryShader} is not enabled, then {@code pStages} must not include a geometry shader.
* - If the {@code renderPass} has multiview enabled and {@code subpass} has more than one bit set in the view mask, shaders in the pipeline must not write to the {@code Layer} built-in output
* - If the {@code renderPass} has multiview enabled, then all shaders must not include variables decorated with the {@code Layer} built-in decoration in their interfaces.
* - {@code flags} must not contain the {@link KHXDeviceGroup#VK_PIPELINE_CREATE_DISPATCH_BASE_KHX PIPELINE_CREATE_DISPATCH_BASE_KHX} flag.
* - If {@code pStages} includes a fragment shader stage and an input attachment was referenced by the {@link VkRenderPassInputAttachmentAspectCreateInfoKHR} at {@code renderPass} create time, its shader code must not read from any aspect that was not specified in the {@code aspectMask} of the corresponding {@link VkInputAttachmentAspectReferenceKHR} structure.
* - The number of resources in {@code layout} accessible to each shader stage that is used by the pipeline must be less than or equal to {@link VkPhysicalDeviceLimits}{@code ::maxPerStageResources}
* - If no element of the {@code pDynamicStates} member of {@code pDynamicState} is {@link NVClipSpaceWScaling#VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV DYNAMIC_STATE_VIEWPORT_W_SCALING_NV}, and the {@code viewportWScalingEnable} member of a {@link VkPipelineViewportWScalingStateCreateInfoNV} structure, chained to the {@code pNext} chain of {@code pViewportState}, is {@link VK10#VK_TRUE TRUE}, the {@code pViewportWScalings} member of the {@link VkPipelineViewportWScalingStateCreateInfoNV} must be a pointer to an array of {@link VkPipelineViewportWScalingStateCreateInfoNV}{@code ::viewportCount} valid {@link VkViewportWScalingNV} structures
*
*
* Valid Usage (Implicit)
*
*
* - {@code sType} must be {@link VK10#VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO}
* - {@code pNext} must be {@code NULL} or a pointer to a valid instance of {@link VkPipelineDiscardRectangleStateCreateInfoEXT}
* - {@code flags} must be a valid combination of {@code VkPipelineCreateFlagBits} values
* - {@code pStages} must be a valid pointer to an array of {@code stageCount} valid {@link VkPipelineShaderStageCreateInfo} structures
* - {@code pVertexInputState} must be a valid pointer to a valid {@link VkPipelineVertexInputStateCreateInfo} structure
* - {@code pInputAssemblyState} must be a valid pointer to a valid {@link VkPipelineInputAssemblyStateCreateInfo} structure
* - {@code pRasterizationState} must be a valid pointer to a valid {@link VkPipelineRasterizationStateCreateInfo} structure
* - If {@code pDynamicState} is not {@code NULL}, {@code pDynamicState} must be a valid pointer to a valid {@link VkPipelineDynamicStateCreateInfo} structure
* - {@code layout} must be a valid {@code VkPipelineLayout} handle
* - {@code renderPass} must be a valid {@code VkRenderPass} handle
* - {@code stageCount} must be greater than 0
* - Each of {@code basePipelineHandle}, {@code layout}, and {@code renderPass} that are valid handles must have been created, allocated, or retrieved from the same {@code VkDevice}
*
*
* See Also
*
* {@link VkPipelineColorBlendStateCreateInfo}, {@link VkPipelineDepthStencilStateCreateInfo}, {@link VkPipelineDynamicStateCreateInfo}, {@link VkPipelineInputAssemblyStateCreateInfo}, {@link VkPipelineMultisampleStateCreateInfo}, {@link VkPipelineRasterizationStateCreateInfo}, {@link VkPipelineShaderStageCreateInfo}, {@link VkPipelineTessellationStateCreateInfo}, {@link VkPipelineVertexInputStateCreateInfo}, {@link VkPipelineViewportStateCreateInfo}, {@link VK10#vkCreateGraphicsPipelines CreateGraphicsPipelines}
*
* Member documentation
*
*
* - {@code sType} – the type of this structure.
* - {@code pNext} – {@code NULL} or a pointer to an extension-specific structure.
* - {@code flags} – a bitmask of {@code VkPipelineCreateFlagBits} specifying how the pipeline will be generated.
* - {@code stageCount} – the number of entries in the {@code pStages} array.
* - {@code pStages} – an array of size {@code stageCount} structures of type {@link VkPipelineShaderStageCreateInfo} describing the set of the shader stages to be included in the graphics pipeline.
* - {@code pVertexInputState} – a pointer to an instance of the {@link VkPipelineVertexInputStateCreateInfo} structure.
* - {@code pInputAssemblyState} – a pointer to an instance of the {@link VkPipelineInputAssemblyStateCreateInfo} structure which determines input assembly behavior, as described in Drawing Commands.
* - {@code pTessellationState} – a pointer to an instance of the {@link VkPipelineTessellationStateCreateInfo} structure, and is ignored if the pipeline does not include a tessellation control shader stage and tessellation evaluation shader stage.
* - {@code pViewportState} – a pointer to an instance of the {@link VkPipelineViewportStateCreateInfo} structure, and is ignored if the pipeline has rasterization disabled.
* - {@code pRasterizationState} – a pointer to an instance of the {@link VkPipelineRasterizationStateCreateInfo} structure.
* - {@code pMultisampleState} – a pointer to an instance of the {@link VkPipelineMultisampleStateCreateInfo}, and is ignored if the pipeline has rasterization disabled.
* - {@code pDepthStencilState} – a pointer to an instance of the {@link VkPipelineDepthStencilStateCreateInfo} structure, and is ignored if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use a depth/stencil attachment.
* - {@code pColorBlendState} – a pointer to an instance of the {@link VkPipelineColorBlendStateCreateInfo} structure, and is ignored if the pipeline has rasterization disabled or if the subpass of the render pass the pipeline is created against does not use any color attachments.
* - {@code pDynamicState} – a pointer to {@link VkPipelineDynamicStateCreateInfo} and is used to indicate which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be {@code NULL}, which means no state in the pipeline is considered dynamic.
* - {@code layout} – the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.
* - {@code renderPass} – a handle to a render pass object describing the environment in which the pipeline will be used; the pipeline must only be used with an instance of any render pass compatible with the one provided. See Render Pass Compatibility for more information.
* - {@code subpass} – the index of the subpass in the render pass where this pipeline will be used.
* - {@code basePipelineHandle} – a pipeline to derive from.
* - {@code basePipelineIndex} – an index into the {@code pCreateInfos} parameter to use as a pipeline to derive from.
*
*
* Layout
*
*
* struct VkGraphicsPipelineCreateInfo {
* VkStructureType sType;
* const void * pNext;
* VkPipelineCreateFlags flags;
* uint32_t stageCount;
* const {@link VkPipelineShaderStageCreateInfo VkPipelineShaderStageCreateInfo} * pStages;
* const {@link VkPipelineVertexInputStateCreateInfo VkPipelineVertexInputStateCreateInfo} * pVertexInputState;
* const {@link VkPipelineInputAssemblyStateCreateInfo VkPipelineInputAssemblyStateCreateInfo} * pInputAssemblyState;
* const {@link VkPipelineTessellationStateCreateInfo VkPipelineTessellationStateCreateInfo} * pTessellationState;
* const {@link VkPipelineViewportStateCreateInfo VkPipelineViewportStateCreateInfo} * pViewportState;
* const {@link VkPipelineRasterizationStateCreateInfo VkPipelineRasterizationStateCreateInfo} * pRasterizationState;
* const {@link VkPipelineMultisampleStateCreateInfo VkPipelineMultisampleStateCreateInfo} * pMultisampleState;
* const {@link VkPipelineDepthStencilStateCreateInfo VkPipelineDepthStencilStateCreateInfo} * pDepthStencilState;
* const {@link VkPipelineColorBlendStateCreateInfo VkPipelineColorBlendStateCreateInfo} * pColorBlendState;
* const {@link VkPipelineDynamicStateCreateInfo VkPipelineDynamicStateCreateInfo} * pDynamicState;
* VkPipelineLayout layout;
* VkRenderPass renderPass;
* uint32_t subpass;
* VkPipeline basePipelineHandle;
* int32_t basePipelineIndex;
* }
*/
public class VkGraphicsPipelineCreateInfo extends Struct implements NativeResource {
/** The struct size in bytes. */
public static final int SIZEOF;
public static final int ALIGNOF;
/** The struct member offsets. */
public static final int
STYPE,
PNEXT,
FLAGS,
STAGECOUNT,
PSTAGES,
PVERTEXINPUTSTATE,
PINPUTASSEMBLYSTATE,
PTESSELLATIONSTATE,
PVIEWPORTSTATE,
PRASTERIZATIONSTATE,
PMULTISAMPLESTATE,
PDEPTHSTENCILSTATE,
PCOLORBLENDSTATE,
PDYNAMICSTATE,
LAYOUT,
RENDERPASS,
SUBPASS,
BASEPIPELINEHANDLE,
BASEPIPELINEINDEX;
static {
Layout layout = __struct(
__member(4),
__member(POINTER_SIZE),
__member(4),
__member(4),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(POINTER_SIZE),
__member(8),
__member(8),
__member(4),
__member(8),
__member(4)
);
SIZEOF = layout.getSize();
ALIGNOF = layout.getAlignment();
STYPE = layout.offsetof(0);
PNEXT = layout.offsetof(1);
FLAGS = layout.offsetof(2);
STAGECOUNT = layout.offsetof(3);
PSTAGES = layout.offsetof(4);
PVERTEXINPUTSTATE = layout.offsetof(5);
PINPUTASSEMBLYSTATE = layout.offsetof(6);
PTESSELLATIONSTATE = layout.offsetof(7);
PVIEWPORTSTATE = layout.offsetof(8);
PRASTERIZATIONSTATE = layout.offsetof(9);
PMULTISAMPLESTATE = layout.offsetof(10);
PDEPTHSTENCILSTATE = layout.offsetof(11);
PCOLORBLENDSTATE = layout.offsetof(12);
PDYNAMICSTATE = layout.offsetof(13);
LAYOUT = layout.offsetof(14);
RENDERPASS = layout.offsetof(15);
SUBPASS = layout.offsetof(16);
BASEPIPELINEHANDLE = layout.offsetof(17);
BASEPIPELINEINDEX = layout.offsetof(18);
}
VkGraphicsPipelineCreateInfo(long address, @Nullable ByteBuffer container) {
super(address, container);
}
/**
* Creates a {@link VkGraphicsPipelineCreateInfo} instance at the current position of the specified {@link ByteBuffer} 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.
*/
public VkGraphicsPipelineCreateInfo(ByteBuffer container) {
this(memAddress(container), __checkContainer(container, SIZEOF));
}
@Override
public int sizeof() { return SIZEOF; }
/** Returns the value of the {@code sType} field. */
@NativeType("VkStructureType")
public int sType() { return nsType(address()); }
/** Returns the value of the {@code pNext} field. */
@NativeType("const void *")
public long pNext() { return npNext(address()); }
/** Returns the value of the {@code flags} field. */
@NativeType("VkPipelineCreateFlags")
public int flags() { return nflags(address()); }
/** Returns the value of the {@code stageCount} field. */
@NativeType("uint32_t")
public int stageCount() { return nstageCount(address()); }
/** Returns a {@link VkPipelineShaderStageCreateInfo.Buffer} view of the struct array pointed to by the {@code pStages} field. */
@NativeType("const VkPipelineShaderStageCreateInfo *")
public VkPipelineShaderStageCreateInfo.Buffer pStages() { return npStages(address()); }
/** Returns a {@link VkPipelineVertexInputStateCreateInfo} view of the struct pointed to by the {@code pVertexInputState} field. */
@NativeType("const VkPipelineVertexInputStateCreateInfo *")
public VkPipelineVertexInputStateCreateInfo pVertexInputState() { return npVertexInputState(address()); }
/** Returns a {@link VkPipelineInputAssemblyStateCreateInfo} view of the struct pointed to by the {@code pInputAssemblyState} field. */
@NativeType("const VkPipelineInputAssemblyStateCreateInfo *")
public VkPipelineInputAssemblyStateCreateInfo pInputAssemblyState() { return npInputAssemblyState(address()); }
/** Returns a {@link VkPipelineTessellationStateCreateInfo} view of the struct pointed to by the {@code pTessellationState} field. */
@Nullable
@NativeType("const VkPipelineTessellationStateCreateInfo *")
public VkPipelineTessellationStateCreateInfo pTessellationState() { return npTessellationState(address()); }
/** Returns a {@link VkPipelineViewportStateCreateInfo} view of the struct pointed to by the {@code pViewportState} field. */
@Nullable
@NativeType("const VkPipelineViewportStateCreateInfo *")
public VkPipelineViewportStateCreateInfo pViewportState() { return npViewportState(address()); }
/** Returns a {@link VkPipelineRasterizationStateCreateInfo} view of the struct pointed to by the {@code pRasterizationState} field. */
@NativeType("const VkPipelineRasterizationStateCreateInfo *")
public VkPipelineRasterizationStateCreateInfo pRasterizationState() { return npRasterizationState(address()); }
/** Returns a {@link VkPipelineMultisampleStateCreateInfo} view of the struct pointed to by the {@code pMultisampleState} field. */
@Nullable
@NativeType("const VkPipelineMultisampleStateCreateInfo *")
public VkPipelineMultisampleStateCreateInfo pMultisampleState() { return npMultisampleState(address()); }
/** Returns a {@link VkPipelineDepthStencilStateCreateInfo} view of the struct pointed to by the {@code pDepthStencilState} field. */
@Nullable
@NativeType("const VkPipelineDepthStencilStateCreateInfo *")
public VkPipelineDepthStencilStateCreateInfo pDepthStencilState() { return npDepthStencilState(address()); }
/** Returns a {@link VkPipelineColorBlendStateCreateInfo} view of the struct pointed to by the {@code pColorBlendState} field. */
@Nullable
@NativeType("const VkPipelineColorBlendStateCreateInfo *")
public VkPipelineColorBlendStateCreateInfo pColorBlendState() { return npColorBlendState(address()); }
/** Returns a {@link VkPipelineDynamicStateCreateInfo} view of the struct pointed to by the {@code pDynamicState} field. */
@Nullable
@NativeType("const VkPipelineDynamicStateCreateInfo *")
public VkPipelineDynamicStateCreateInfo pDynamicState() { return npDynamicState(address()); }
/** Returns the value of the {@code layout} field. */
@NativeType("VkPipelineLayout")
public long layout() { return nlayout(address()); }
/** Returns the value of the {@code renderPass} field. */
@NativeType("VkRenderPass")
public long renderPass() { return nrenderPass(address()); }
/** Returns the value of the {@code subpass} field. */
@NativeType("uint32_t")
public int subpass() { return nsubpass(address()); }
/** Returns the value of the {@code basePipelineHandle} field. */
@NativeType("VkPipeline")
public long basePipelineHandle() { return nbasePipelineHandle(address()); }
/** Returns the value of the {@code basePipelineIndex} field. */
@NativeType("int32_t")
public int basePipelineIndex() { return nbasePipelineIndex(address()); }
/** Sets the specified value to the {@code sType} field. */
public VkGraphicsPipelineCreateInfo sType(@NativeType("VkStructureType") int value) { nsType(address(), value); return this; }
/** Sets the specified value to the {@code pNext} field. */
public VkGraphicsPipelineCreateInfo pNext(@NativeType("const void *") long value) { npNext(address(), value); return this; }
/** Sets the specified value to the {@code flags} field. */
public VkGraphicsPipelineCreateInfo flags(@NativeType("VkPipelineCreateFlags") int value) { nflags(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineShaderStageCreateInfo.Buffer} to the {@code pStages} field. */
public VkGraphicsPipelineCreateInfo pStages(@NativeType("const VkPipelineShaderStageCreateInfo *") VkPipelineShaderStageCreateInfo.Buffer value) { npStages(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineVertexInputStateCreateInfo} to the {@code pVertexInputState} field. */
public VkGraphicsPipelineCreateInfo pVertexInputState(@NativeType("const VkPipelineVertexInputStateCreateInfo *") VkPipelineVertexInputStateCreateInfo value) { npVertexInputState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineInputAssemblyStateCreateInfo} to the {@code pInputAssemblyState} field. */
public VkGraphicsPipelineCreateInfo pInputAssemblyState(@NativeType("const VkPipelineInputAssemblyStateCreateInfo *") VkPipelineInputAssemblyStateCreateInfo value) { npInputAssemblyState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineTessellationStateCreateInfo} to the {@code pTessellationState} field. */
public VkGraphicsPipelineCreateInfo pTessellationState(@Nullable @NativeType("const VkPipelineTessellationStateCreateInfo *") VkPipelineTessellationStateCreateInfo value) { npTessellationState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineViewportStateCreateInfo} to the {@code pViewportState} field. */
public VkGraphicsPipelineCreateInfo pViewportState(@Nullable @NativeType("const VkPipelineViewportStateCreateInfo *") VkPipelineViewportStateCreateInfo value) { npViewportState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineRasterizationStateCreateInfo} to the {@code pRasterizationState} field. */
public VkGraphicsPipelineCreateInfo pRasterizationState(@NativeType("const VkPipelineRasterizationStateCreateInfo *") VkPipelineRasterizationStateCreateInfo value) { npRasterizationState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineMultisampleStateCreateInfo} to the {@code pMultisampleState} field. */
public VkGraphicsPipelineCreateInfo pMultisampleState(@Nullable @NativeType("const VkPipelineMultisampleStateCreateInfo *") VkPipelineMultisampleStateCreateInfo value) { npMultisampleState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineDepthStencilStateCreateInfo} to the {@code pDepthStencilState} field. */
public VkGraphicsPipelineCreateInfo pDepthStencilState(@Nullable @NativeType("const VkPipelineDepthStencilStateCreateInfo *") VkPipelineDepthStencilStateCreateInfo value) { npDepthStencilState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineColorBlendStateCreateInfo} to the {@code pColorBlendState} field. */
public VkGraphicsPipelineCreateInfo pColorBlendState(@Nullable @NativeType("const VkPipelineColorBlendStateCreateInfo *") VkPipelineColorBlendStateCreateInfo value) { npColorBlendState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineDynamicStateCreateInfo} to the {@code pDynamicState} field. */
public VkGraphicsPipelineCreateInfo pDynamicState(@Nullable @NativeType("const VkPipelineDynamicStateCreateInfo *") VkPipelineDynamicStateCreateInfo value) { npDynamicState(address(), value); return this; }
/** Sets the specified value to the {@code layout} field. */
public VkGraphicsPipelineCreateInfo layout(@NativeType("VkPipelineLayout") long value) { nlayout(address(), value); return this; }
/** Sets the specified value to the {@code renderPass} field. */
public VkGraphicsPipelineCreateInfo renderPass(@NativeType("VkRenderPass") long value) { nrenderPass(address(), value); return this; }
/** Sets the specified value to the {@code subpass} field. */
public VkGraphicsPipelineCreateInfo subpass(@NativeType("uint32_t") int value) { nsubpass(address(), value); return this; }
/** Sets the specified value to the {@code basePipelineHandle} field. */
public VkGraphicsPipelineCreateInfo basePipelineHandle(@NativeType("VkPipeline") long value) { nbasePipelineHandle(address(), value); return this; }
/** Sets the specified value to the {@code basePipelineIndex} field. */
public VkGraphicsPipelineCreateInfo basePipelineIndex(@NativeType("int32_t") int value) { nbasePipelineIndex(address(), value); return this; }
/** Initializes this struct with the specified values. */
public VkGraphicsPipelineCreateInfo set(
int sType,
long pNext,
int flags,
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
) {
sType(sType);
pNext(pNext);
flags(flags);
pStages(pStages);
pVertexInputState(pVertexInputState);
pInputAssemblyState(pInputAssemblyState);
pTessellationState(pTessellationState);
pViewportState(pViewportState);
pRasterizationState(pRasterizationState);
pMultisampleState(pMultisampleState);
pDepthStencilState(pDepthStencilState);
pColorBlendState(pColorBlendState);
pDynamicState(pDynamicState);
layout(layout);
renderPass(renderPass);
subpass(subpass);
basePipelineHandle(basePipelineHandle);
basePipelineIndex(basePipelineIndex);
return this;
}
/**
* Copies the specified struct data to this struct.
*
* @param src the source struct
*
* @return this struct
*/
public VkGraphicsPipelineCreateInfo set(VkGraphicsPipelineCreateInfo src) {
memCopy(src.address(), address(), SIZEOF);
return this;
}
// -----------------------------------
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
public static VkGraphicsPipelineCreateInfo malloc() {
return create(nmemAllocChecked(SIZEOF));
}
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
public static VkGraphicsPipelineCreateInfo calloc() {
return create(nmemCallocChecked(1, SIZEOF));
}
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated with {@link BufferUtils}. */
public static VkGraphicsPipelineCreateInfo create() {
return new VkGraphicsPipelineCreateInfo(BufferUtils.createByteBuffer(SIZEOF));
}
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance for the specified memory address. */
public static VkGraphicsPipelineCreateInfo create(long address) {
return new VkGraphicsPipelineCreateInfo(address, null);
}
/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static VkGraphicsPipelineCreateInfo createSafe(long address) {
return address == NULL ? null : create(address);
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
*
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer malloc(int capacity) {
return create(__malloc(capacity, SIZEOF), capacity);
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
*
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer calloc(int capacity) {
return create(nmemCallocChecked(capacity, SIZEOF), capacity);
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated with {@link BufferUtils}.
*
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer create(int capacity) {
return new Buffer(__create(capacity, SIZEOF));
}
/**
* Create a {@link VkGraphicsPipelineCreateInfo.Buffer} instance at the specified memory.
*
* @param address the memory address
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer create(long address, int capacity) {
return new Buffer(address, capacity);
}
/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static VkGraphicsPipelineCreateInfo.Buffer createSafe(long address, int capacity) {
return address == NULL ? null : create(address, capacity);
}
// -----------------------------------
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated on the thread-local {@link MemoryStack}. */
public static VkGraphicsPipelineCreateInfo mallocStack() {
return mallocStack(stackGet());
}
/** Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero. */
public static VkGraphicsPipelineCreateInfo callocStack() {
return callocStack(stackGet());
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated on the specified {@link MemoryStack}.
*
* @param stack the stack from which to allocate
*/
public static VkGraphicsPipelineCreateInfo mallocStack(MemoryStack stack) {
return create(stack.nmalloc(ALIGNOF, SIZEOF));
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
*
* @param stack the stack from which to allocate
*/
public static VkGraphicsPipelineCreateInfo callocStack(MemoryStack stack) {
return create(stack.ncalloc(ALIGNOF, 1, SIZEOF));
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated on the thread-local {@link MemoryStack}.
*
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer mallocStack(int capacity) {
return mallocStack(capacity, stackGet());
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated on the thread-local {@link MemoryStack} and initializes all its bits to zero.
*
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer callocStack(int capacity) {
return callocStack(capacity, stackGet());
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated on the specified {@link MemoryStack}.
*
* @param stack the stack from which to allocate
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack) {
return create(stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
}
/**
* Returns a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
*
* @param stack the stack from which to allocate
* @param capacity the buffer capacity
*/
public static VkGraphicsPipelineCreateInfo.Buffer callocStack(int capacity, MemoryStack stack) {
return create(stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
}
// -----------------------------------
/** Unsafe version of {@link #sType}. */
public static int nsType(long struct) { return memGetInt(struct + VkGraphicsPipelineCreateInfo.STYPE); }
/** Unsafe version of {@link #pNext}. */
public static long npNext(long struct) { return memGetAddress(struct + VkGraphicsPipelineCreateInfo.PNEXT); }
/** Unsafe version of {@link #flags}. */
public static int nflags(long struct) { return memGetInt(struct + VkGraphicsPipelineCreateInfo.FLAGS); }
/** Unsafe version of {@link #stageCount}. */
public static int nstageCount(long struct) { return memGetInt(struct + VkGraphicsPipelineCreateInfo.STAGECOUNT); }
/** Unsafe version of {@link #pStages}. */
public static VkPipelineShaderStageCreateInfo.Buffer npStages(long struct) { return VkPipelineShaderStageCreateInfo.create(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PSTAGES), nstageCount(struct)); }
/** Unsafe version of {@link #pVertexInputState}. */
public static VkPipelineVertexInputStateCreateInfo npVertexInputState(long struct) { return VkPipelineVertexInputStateCreateInfo.create(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PVERTEXINPUTSTATE)); }
/** Unsafe version of {@link #pInputAssemblyState}. */
public static VkPipelineInputAssemblyStateCreateInfo npInputAssemblyState(long struct) { return VkPipelineInputAssemblyStateCreateInfo.create(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PINPUTASSEMBLYSTATE)); }
/** Unsafe version of {@link #pTessellationState}. */
@Nullable public static VkPipelineTessellationStateCreateInfo npTessellationState(long struct) { return VkPipelineTessellationStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PTESSELLATIONSTATE)); }
/** Unsafe version of {@link #pViewportState}. */
@Nullable public static VkPipelineViewportStateCreateInfo npViewportState(long struct) { return VkPipelineViewportStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PVIEWPORTSTATE)); }
/** Unsafe version of {@link #pRasterizationState}. */
public static VkPipelineRasterizationStateCreateInfo npRasterizationState(long struct) { return VkPipelineRasterizationStateCreateInfo.create(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PRASTERIZATIONSTATE)); }
/** Unsafe version of {@link #pMultisampleState}. */
@Nullable public static VkPipelineMultisampleStateCreateInfo npMultisampleState(long struct) { return VkPipelineMultisampleStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PMULTISAMPLESTATE)); }
/** Unsafe version of {@link #pDepthStencilState}. */
@Nullable public static VkPipelineDepthStencilStateCreateInfo npDepthStencilState(long struct) { return VkPipelineDepthStencilStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PDEPTHSTENCILSTATE)); }
/** Unsafe version of {@link #pColorBlendState}. */
@Nullable public static VkPipelineColorBlendStateCreateInfo npColorBlendState(long struct) { return VkPipelineColorBlendStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PCOLORBLENDSTATE)); }
/** Unsafe version of {@link #pDynamicState}. */
@Nullable public static VkPipelineDynamicStateCreateInfo npDynamicState(long struct) { return VkPipelineDynamicStateCreateInfo.createSafe(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PDYNAMICSTATE)); }
/** Unsafe version of {@link #layout}. */
public static long nlayout(long struct) { return memGetLong(struct + VkGraphicsPipelineCreateInfo.LAYOUT); }
/** Unsafe version of {@link #renderPass}. */
public static long nrenderPass(long struct) { return memGetLong(struct + VkGraphicsPipelineCreateInfo.RENDERPASS); }
/** Unsafe version of {@link #subpass}. */
public static int nsubpass(long struct) { return memGetInt(struct + VkGraphicsPipelineCreateInfo.SUBPASS); }
/** Unsafe version of {@link #basePipelineHandle}. */
public static long nbasePipelineHandle(long struct) { return memGetLong(struct + VkGraphicsPipelineCreateInfo.BASEPIPELINEHANDLE); }
/** Unsafe version of {@link #basePipelineIndex}. */
public static int nbasePipelineIndex(long struct) { return memGetInt(struct + VkGraphicsPipelineCreateInfo.BASEPIPELINEINDEX); }
/** Unsafe version of {@link #sType(int) sType}. */
public static void nsType(long struct, int value) { memPutInt(struct + VkGraphicsPipelineCreateInfo.STYPE, value); }
/** Unsafe version of {@link #pNext(long) pNext}. */
public static void npNext(long struct, long value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PNEXT, value); }
/** Unsafe version of {@link #flags(int) flags}. */
public static void nflags(long struct, int value) { memPutInt(struct + VkGraphicsPipelineCreateInfo.FLAGS, value); }
/** Sets the specified value to the {@code stageCount} field of the specified {@code struct}. */
public static void nstageCount(long struct, int value) { memPutInt(struct + VkGraphicsPipelineCreateInfo.STAGECOUNT, value); }
/** Unsafe version of {@link #pStages(VkPipelineShaderStageCreateInfo.Buffer) pStages}. */
public static void npStages(long struct, VkPipelineShaderStageCreateInfo.Buffer value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PSTAGES, value.address()); nstageCount(struct, value.remaining()); }
/** Unsafe version of {@link #pVertexInputState(VkPipelineVertexInputStateCreateInfo) pVertexInputState}. */
public static void npVertexInputState(long struct, VkPipelineVertexInputStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PVERTEXINPUTSTATE, value.address()); }
/** Unsafe version of {@link #pInputAssemblyState(VkPipelineInputAssemblyStateCreateInfo) pInputAssemblyState}. */
public static void npInputAssemblyState(long struct, VkPipelineInputAssemblyStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PINPUTASSEMBLYSTATE, value.address()); }
/** Unsafe version of {@link #pTessellationState(VkPipelineTessellationStateCreateInfo) pTessellationState}. */
public static void npTessellationState(long struct, @Nullable VkPipelineTessellationStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PTESSELLATIONSTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #pViewportState(VkPipelineViewportStateCreateInfo) pViewportState}. */
public static void npViewportState(long struct, @Nullable VkPipelineViewportStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PVIEWPORTSTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #pRasterizationState(VkPipelineRasterizationStateCreateInfo) pRasterizationState}. */
public static void npRasterizationState(long struct, VkPipelineRasterizationStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PRASTERIZATIONSTATE, value.address()); }
/** Unsafe version of {@link #pMultisampleState(VkPipelineMultisampleStateCreateInfo) pMultisampleState}. */
public static void npMultisampleState(long struct, @Nullable VkPipelineMultisampleStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PMULTISAMPLESTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #pDepthStencilState(VkPipelineDepthStencilStateCreateInfo) pDepthStencilState}. */
public static void npDepthStencilState(long struct, @Nullable VkPipelineDepthStencilStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PDEPTHSTENCILSTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #pColorBlendState(VkPipelineColorBlendStateCreateInfo) pColorBlendState}. */
public static void npColorBlendState(long struct, @Nullable VkPipelineColorBlendStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PCOLORBLENDSTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #pDynamicState(VkPipelineDynamicStateCreateInfo) pDynamicState}. */
public static void npDynamicState(long struct, @Nullable VkPipelineDynamicStateCreateInfo value) { memPutAddress(struct + VkGraphicsPipelineCreateInfo.PDYNAMICSTATE, memAddressSafe(value)); }
/** Unsafe version of {@link #layout(long) layout}. */
public static void nlayout(long struct, long value) { memPutLong(struct + VkGraphicsPipelineCreateInfo.LAYOUT, value); }
/** Unsafe version of {@link #renderPass(long) renderPass}. */
public static void nrenderPass(long struct, long value) { memPutLong(struct + VkGraphicsPipelineCreateInfo.RENDERPASS, value); }
/** Unsafe version of {@link #subpass(int) subpass}. */
public static void nsubpass(long struct, int value) { memPutInt(struct + VkGraphicsPipelineCreateInfo.SUBPASS, value); }
/** Unsafe version of {@link #basePipelineHandle(long) basePipelineHandle}. */
public static void nbasePipelineHandle(long struct, long value) { memPutLong(struct + VkGraphicsPipelineCreateInfo.BASEPIPELINEHANDLE, value); }
/** Unsafe version of {@link #basePipelineIndex(int) basePipelineIndex}. */
public static void nbasePipelineIndex(long struct, int value) { memPutInt(struct + VkGraphicsPipelineCreateInfo.BASEPIPELINEINDEX, value); }
/**
* Validates pointer members that should not be {@code NULL}.
*
* @param struct the struct to validate
*/
public static void validate(long struct) {
int stageCount = nstageCount(struct);
long pStages = memGetAddress(struct + VkGraphicsPipelineCreateInfo.PSTAGES);
check(pStages);
VkPipelineShaderStageCreateInfo.validate(pStages, stageCount);
long pVertexInputState = memGetAddress(struct + VkGraphicsPipelineCreateInfo.PVERTEXINPUTSTATE);
check(pVertexInputState);
VkPipelineVertexInputStateCreateInfo.validate(pVertexInputState);
check(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PINPUTASSEMBLYSTATE));
check(memGetAddress(struct + VkGraphicsPipelineCreateInfo.PRASTERIZATIONSTATE));
long pColorBlendState = memGetAddress(struct + VkGraphicsPipelineCreateInfo.PCOLORBLENDSTATE);
if (pColorBlendState != NULL) {
VkPipelineColorBlendStateCreateInfo.validate(pColorBlendState);
}
long pDynamicState = memGetAddress(struct + VkGraphicsPipelineCreateInfo.PDYNAMICSTATE);
if (pDynamicState != NULL) {
VkPipelineDynamicStateCreateInfo.validate(pDynamicState);
}
}
/**
* Calls {@link #validate(long)} for each struct contained in the specified struct array.
*
* @param array the struct array to validate
* @param count the number of structs in {@code array}
*/
public static void validate(long array, int count) {
for (int i = 0; i < count; i++) {
validate(array + i * SIZEOF);
}
}
// -----------------------------------
/** An array of {@link VkGraphicsPipelineCreateInfo} structs. */
public static class Buffer extends StructBuffer implements NativeResource {
/**
* Creates a new {@link VkGraphicsPipelineCreateInfo.Buffer} instance backed by the specified container.
*
* Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
* will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
* by {@link VkGraphicsPipelineCreateInfo#SIZEOF}, and its mark will be undefined.
*
* The created buffer instance holds a strong reference to the container object.
*/
public Buffer(ByteBuffer container) {
super(container, container.remaining() / SIZEOF);
}
public Buffer(long address, int cap) {
super(address, null, -1, 0, cap, cap);
}
Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
super(address, container, mark, pos, lim, cap);
}
@Override
protected Buffer self() {
return this;
}
@Override
protected Buffer newBufferInstance(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
return new Buffer(address, container, mark, pos, lim, cap);
}
@Override
protected VkGraphicsPipelineCreateInfo newInstance(long address) {
return new VkGraphicsPipelineCreateInfo(address, container);
}
@Override
public int sizeof() {
return SIZEOF;
}
/** Returns the value of the {@code sType} field. */
@NativeType("VkStructureType")
public int sType() { return VkGraphicsPipelineCreateInfo.nsType(address()); }
/** Returns the value of the {@code pNext} field. */
@NativeType("const void *")
public long pNext() { return VkGraphicsPipelineCreateInfo.npNext(address()); }
/** Returns the value of the {@code flags} field. */
@NativeType("VkPipelineCreateFlags")
public int flags() { return VkGraphicsPipelineCreateInfo.nflags(address()); }
/** Returns the value of the {@code stageCount} field. */
@NativeType("uint32_t")
public int stageCount() { return VkGraphicsPipelineCreateInfo.nstageCount(address()); }
/** Returns a {@link VkPipelineShaderStageCreateInfo.Buffer} view of the struct array pointed to by the {@code pStages} field. */
@NativeType("const VkPipelineShaderStageCreateInfo *")
public VkPipelineShaderStageCreateInfo.Buffer pStages() { return VkGraphicsPipelineCreateInfo.npStages(address()); }
/** Returns a {@link VkPipelineVertexInputStateCreateInfo} view of the struct pointed to by the {@code pVertexInputState} field. */
@NativeType("const VkPipelineVertexInputStateCreateInfo *")
public VkPipelineVertexInputStateCreateInfo pVertexInputState() { return VkGraphicsPipelineCreateInfo.npVertexInputState(address()); }
/** Returns a {@link VkPipelineInputAssemblyStateCreateInfo} view of the struct pointed to by the {@code pInputAssemblyState} field. */
@NativeType("const VkPipelineInputAssemblyStateCreateInfo *")
public VkPipelineInputAssemblyStateCreateInfo pInputAssemblyState() { return VkGraphicsPipelineCreateInfo.npInputAssemblyState(address()); }
/** Returns a {@link VkPipelineTessellationStateCreateInfo} view of the struct pointed to by the {@code pTessellationState} field. */
@Nullable
@NativeType("const VkPipelineTessellationStateCreateInfo *")
public VkPipelineTessellationStateCreateInfo pTessellationState() { return VkGraphicsPipelineCreateInfo.npTessellationState(address()); }
/** Returns a {@link VkPipelineViewportStateCreateInfo} view of the struct pointed to by the {@code pViewportState} field. */
@Nullable
@NativeType("const VkPipelineViewportStateCreateInfo *")
public VkPipelineViewportStateCreateInfo pViewportState() { return VkGraphicsPipelineCreateInfo.npViewportState(address()); }
/** Returns a {@link VkPipelineRasterizationStateCreateInfo} view of the struct pointed to by the {@code pRasterizationState} field. */
@NativeType("const VkPipelineRasterizationStateCreateInfo *")
public VkPipelineRasterizationStateCreateInfo pRasterizationState() { return VkGraphicsPipelineCreateInfo.npRasterizationState(address()); }
/** Returns a {@link VkPipelineMultisampleStateCreateInfo} view of the struct pointed to by the {@code pMultisampleState} field. */
@Nullable
@NativeType("const VkPipelineMultisampleStateCreateInfo *")
public VkPipelineMultisampleStateCreateInfo pMultisampleState() { return VkGraphicsPipelineCreateInfo.npMultisampleState(address()); }
/** Returns a {@link VkPipelineDepthStencilStateCreateInfo} view of the struct pointed to by the {@code pDepthStencilState} field. */
@Nullable
@NativeType("const VkPipelineDepthStencilStateCreateInfo *")
public VkPipelineDepthStencilStateCreateInfo pDepthStencilState() { return VkGraphicsPipelineCreateInfo.npDepthStencilState(address()); }
/** Returns a {@link VkPipelineColorBlendStateCreateInfo} view of the struct pointed to by the {@code pColorBlendState} field. */
@Nullable
@NativeType("const VkPipelineColorBlendStateCreateInfo *")
public VkPipelineColorBlendStateCreateInfo pColorBlendState() { return VkGraphicsPipelineCreateInfo.npColorBlendState(address()); }
/** Returns a {@link VkPipelineDynamicStateCreateInfo} view of the struct pointed to by the {@code pDynamicState} field. */
@Nullable
@NativeType("const VkPipelineDynamicStateCreateInfo *")
public VkPipelineDynamicStateCreateInfo pDynamicState() { return VkGraphicsPipelineCreateInfo.npDynamicState(address()); }
/** Returns the value of the {@code layout} field. */
@NativeType("VkPipelineLayout")
public long layout() { return VkGraphicsPipelineCreateInfo.nlayout(address()); }
/** Returns the value of the {@code renderPass} field. */
@NativeType("VkRenderPass")
public long renderPass() { return VkGraphicsPipelineCreateInfo.nrenderPass(address()); }
/** Returns the value of the {@code subpass} field. */
@NativeType("uint32_t")
public int subpass() { return VkGraphicsPipelineCreateInfo.nsubpass(address()); }
/** Returns the value of the {@code basePipelineHandle} field. */
@NativeType("VkPipeline")
public long basePipelineHandle() { return VkGraphicsPipelineCreateInfo.nbasePipelineHandle(address()); }
/** Returns the value of the {@code basePipelineIndex} field. */
@NativeType("int32_t")
public int basePipelineIndex() { return VkGraphicsPipelineCreateInfo.nbasePipelineIndex(address()); }
/** Sets the specified value to the {@code sType} field. */
public VkGraphicsPipelineCreateInfo.Buffer sType(@NativeType("VkStructureType") int value) { VkGraphicsPipelineCreateInfo.nsType(address(), value); return this; }
/** Sets the specified value to the {@code pNext} field. */
public VkGraphicsPipelineCreateInfo.Buffer pNext(@NativeType("const void *") long value) { VkGraphicsPipelineCreateInfo.npNext(address(), value); return this; }
/** Sets the specified value to the {@code flags} field. */
public VkGraphicsPipelineCreateInfo.Buffer flags(@NativeType("VkPipelineCreateFlags") int value) { VkGraphicsPipelineCreateInfo.nflags(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineShaderStageCreateInfo.Buffer} to the {@code pStages} field. */
public VkGraphicsPipelineCreateInfo.Buffer pStages(@NativeType("const VkPipelineShaderStageCreateInfo *") VkPipelineShaderStageCreateInfo.Buffer value) { VkGraphicsPipelineCreateInfo.npStages(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineVertexInputStateCreateInfo} to the {@code pVertexInputState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pVertexInputState(@NativeType("const VkPipelineVertexInputStateCreateInfo *") VkPipelineVertexInputStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npVertexInputState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineInputAssemblyStateCreateInfo} to the {@code pInputAssemblyState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pInputAssemblyState(@NativeType("const VkPipelineInputAssemblyStateCreateInfo *") VkPipelineInputAssemblyStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npInputAssemblyState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineTessellationStateCreateInfo} to the {@code pTessellationState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pTessellationState(@Nullable @NativeType("const VkPipelineTessellationStateCreateInfo *") VkPipelineTessellationStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npTessellationState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineViewportStateCreateInfo} to the {@code pViewportState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pViewportState(@Nullable @NativeType("const VkPipelineViewportStateCreateInfo *") VkPipelineViewportStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npViewportState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineRasterizationStateCreateInfo} to the {@code pRasterizationState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pRasterizationState(@NativeType("const VkPipelineRasterizationStateCreateInfo *") VkPipelineRasterizationStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npRasterizationState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineMultisampleStateCreateInfo} to the {@code pMultisampleState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pMultisampleState(@Nullable @NativeType("const VkPipelineMultisampleStateCreateInfo *") VkPipelineMultisampleStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npMultisampleState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineDepthStencilStateCreateInfo} to the {@code pDepthStencilState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pDepthStencilState(@Nullable @NativeType("const VkPipelineDepthStencilStateCreateInfo *") VkPipelineDepthStencilStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npDepthStencilState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineColorBlendStateCreateInfo} to the {@code pColorBlendState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pColorBlendState(@Nullable @NativeType("const VkPipelineColorBlendStateCreateInfo *") VkPipelineColorBlendStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npColorBlendState(address(), value); return this; }
/** Sets the address of the specified {@link VkPipelineDynamicStateCreateInfo} to the {@code pDynamicState} field. */
public VkGraphicsPipelineCreateInfo.Buffer pDynamicState(@Nullable @NativeType("const VkPipelineDynamicStateCreateInfo *") VkPipelineDynamicStateCreateInfo value) { VkGraphicsPipelineCreateInfo.npDynamicState(address(), value); return this; }
/** Sets the specified value to the {@code layout} field. */
public VkGraphicsPipelineCreateInfo.Buffer layout(@NativeType("VkPipelineLayout") long value) { VkGraphicsPipelineCreateInfo.nlayout(address(), value); return this; }
/** Sets the specified value to the {@code renderPass} field. */
public VkGraphicsPipelineCreateInfo.Buffer renderPass(@NativeType("VkRenderPass") long value) { VkGraphicsPipelineCreateInfo.nrenderPass(address(), value); return this; }
/** Sets the specified value to the {@code subpass} field. */
public VkGraphicsPipelineCreateInfo.Buffer subpass(@NativeType("uint32_t") int value) { VkGraphicsPipelineCreateInfo.nsubpass(address(), value); return this; }
/** Sets the specified value to the {@code basePipelineHandle} field. */
public VkGraphicsPipelineCreateInfo.Buffer basePipelineHandle(@NativeType("VkPipeline") long value) { VkGraphicsPipelineCreateInfo.nbasePipelineHandle(address(), value); return this; }
/** Sets the specified value to the {@code basePipelineIndex} field. */
public VkGraphicsPipelineCreateInfo.Buffer basePipelineIndex(@NativeType("int32_t") int value) { VkGraphicsPipelineCreateInfo.nbasePipelineIndex(address(), value); return this; }
}
}