public class KHRCreateRenderpass2
extends java.lang.Object
sType/pNext members. Additionally, the renderpass begin/next/end commands have been augmented with new extensible structures for passing additional subpass information.
The VkRenderPassMultiviewCreateInfo and VkInputAttachmentAspectReference structures that extended the original VkRenderPassCreateInfo are not accepted into the new creation functions, and instead their parameters are folded into this extension as follows:
VkRenderPassMultiviewCreateInfo::pViewMasks are now specified in VkSubpassDescription2KHR::viewMask.VkRenderPassMultiviewCreateInfo::pViewOffsets are now specified in VkSubpassDependency2KHR::viewOffset.VkRenderPassMultiviewCreateInfo::correlationMaskCount and VkRenderPassMultiviewCreateInfo::pCorrelationMasks are directly specified in VkRenderPassCreateInfo2KHR.VkInputAttachmentAspectReference::aspectMask is now specified in the relevant input attachment description in VkAttachmentDescription2KHR::aspectMaskThe details of these mappings are explained fully in the new structures.
VK_KHR_create_renderpass2VK_KHR_multiviewVK_KHR_maintenance2| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME
The extension name.
|
static int |
VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION
The extension specification version.
|
static int |
VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static void |
nvkCmdBeginRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pRenderPassBegin,
long pSubpassBeginInfo)
Unsafe version of:
CmdBeginRenderPass2KHR |
static void |
nvkCmdEndRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSubpassEndInfo)
Unsafe version of:
CmdEndRenderPass2KHR |
static void |
nvkCmdNextSubpass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSubpassBeginInfo,
long pSubpassEndInfo)
Unsafe version of:
CmdNextSubpass2KHR |
static int |
nvkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
long pCreateInfo,
long pAllocator,
long pRenderPass)
Unsafe version of:
CreateRenderPass2KHR |
static void |
vkCmdBeginRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkRenderPassBeginInfo pRenderPassBegin,
VkSubpassBeginInfoKHR pSubpassBeginInfo)
Begin a new render pass.
|
static void |
vkCmdEndRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSubpassEndInfoKHR pSubpassEndInfo)
End the current render pass.
|
static void |
vkCmdNextSubpass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSubpassBeginInfoKHR pSubpassBeginInfo,
VkSubpassEndInfoKHR pSubpassEndInfo)
Transition to the next subpass of a render pass.
|
static int |
vkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
VkRenderPassCreateInfo2KHR pCreateInfo,
VkAllocationCallbacks pAllocator,
long[] pRenderPass)
Array version of:
CreateRenderPass2KHR |
static int |
vkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
VkRenderPassCreateInfo2KHR pCreateInfo,
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pRenderPass)
Create a new render pass object.
|
public static final int VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION
public static final java.lang.String VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR
VkStructureType.
public static final int VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR
VkStructureType.
public static int nvkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
long pCreateInfo,
long pAllocator,
long pRenderPass)
CreateRenderPass2KHRpublic static int vkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
VkRenderPassCreateInfo2KHR pCreateInfo,
@Nullable
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pRenderPass)
To create a render pass, call:
VkResult vkCreateRenderPass2KHR(
VkDevice device,
const VkRenderPassCreateInfo2KHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkRenderPass* pRenderPass);
This command is functionally identical to CreateRenderPass, but includes extensible sub-structures that include sType and pNext parameters, allowing them to be more easily extended.
device must be a valid VkDevice handlepCreateInfo must be a valid pointer to a valid VkRenderPassCreateInfo2KHR structurepAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structurepRenderPass must be a valid pointer to a VkRenderPass handledevice - the logical device that creates the render pass.pCreateInfo - a pointer to a VkRenderPassCreateInfo2KHR structure describing the parameters of the render pass.pAllocator - controls host memory allocation as described in the Memory Allocation chapter.pRenderPass - a pointer to a VkRenderPass handle in which the resulting render pass object is returned.public static void nvkCmdBeginRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pRenderPassBegin,
long pSubpassBeginInfo)
CmdBeginRenderPass2KHRpublic static void vkCmdBeginRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkRenderPassBeginInfo pRenderPassBegin,
VkSubpassBeginInfoKHR pSubpassBeginInfo)
Alternatively to begin a render pass, call:
void vkCmdBeginRenderPass2KHR(
VkCommandBuffer commandBuffer,
const VkRenderPassBeginInfo* pRenderPassBegin,
const VkSubpassBeginInfoKHR* pSubpassBeginInfo);
After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.
framebuffer and renderPass members of pRenderPassBegin must have been created on the same VkDevice that commandBuffer was allocated oninitialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with a usage value including IMAGE_USAGE_COLOR_ATTACHMENT_BITinitialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with a usage value including IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITinitialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with a usage value including IMAGE_USAGE_SAMPLED_BIT or IMAGE_USAGE_INPUT_ATTACHMENT_BITinitialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with a usage value including IMAGE_USAGE_TRANSFER_SRC_BITinitialLayout or finalLayout member of the VkAttachmentDescription structures or the layout member of the VkAttachmentReference structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then the corresponding attachment image view of the framebuffer specified in the framebuffer member of pRenderPassBegin must have been created with a usage value including IMAGE_USAGE_TRANSFER_DST_BITinitialLayout members of the VkAttachmentDescription structures specified when creating the render pass specified in the renderPass member of pRenderPassBegin is not IMAGE_LAYOUT_UNDEFINED, then each such initialLayout must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in the framebuffer member of pRenderPassBeginsrcStageMask and dstStageMask members of any element of the pDependencies member of VkRenderPassCreateInfo used to create renderPass must be supported by the capabilities of the queue family identified by the queueFamilyIndex member of the VkCommandPoolCreateInfo used to create the command pool which commandBuffer was allocated fromframebuffer that is used by renderPass and is bound to memory locations that are also bound to another attachment used by renderPass, and if at least one of those uses causes either attachment to be written to, both attachments must have had the ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT setcommandBuffer must be a valid VkCommandBuffer handlepRenderPassBegin must be a valid pointer to a valid VkRenderPassBeginInfo structurepSubpassBeginInfo must be a valid pointer to a valid VkSubpassBeginInfoKHR structurecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer must be a primary VkCommandBuffercommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Outside | Graphics | Graphics |
commandBuffer - the command buffer in which to record the command.pRenderPassBegin - a pointer to a VkRenderPassBeginInfo structure specifying the render pass to begin an instance of, and the framebuffer the instance uses.pSubpassBeginInfo - a pointer to a VkSubpassBeginInfoKHR structure containing information about the subpass which is about to begin rendering.public static void nvkCmdNextSubpass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSubpassBeginInfo,
long pSubpassEndInfo)
CmdNextSubpass2KHRpublic static void vkCmdNextSubpass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSubpassBeginInfoKHR pSubpassBeginInfo,
VkSubpassEndInfoKHR pSubpassEndInfo)
To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:
void vkCmdNextSubpass2KHR(
VkCommandBuffer commandBuffer,
const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
const VkSubpassEndInfoKHR* pSubpassEndInfo);
vkCmdNextSubpass2KHR is semantically identical to CmdNextSubpass, except that it is extensible, and that contents is provided as part of an extensible structure instead of as a flat parameter.
commandBuffer must be a valid VkCommandBuffer handlepSubpassBeginInfo must be a valid pointer to a valid VkSubpassBeginInfoKHR structurepSubpassEndInfo must be a valid pointer to a valid VkSubpassEndInfoKHR structurecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer must be a primary VkCommandBuffercommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Inside | Graphics | Graphics |
commandBuffer - the command buffer in which to record the command.pSubpassBeginInfo - a pointer to a VkSubpassBeginInfoKHR structure containing information about the subpass which is about to begin rendering.pSubpassEndInfo - a pointer to a VkSubpassEndInfoKHR structure containing information about how the previous subpass will be ended.public static void nvkCmdEndRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSubpassEndInfo)
CmdEndRenderPass2KHRpublic static void vkCmdEndRenderPass2KHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSubpassEndInfoKHR pSubpassEndInfo)
To record a command to end a render pass instance after recording the commands for the last subpass, call:
void vkCmdEndRenderPass2KHR(
VkCommandBuffer commandBuffer,
const VkSubpassEndInfoKHR* pSubpassEndInfo);
vkCmdEndRenderPass2KHR is semantically identical to CmdEndRenderPass, except that it is extensible.
commandBuffer must be a valid VkCommandBuffer handlepSubpassEndInfo must be a valid pointer to a valid VkSubpassEndInfoKHR structurecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer must be a primary VkCommandBuffercommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Inside | Graphics | Graphics |
commandBuffer - the command buffer in which to end the current render pass instance.pSubpassEndInfo - a pointer to a VkSubpassEndInfoKHR structure containing information about how the previous subpass will be ended.public static int vkCreateRenderPass2KHR(org.lwjgl.vulkan.VkDevice device,
VkRenderPassCreateInfo2KHR pCreateInfo,
@Nullable
VkAllocationCallbacks pAllocator,
long[] pRenderPass)
CreateRenderPass2KHRCopyright LWJGL. All Rights Reserved. License terms.