Class KHRCreateRenderpass2
- java.lang.Object
-
- org.lwjgl.vulkan.KHRCreateRenderpass2
-
public class KHRCreateRenderpass2 extends java.lang.ObjectThis extension provides a new entry point to create render passes in a way that can be easily extended by other extensions through the substructures of render pass creation. The Vulkan 1.0 render pass creation sub-structures do not includesType/pNextmembers. Additionally, the renderpass begin/next/end commands have been augmented with new extensible structures for passing additional subpass information.The
VkRenderPassMultiviewCreateInfoandVkInputAttachmentAspectReferencestructures that extended the originalVkRenderPassCreateInfoare not accepted into the new creation functions, and instead their parameters are folded into this extension as follows:- Elements of
VkRenderPassMultiviewCreateInfo::pViewMasksare now specified inVkSubpassDescription2KHR::viewMask. - Elements of
VkRenderPassMultiviewCreateInfo::pViewOffsetsare now specified inVkSubpassDependency2KHR::viewOffset. VkRenderPassMultiviewCreateInfo::correlationMaskCountandVkRenderPassMultiviewCreateInfo::pCorrelationMasksare directly specified inVkRenderPassCreateInfo2KHR.VkInputAttachmentAspectReference::aspectMaskis now specified in the relevant input attachment description inVkAttachmentDescription2KHR::aspectMask
The details of these mappings are explained fully in the new structures.
- Name String
VK_KHR_create_renderpass2- Extension Type
- Device extension
- Registered Extension Number
- 110
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_multiview - Requires
VK_KHR_maintenance2
- Contact
- Tobias Hector tobias
- Last Modified Date
- 2018-02-07
- Contributors
- Tobias Hector
- Jeff Bolz
- Elements of
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAMEThe extension name.static intVK_KHR_CREATE_RENDERPASS_2_SPEC_VERSIONThe extension specification version.static intVK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR
VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR
VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR
VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR
VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR
VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHRExtendsVkStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, long pRenderPassBegin, long pSubpassBeginInfo)Unsafe version of:CmdBeginRenderPass2KHRstatic voidnvkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, long pSubpassEndInfo)Unsafe version of:CmdEndRenderPass2KHRstatic voidnvkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, long pSubpassBeginInfo, long pSubpassEndInfo)Unsafe version of:CmdNextSubpass2KHRstatic intnvkCreateRenderPass2KHR(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass)Unsafe version of:CreateRenderPass2KHRstatic voidvkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, VkSubpassBeginInfoKHR pSubpassBeginInfo)Begin a new render pass.static voidvkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, VkSubpassEndInfoKHR pSubpassEndInfo)End the current render pass.static voidvkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, VkSubpassBeginInfoKHR pSubpassBeginInfo, VkSubpassEndInfoKHR pSubpassEndInfo)Transition to the next subpass of a render pass.static intvkCreateRenderPass2KHR(VkDevice device, VkRenderPassCreateInfo2KHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pRenderPass)Array version of:CreateRenderPass2KHRstatic intvkCreateRenderPass2KHR(VkDevice device, VkRenderPassCreateInfo2KHR pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pRenderPass)Create a new render pass object.
-
-
-
Field Detail
-
VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION
The extension specification version.
-
VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR, VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR, VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR, VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR
ExtendsVkStructureType.Enum values:
-
-
Method Detail
-
nvkCreateRenderPass2KHR
public static int nvkCreateRenderPass2KHR(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass)
Unsafe version of:CreateRenderPass2KHR
-
vkCreateRenderPass2KHR
public static int vkCreateRenderPass2KHR(VkDevice device, VkRenderPassCreateInfo2KHR pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pRenderPass)
Create a new render pass object.C Specification
To create a render pass, call:
VkResult vkCreateRenderPass2KHR( VkDevice device, const VkRenderPassCreateInfo2KHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);Description
This command is functionally identical to
CreateRenderPass, but includes extensible sub-structures that includesTypeandpNextparameters, allowing them to be more easily extended.Valid Usage (Implicit)
devicemust be a validVkDevicehandlepCreateInfomust be a valid pointer to a validVkRenderPassCreateInfo2KHRstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pRenderPassmust be a valid pointer to aVkRenderPasshandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the render pass.pCreateInfo- a pointer to an instance of theVkRenderPassCreateInfo2KHRstructure that describes the parameters of the render pass.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pRenderPass- points to aVkRenderPasshandle in which the resulting render pass object is returned.
-
nvkCmdBeginRenderPass2KHR
public static void nvkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, long pRenderPassBegin, long pSubpassBeginInfo)
Unsafe version of:CmdBeginRenderPass2KHR
-
vkCmdBeginRenderPass2KHR
public static void vkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, VkSubpassBeginInfoKHR pSubpassBeginInfo)
Begin a new render pass.C Specification
Alternatively to begin a render pass, call:
void vkCmdBeginRenderPass2KHR( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfoKHR* pSubpassBeginInfo);Description
After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.
Valid Usage
- Both the
framebufferandrenderPassmembers ofpRenderPassBeginmust have been created on the sameVkDevicethatcommandBufferwas allocated on - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALthen the corresponding attachment image view of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created with ausagevalue includingIMAGE_USAGE_COLOR_ATTACHMENT_BIT - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALthen the corresponding attachment image view of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created with ausagevalue includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALthen the corresponding attachment image view of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created with ausagevalue includingIMAGE_USAGE_SAMPLED_BITorIMAGE_USAGE_INPUT_ATTACHMENT_BIT - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisIMAGE_LAYOUT_TRANSFER_SRC_OPTIMALthen the corresponding attachment image view of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created with ausagevalue includingIMAGE_USAGE_TRANSFER_SRC_BIT - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisIMAGE_LAYOUT_TRANSFER_DST_OPTIMALthen the corresponding attachment image view of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created with ausagevalue includingIMAGE_USAGE_TRANSFER_DST_BIT - If any of the
initialLayoutmembers of theVkAttachmentDescriptionstructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginis notIMAGE_LAYOUT_UNDEFINED, then each suchinitialLayoutmust be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBegin - The
srcStageMaskanddstStageMaskmembers of any element of thepDependenciesmember ofVkRenderPassCreateInfoused to createrenderPassmust be supported by the capabilities of the queue family identified by thequeueFamilyIndexmember of theVkCommandPoolCreateInfoused to create the command pool whichcommandBufferwas allocated from - For any attachment in
framebufferthat is used byrenderPassand is bound to memory locations that are also bound to another attachment used byrenderPass, and if at least one of those uses causes either attachment to be written to, both attachments must have had theATTACHMENT_DESCRIPTION_MAY_ALIAS_BITset
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepRenderPassBeginmust be a valid pointer to a validVkRenderPassBeginInfostructurepSubpassBeginInfomust be a valid pointer to a validVkSubpassBeginInfoKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Outside Graphics Graphics See Also
- Parameters:
commandBuffer- the command buffer in which to record the command.pRenderPassBegin- a pointer to aVkRenderPassBeginInfostructure (defined below) which indicates the render pass to begin an instance of, and the framebuffer the instance uses.pSubpassBeginInfo- a pointer to aVkSubpassBeginInfoKHRstructure which contains information about the subpass which is about to begin rendering.
- Both the
-
nvkCmdNextSubpass2KHR
public static void nvkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, long pSubpassBeginInfo, long pSubpassEndInfo)
Unsafe version of:CmdNextSubpass2KHR
-
vkCmdNextSubpass2KHR
public static void vkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, VkSubpassBeginInfoKHR pSubpassBeginInfo, VkSubpassEndInfoKHR pSubpassEndInfo)
Transition to the next subpass of a render pass.C Specification
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);Description
vkCmdNextSubpass2KHRis semantically identical toCmdNextSubpass, except that it is extensible, and thatcontentsis provided as part of an extensible structure instead of as a flat parameter.Valid Usage
- The current subpass index must be less than the number of subpasses in the render pass minus one
- This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepSubpassBeginInfomust be a valid pointer to a validVkSubpassBeginInfoKHRstructurepSubpassEndInfomust be a valid pointer to a validVkSubpassEndInfoKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Inside Graphics Graphics See Also
- Parameters:
commandBuffer- the command buffer in which to record the command.pSubpassBeginInfo- a pointer to aVkSubpassBeginInfoKHRstructure which contains information about the subpass which is about to begin rendering.pSubpassEndInfo- a pointer to aVkSubpassEndInfoKHRstructure which contains information about how the previous subpass will be ended.
-
nvkCmdEndRenderPass2KHR
public static void nvkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, long pSubpassEndInfo)
Unsafe version of:CmdEndRenderPass2KHR
-
vkCmdEndRenderPass2KHR
public static void vkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, VkSubpassEndInfoKHR pSubpassEndInfo)
End the current render pass.C Specification
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);Description
vkCmdEndRenderPass2KHRis semantically identical toCmdEndRenderPass, except that it is extensible.Valid Usage
- The current subpass index must be equal to the number of subpasses in the render pass minus one
- This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepSubpassEndInfomust be a valid pointer to a validVkSubpassEndInfoKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Inside Graphics Graphics See Also
- Parameters:
commandBuffer- the command buffer in which to end the current render pass instance.pSubpassEndInfo- a pointer to aVkSubpassEndInfoKHRstructure which contains information about how the previous subpass will be ended.
-
vkCreateRenderPass2KHR
public static int vkCreateRenderPass2KHR(VkDevice device, VkRenderPassCreateInfo2KHR pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pRenderPass)
Array version of:CreateRenderPass2KHR
-
-