Before an application can present an image, the image’s layout must be transitioned to the IMAGE_LAYOUT_PRESENT_SRC_KHR layout, or for a shared presentable image the IMAGE_LAYOUT_SHARED_PRESENT_KHR layout.
When transitioning the image to IMAGE_LAYOUT_SHARED_PRESENT_KHR or IMAGE_LAYOUT_PRESENT_SRC_KHR, there is no need to delay subsequent processing, or perform any visibility operations (as QueuePresentKHR performs automatic visibility operations). To achieve this, the dstAccessMask member of the VkImageMemoryBarrier should be set to 0, and the dstStageMask parameter should be set to PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT.
pSwapchain must be uniquepImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the IMAGE_LAYOUT_PRESENT_SRC_KHR or IMAGE_LAYOUT_SHARED_PRESENT_KHR layout at the time the operation is executed on a VkDeviceVkPresentIdKHR structure is included in the pNext chain, and the presentId feature is not enabled, each presentIds entry in that structure must be NULLpSwapchains array has been created with VkSwapchainPresentModesCreateInfoEXT, all of the elements of this array must be created with VkSwapchainPresentModesCreateInfoEXTsType must be STRUCTURE_TYPE_PRESENT_INFO_KHRpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDeviceGroupPresentInfoKHR, VkDisplayPresentInfoKHR, VkFrameBoundaryEXT, VkPresentIdKHR, VkPresentRegionsKHR, VkPresentTimesInfoGOOGLE, VkSwapchainPresentFenceInfoEXT, or VkSwapchainPresentModeInfoEXTsType value of each struct in the pNext chain must be uniquewaitSemaphoreCount is not 0, pWaitSemaphores must be a valid pointer to an array of waitSemaphoreCount valid VkSemaphore handlespSwapchains must be a valid pointer to an array of swapchainCount valid VkSwapchainKHR handlespImageIndices must be a valid pointer to an array of swapchainCount uint32_t valuespResults is not NULL, pResults must be a valid pointer to an array of swapchainCount VkResult valuesswapchainCount must be greater than 0pSwapchains, and the elements of pWaitSemaphores that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
struct VkPresentInfoKHR {
VkStructureType sType;
void const * pNext;
uint32_t waitSemaphoreCount;
VkSemaphore const * pWaitSemaphores;
uint32_t swapchainCount;
VkSwapchainKHR const * pSwapchains;
uint32_t const * pImageIndices;
VkResult * pResults;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkPresentInfoKHR.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | PIMAGEINDICES
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | PRESULTS
The struct member offsets. |
| public static final int | PSWAPCHAINS
The struct member offsets. |
| public static final int | PWAITSEMAPHORES
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| public static final int | SWAPCHAINCOUNT
The struct member offsets. |
| public static final int | WAITSEMAPHORECOUNT
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkPresentInfoKHR(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkPresentInfoKHR | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPresentInfoKHR. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | |
| public static VkPresentInfoKHR. | |
| protected VkPresentInfoKHR | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | create(int
the buffer capacity capacity)Returns a new |
| public static VkPresentInfoKHR. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkPresentInfoKHR | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPresentInfoKHR. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR | |
| public static VkPresentInfoKHR. | |
| public static VkPresentInfoKHR. | |
| public static IntBuffer | |
| public static void | |
| public static long | |
| public static void | |
| public static IntBuffer | |
| public static void | |
| public static LongBuffer | |
| public static void | |
| public static LongBuffer | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | nswapchainCount(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | nwaitSemaphoreCount(long struct, int value)
Sets the specified value to the |
| public IntBuffer | pImageIndices()
a pointer to an array of indices into the array of each swapchain’s presentable images, with |
| public VkPresentInfoKHR | pImageIndices(IntBuffer value)
Sets the address of the specified |
| public long | |
| public VkPresentInfoKHR | |
| public VkPresentInfoKHR | pNext(VkDeviceGroupPresentInfoKHR value)
Prepends the specified |
| public VkPresentInfoKHR | pNext(VkDisplayPresentInfoKHR value)
Prepends the specified |
| public VkPresentInfoKHR | |
| public VkPresentInfoKHR | |
| public VkPresentInfoKHR | pNext(VkPresentRegionsKHR value)
Prepends the specified |
| public VkPresentInfoKHR | pNext(VkPresentTimesInfoGOOGLE value)
Prepends the specified |
| public VkPresentInfoKHR | pNext(VkSwapchainPresentFenceInfoEXT value)
Prepends the specified |
| public VkPresentInfoKHR | pNext(VkSwapchainPresentModeInfoEXT value)
Prepends the specified |
| public IntBuffer | |
| public VkPresentInfoKHR | |
| public LongBuffer | |
| public VkPresentInfoKHR | |
| public LongBuffer | pWaitSemaphores()
|
| public VkPresentInfoKHR | pWaitSemaphores(LongBuffer value)
Sets the address of the specified |
| public VkPresentInfoKHR | set(int sType, long pNext, LongBuffer pWaitSemaphores, int swapchainCount, LongBuffer pSwapchains, IntBuffer pImageIndices, IntBuffer pResults)
Initializes this struct with the specified values. |
| public VkPresentInfoKHR | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkPresentInfoKHR | |
| public VkPresentInfoKHR | |
| public int | |
| public VkPresentInfoKHR | |
| public static void | |
| public int |