Class KHRCreateRenderpass2
- java.lang.Object
-
- org.lwjgl.vulkan.KHRCreateRenderpass2
-
public class KHRCreateRenderpass2 extends java.lang.Object
This 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
/pNext
members. Additionally, the renderpass begin/next/end commands have been augmented with new extensible structures for passing additional subpass information.The
VkRenderPassMultiviewCreateInfo
andVkInputAttachmentAspectReference
structures that extended the originalVkRenderPassCreateInfo
are not accepted into the new creation functions, and instead their parameters are folded into this extension as follows:- Elements of
VkRenderPassMultiviewCreateInfo
::pViewMasks
are now specified inVkSubpassDescription2KHR
::viewMask
. - Elements of
VkRenderPassMultiviewCreateInfo
::pViewOffsets
are now specified inVkSubpassDependency2KHR
::viewOffset
. VkRenderPassMultiviewCreateInfo
::correlationMaskCount
andVkRenderPassMultiviewCreateInfo
::pCorrelationMasks
are directly specified inVkRenderPassCreateInfo2KHR
.VkInputAttachmentAspectReference
::aspectMask
is 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.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
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 void
nvkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, long pRenderPassBegin, long pSubpassBeginInfo)
Unsafe version of:CmdBeginRenderPass2KHR
static void
nvkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, long pSubpassEndInfo)
Unsafe version of:CmdEndRenderPass2KHR
static void
nvkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, long pSubpassBeginInfo, long pSubpassEndInfo)
Unsafe version of:CmdNextSubpass2KHR
static int
nvkCreateRenderPass2KHR(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass)
Unsafe version of:CreateRenderPass2KHR
static void
vkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, VkSubpassBeginInfoKHR pSubpassBeginInfo)
Begin a new render pass.static void
vkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, VkSubpassEndInfoKHR pSubpassEndInfo)
End the current render pass.static void
vkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, VkSubpassBeginInfoKHR pSubpassBeginInfo, VkSubpassEndInfoKHR pSubpassEndInfo)
Transition to the next subpass of a render pass.static int
vkCreateRenderPass2KHR(VkDevice device, VkRenderPassCreateInfo2KHR pCreateInfo, VkAllocationCallbacks pAllocator, long[] pRenderPass)
Array version of:CreateRenderPass2KHR
static int
vkCreateRenderPass2KHR(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 includesType
andpNext
parameters, allowing them to be more easily extended.Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkRenderPassCreateInfo2KHR
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pRenderPass
must be a valid pointer to aVkRenderPass
handle
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 theVkRenderPassCreateInfo2KHR
structure that describes the parameters of the render pass.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pRenderPass
- points to aVkRenderPass
handle 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
framebuffer
andrenderPass
members ofpRenderPassBegin
must have been created on the sameVkDevice
thatcommandBuffer
was allocated on - If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_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_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_SAMPLED_BIT
orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_TRANSFER_SRC_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_TRANSFER_DST_BIT
- If any of the
initialLayout
members of theVkAttachmentDescription
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
is notIMAGE_LAYOUT_UNDEFINED
, then each suchinitialLayout
must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
- The
srcStageMask
anddstStageMask
members of any element of thepDependencies
member ofVkRenderPassCreateInfo
used to createrenderPass
must be supported by the capabilities of the queue family identified by thequeueFamilyIndex
member of theVkCommandPoolCreateInfo
used to create the command pool whichcommandBuffer
was allocated from - For any attachment in
framebuffer
that is used byrenderPass
and 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_BIT
set
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepRenderPassBegin
must be a valid pointer to a validVkRenderPassBeginInfo
structurepSubpassBeginInfo
must be a valid pointer to a validVkSubpassBeginInfoKHR
structurecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was 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 aVkRenderPassBeginInfo
structure (defined below) which indicates the render pass to begin an instance of, and the framebuffer the instance uses.pSubpassBeginInfo
- a pointer to aVkSubpassBeginInfoKHR
structure 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
vkCmdNextSubpass2KHR
is semantically identical toCmdNextSubpass
, except that it is extensible, and thatcontents
is 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)
commandBuffer
must be a validVkCommandBuffer
handlepSubpassBeginInfo
must be a valid pointer to a validVkSubpassBeginInfoKHR
structurepSubpassEndInfo
must be a valid pointer to a validVkSubpassEndInfoKHR
structurecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was 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 aVkSubpassBeginInfoKHR
structure which contains information about the subpass which is about to begin rendering.pSubpassEndInfo
- a pointer to aVkSubpassEndInfoKHR
structure 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
vkCmdEndRenderPass2KHR
is 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)
commandBuffer
must be a validVkCommandBuffer
handlepSubpassEndInfo
must be a valid pointer to a validVkSubpassEndInfoKHR
structurecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was 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 aVkSubpassEndInfoKHR
structure 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
-
-