blob: ddf10e49d3893eaf3ce15092cb5c7e3cdce5b6f4 [file] [log] [blame]
// Copyright 2014-2021 The Khronos Group, Inc.
//
// SPDX-License-Identifier: CC-BY-4.0
[[display_swapchain_present,display_swapchain_present]]
When the `VK_KHR_display_swapchain` extension is enabled additional fields
can: be specified when presenting an image to a swapchain by setting
slink:VkPresentInfoKHR::pname:pNext to point to a
slink:VkDisplayPresentInfoKHR structure.
[open,refpage='VkDisplayPresentInfoKHR',desc='Structure describing parameters of a queue presentation to a swapchain',type='structs']
--
The sname:VkDisplayPresentInfoKHR structure is defined as:
include::{generated}/api/structs/VkDisplayPresentInfoKHR.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to a structure extending this
structure.
* pname:srcRect is a rectangular region of pixels to present.
It must: be a subset of the image being presented.
If sname:VkDisplayPresentInfoKHR is not specified, this region will be
assumed to be the entire presentable image.
* pname:dstRect is a rectangular region within the visible region of the
swapchain's display mode.
If sname:VkDisplayPresentInfoKHR is not specified, this region will be
assumed to be the entire visible region of the swapchain's mode.
If the specified rectangle is a subset of the display mode's visible
region, content from display planes below the swapchain's plane will be
visible outside the rectangle.
If there are no planes below the swapchain's, the area outside the
specified rectangle will be black.
If portions of the specified rectangle are outside of the display's
visible region, pixels mapping only to those portions of the rectangle
will be discarded.
* pname:persistent: If this is ename:VK_TRUE, the display engine will
enable buffered mode on displays that support it.
This allows the display engine to stop sending content to the display
until a new image is presented.
The display will instead maintain a copy of the last presented image.
This allows less power to be used, but may: increase presentation
latency.
If sname:VkDisplayPresentInfoKHR is not specified, persistent mode will
not be used.
If the extent of the pname:srcRect and pname:dstRect are not equal, the
presented pixels will be scaled accordingly.
.Valid Usage
****
* [[VUID-VkDisplayPresentInfoKHR-srcRect-01257]]
pname:srcRect must: specify a rectangular region that is a subset of the
image being presented
* [[VUID-VkDisplayPresentInfoKHR-dstRect-01258]]
pname:dstRect must: specify a rectangular region that is a subset of the
pname:visibleRegion parameter of the display mode the swapchain being
presented uses
* [[VUID-VkDisplayPresentInfoKHR-persistentContent-01259]]
If the pname:persistentContent member of the
sname:VkDisplayPropertiesKHR structure returned by
fname:vkGetPhysicalDeviceDisplayPropertiesKHR for the display the
present operation targets is ename:VK_FALSE, then pname:persistent must:
be ename:VK_FALSE
****
include::{generated}/validity/structs/VkDisplayPresentInfoKHR.txt[]
--