Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_KHR_incremental_present - device extension
VK_KHR_incremental_present
- Name String
VK_KHR_incremental_present
- Extension Type
- Device extension
- Registered Extension Number
- 85
- Revision
- 2
- Extension and Version Dependencies
- Requires support for Vulkan 1.0
- Requires
VK_KHR_swapchain
to be enabled for any device-level functionality
- Contact
Other Extension Metadata
- Last Modified Date
- 2016-11-02
- IP Status
- No known IP claims.
- Contributors
- Ian Elliott, Google
- Jesse Hall, Google
- Alon Or-bach, Samsung
- James Jones, NVIDIA
- Daniel Rakos, AMD
- Ray Smith, ARM
- Mika Isojarvi, Google
- Jeff Juliano, NVIDIA
- Jeff Bolz, NVIDIA
Description
This device extension extends
queuePresentKHR
, from the
VK_KHR_swapchain
extension, allowing an application to specify a list
of rectangular, modified regions of each image to present. This should
be used in situations where an application is only changing a small
portion of the presentable images within a swapchain, since it enables
the presentation engine to avoid wasting time presenting parts of the
surface that have not changed.
This extension is leveraged from the EGL_KHR_swap_buffers_with_damage
extension.
New Structures
RectLayerKHR
Extending
PresentInfoKHR
:
New Enum Constants
Issues
1) How should we handle steroescopic-3D swapchains? We need to add a
layer for each rectangle. One approach is to create another struct
containing the Rect2D
plus layer, and
have PresentRegionsKHR
point to an array of that struct. Another
approach is to have two parallel arrays, pRectangles
and pLayers
,
where pRectangles
[i] and pLayers
[i] must be used together. Which
approach should we use, and if the array of a new structure, what should
that be called?
RESOLVED: Create a new structure, which is a
Rect2D
plus a layer, and will be called
RectLayerKHR
.
2) Where is the origin of the RectLayerKHR
?
RESOLVED: The upper left corner of the presentable image(s) of the swapchain, per the definition of framebuffer coordinates.
3) Does the rectangular region, RectLayerKHR
, specify pixels of the
swapchain’s image(s), or of the surface?
RESOLVED: Of the image(s). Some presentation engines may scale the pixels of a swapchain’s image(s) to the size of the surface. The size of the swapchain’s image(s) will be consistent, where the size of the surface may vary over time.
4) What if all of the rectangles for a given swapchain contain a width and/or height of zero?
RESOLVED: The application is indicating that no pixels changed since
the last present. The presentation engine may use such a hint and not
update any pixels for the swapchain. However, all other semantics of
queuePresentKHR
must still be
honored, including waiting for semaphores to signal.
5) When the swapchain is created with
SwapchainCreateInfoKHR
::preTransform
set to a value other than
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
,
should the rectangular region, RectLayerKHR
, be transformed to align
with the preTransform
?
RESOLVED: No. The rectangular region in RectLayerKHR
should not be
transformed. As such, it may not align with the extents of the
swapchain’s image(s). It is the responsibility of the presentation
engine to transform the rectangular region. This matches the behavior of
the Android presentation engine, which set the precedent.
Version History
Revision 1, 2016-11-02 (Ian Elliott)
- Internal revisions
Revision 2, 2021-03-18 (Ian Elliott)
- Clarified alignment of rectangles for presentation engines that support transformed swapchains.
See Also
PresentRegionKHR
, PresentRegionsKHR
, RectLayerKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- data PresentRegionsKHR = PresentRegionsKHR {}
- data PresentRegionKHR = PresentRegionKHR {}
- data RectLayerKHR = RectLayerKHR {}
- type KHR_INCREMENTAL_PRESENT_SPEC_VERSION = 2
- pattern KHR_INCREMENTAL_PRESENT_SPEC_VERSION :: forall a. Integral a => a
- type KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"
- pattern KHR_INCREMENTAL_PRESENT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
data PresentRegionsKHR Source #
VkPresentRegionsKHR - Structure hint of rectangular regions changed by vkQueuePresentKHR
Valid Usage
-
swapchainCount
must be the same value asPresentInfoKHR
::swapchainCount
, wherePresentInfoKHR
is included in thepNext
chain of thisPresentRegionsKHR
structure
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_PRESENT_REGIONS_KHR
- If
pRegions
is notNULL
,pRegions
must be a valid pointer to an array ofswapchainCount
validPresentRegionKHR
structures -
swapchainCount
must be greater than0
See Also
PresentRegionsKHR | |
|
Instances
Show PresentRegionsKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present showsPrec :: Int -> PresentRegionsKHR -> ShowS # show :: PresentRegionsKHR -> String # showList :: [PresentRegionsKHR] -> ShowS # | |
FromCStruct PresentRegionsKHR Source # | |
ToCStruct PresentRegionsKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present withCStruct :: PresentRegionsKHR -> (Ptr PresentRegionsKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr PresentRegionsKHR -> PresentRegionsKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr PresentRegionsKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PresentRegionsKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero PresentRegionsKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present |
data PresentRegionKHR Source #
VkPresentRegionKHR - Structure containing rectangular region changed by vkQueuePresentKHR for a given VkImage
Valid Usage (Implicit)
- If
rectangleCount
is not0
, andpRectangles
is notNULL
,pRectangles
must be a valid pointer to an array ofrectangleCount
validRectLayerKHR
structures
See Also
PresentRegionKHR | |
|
Instances
Show PresentRegionKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present showsPrec :: Int -> PresentRegionKHR -> ShowS # show :: PresentRegionKHR -> String # showList :: [PresentRegionKHR] -> ShowS # | |
FromCStruct PresentRegionKHR Source # | |
ToCStruct PresentRegionKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present withCStruct :: PresentRegionKHR -> (Ptr PresentRegionKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr PresentRegionKHR -> PresentRegionKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr PresentRegionKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PresentRegionKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero PresentRegionKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_incremental_present |
data RectLayerKHR Source #
VkRectLayerKHR - Structure containing a rectangle, including layer, changed by vkQueuePresentKHR for a given VkImage
Description
Some platforms allow the size of a surface to change, and then scale the
pixels of the image to fit the surface. RectLayerKHR
specifies pixels
of the swapchain’s image(s), which will be constant for the life of the
swapchain.
Valid Usage
- The sum of
offset
andextent
, after being transformed according to thepreTransform
member of theSwapchainCreateInfoKHR
structure, must be no greater than theimageExtent
member of theSwapchainCreateInfoKHR
structure passed tocreateSwapchainKHR
-
layer
must be less than theimageArrayLayers
member of theSwapchainCreateInfoKHR
structure passed tocreateSwapchainKHR
See Also
VK_KHR_incremental_present,
Extent2D
,
Offset2D
, PresentRegionKHR
Instances
type KHR_INCREMENTAL_PRESENT_SPEC_VERSION = 2 Source #
pattern KHR_INCREMENTAL_PRESENT_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present" Source #
pattern KHR_INCREMENTAL_PRESENT_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #