Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_EXT_surface_maintenance1 - instance extension
VK_EXT_surface_maintenance1
- Name String
VK_EXT_surface_maintenance1
- Extension Type
- Instance extension
- Registered Extension Number
- 275
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_surface and VK_KHR_get_surface_capabilities2
- Contact
- Extension Proposal
- VK_EXT_surface_maintenance1
Other Extension Metadata
- Last Modified Date
- 2022-11-09
- Contributors
- Jeff Juliano, NVIDIA
- Lionel Landwerlin, Intel
- Shahbaz Youssefi, Google
- Chris Forbes, Google
- Ian Elliott, Google
- Hans-Kristian Arntzen, Valve
- Daniel Stone, Collabora
Description
VK_EXT_surface_maintenance1
adds a collection of window system
integration features that were intentionally left out or overlooked in
the original VK_KHR_surface
extension.
The new features are as follows:
- Allow querying number of min/max images from a surface for a particular presentation mode.
- Allow querying a surface’s scaled presentation capabilities.
- Allow querying a surface for the set of presentation modes which can be easily switched between without requiring swapchain recreation.
New Structures
Extending
SurfaceCapabilities2KHR
:
New Enums
New Bitmasks
New Enum Constants
Version History
Revision 0, 2019-02-27 (Lionel Landwerlin)
- Internal revisions
Revision 1, 2022-11-09 (Shahbaz Youssefi)
- Add functionality and complete spec
See Also
PresentGravityFlagBitsEXT
, PresentGravityFlagsEXT
,
PresentScalingFlagBitsEXT
, PresentScalingFlagsEXT
,
SurfacePresentModeCompatibilityEXT
, SurfacePresentModeEXT
,
SurfacePresentScalingCapabilitiesEXT
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 SurfacePresentModeEXT = SurfacePresentModeEXT {}
- data SurfacePresentScalingCapabilitiesEXT = SurfacePresentScalingCapabilitiesEXT {}
- data SurfacePresentModeCompatibilityEXT = SurfacePresentModeCompatibilityEXT {}
- type PresentScalingFlagsEXT = PresentScalingFlagBitsEXT
- newtype PresentScalingFlagBitsEXT where
- type PresentGravityFlagsEXT = PresentGravityFlagBitsEXT
- newtype PresentGravityFlagBitsEXT where
- type EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION = 1
- pattern EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION :: forall a. Integral a => a
- type EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1"
- pattern EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype PresentModeKHR where
- PresentModeKHR Int32
- pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR
- pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR
- pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR
- pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR
Documentation
data SurfacePresentModeEXT Source #
VkSurfacePresentModeEXT - Structure describing present mode of a surface
Description
If the SurfacePresentModeEXT
structure is included in the pNext
chain of
PhysicalDeviceSurfaceInfo2KHR
,
the values returned in
SurfaceCapabilitiesKHR
::minImageCount
,
SurfaceCapabilitiesKHR
::maxImageCount
,
SurfacePresentScalingCapabilitiesEXT
::minScaledImageExtent
, and
SurfacePresentScalingCapabilitiesEXT
::maxScaledImageExtent
are valid
only for the specified presentMode
. If presentMode
is
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
or
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
,
the per-present mode image counts must both be one. The per-present
mode image counts may be less-than or greater-than the image counts
returned when SurfacePresentModeEXT
is not provided.
Note
If
SwapchainPresentModesCreateInfoEXT
is provided to swapchain creation, the requirements for forward progress
may be less strict. For example, a FIFO swapchain might only require 2
images to guarantee forward progress, but a MAILBOX one might require 4.
Without the per-present image counts, such an implementation would have
to return 4 in
SurfaceCapabilitiesKHR
::minImageCount
,
which pessimizes FIFO. Conversely, an implementation may return a low
number for minImageCount, but internally bump the image count when
application queries
getSwapchainImagesKHR
, which can
surprise applications, and is not discoverable until swapchain creation.
Using SurfacePresentModeEXT
and
SwapchainPresentModesCreateInfoEXT
together effectively removes this problem.
SwapchainPresentModesCreateInfoEXT
is required for the specification to be backwards compatible with
applications that do not know about, or make use of this feature.
Valid Usage (Implicit)
See Also
SurfacePresentModeEXT | |
|
Instances
data SurfacePresentScalingCapabilitiesEXT Source #
VkSurfacePresentScalingCapabilitiesEXT - Structure describing the presentation scaling capabilities of the surface
Description
Before creating a swapchain whose scaling mode can be specified
through the use of
SwapchainPresentScalingCreateInfoEXT
,
obtain the set of supported scaling modes by including a
SurfacePresentModeEXT
structure in the pNext
chain of
PhysicalDeviceSurfaceInfo2KHR
when calling
getPhysicalDeviceSurfaceCapabilities2KHR
.
The implementation must return the same values in
SurfacePresentScalingCapabilitiesEXT
for any of the compatible present
modes as obtained through SurfacePresentModeCompatibilityEXT
.
Valid Usage (Implicit)
See Also
VK_EXT_surface_maintenance1,
Extent2D
, PresentGravityFlagsEXT
,
PresentScalingFlagsEXT
,
StructureType
SurfacePresentScalingCapabilitiesEXT | |
|
Instances
data SurfacePresentModeCompatibilityEXT Source #
VkSurfacePresentModeCompatibilityEXT - Structure describing the subset of compatible presentation modes for the purposes of switching without swapchain recreation
Description
If pPresentModes
is NULL
, then the number of present modes that are
compatible with the one specified in SurfacePresentModeEXT
is returned
in presentModeCount
. Otherwise, presentModeCount
must be set by the
user to the number of elements in the pPresentModes
array, and on
return the variable is overwritten with the number of values actually
written to pPresentModes
. If the value of presentModeCount
is less
than the number of compatible present modes that are supported, at most
presentModeCount
values will be written to pPresentModes
. The
implementation must include the present mode passed to
SurfacePresentModeEXT
in pPresentModes
, unless presentModeCount
is
zero.
Before creating a swapchain whose present modes can be modified
through the use of
SwapchainPresentModesCreateInfoEXT
,
obtain the set of present modes compatible with a given initial present
mode by including a SurfacePresentModeEXT
structure in the pNext
chain of
PhysicalDeviceSurfaceInfo2KHR
when calling
getPhysicalDeviceSurfaceCapabilities2KHR
.
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT
-
If
presentModeCount
is not0
, andpPresentModes
is notNULL
,pPresentModes
must be a valid pointer to an array ofpresentModeCount
PresentModeKHR
values
See Also
SurfacePresentModeCompatibilityEXT | |
|
Instances
newtype PresentScalingFlagBitsEXT Source #
VkPresentScalingFlagBitsEXT - Bitmask specifying presentation scaling methods
See Also
pattern PRESENT_SCALING_ONE_TO_ONE_BIT_EXT :: PresentScalingFlagBitsEXT |
|
pattern PRESENT_SCALING_ASPECT_RATIO_STRETCH_BIT_EXT :: PresentScalingFlagBitsEXT |
|
pattern PRESENT_SCALING_STRETCH_BIT_EXT :: PresentScalingFlagBitsEXT |
|
Instances
newtype PresentGravityFlagBitsEXT Source #
VkPresentGravityFlagBitsEXT - Bitmask specifying presentation pixel gravity on either the x or y axis
Description
If the value in
SurfaceCapabilitiesKHR
::currentTransform
is not
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
,
it is implementation-defined whether the gravity configuration applies
to the presented image before or after transformation.
See Also
pattern PRESENT_GRAVITY_MIN_BIT_EXT :: PresentGravityFlagBitsEXT |
|
pattern PRESENT_GRAVITY_MAX_BIT_EXT :: PresentGravityFlagBitsEXT |
|
pattern PRESENT_GRAVITY_CENTERED_BIT_EXT :: PresentGravityFlagBitsEXT |
|
Instances
pattern EXT_SURFACE_MAINTENANCE_1_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME = "VK_EXT_surface_maintenance1" Source #
pattern EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype PresentModeKHR Source #
VkPresentModeKHR - Presentation mode supported for a surface
Description
The supported
ImageUsageFlagBits
of the
presentable images of a swapchain created for a surface may differ
depending on the presentation mode, and can be determined as per the
table below:
Presentation mode | Image usage flags |
---|---|
PRESENT_MODE_IMMEDIATE_KHR | SurfaceCapabilitiesKHR ::supportedUsageFlags |
PRESENT_MODE_MAILBOX_KHR | SurfaceCapabilitiesKHR ::supportedUsageFlags |
PRESENT_MODE_FIFO_KHR | SurfaceCapabilitiesKHR ::supportedUsageFlags |
PRESENT_MODE_FIFO_RELAXED_KHR | SurfaceCapabilitiesKHR ::supportedUsageFlags |
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR ::sharedPresentSupportedUsageFlags |
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR | SharedPresentSurfaceCapabilitiesKHR ::sharedPresentSupportedUsageFlags |
Presentable image usage queries
Note
For reference, the mode indicated by PRESENT_MODE_FIFO_KHR
is
equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap
interval of 1, while the mode indicated by
PRESENT_MODE_FIFO_RELAXED_KHR
is equivalent to the behavior of
{wgl|glX}SwapBuffers with a swap interval of -1 (from the
{WGL|GLX}_EXT_swap_control_tear extensions).
See Also
VK_KHR_surface,
LatencySurfaceCapabilitiesNV
,
SurfacePresentModeCompatibilityEXT
,
SurfacePresentModeEXT
,
SwapchainCreateInfoKHR
,
SwapchainPresentModeInfoEXT
,
SwapchainPresentModesCreateInfoEXT
,
getPhysicalDeviceSurfacePresentModes2EXT
,
getPhysicalDeviceSurfacePresentModesKHR
pattern PRESENT_MODE_IMMEDIATE_KHR :: PresentModeKHR |
|
pattern PRESENT_MODE_MAILBOX_KHR :: PresentModeKHR |
|
pattern PRESENT_MODE_FIFO_KHR :: PresentModeKHR |
|
pattern PRESENT_MODE_FIFO_RELAXED_KHR :: PresentModeKHR |
|
pattern PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR :: PresentModeKHR |
|
pattern PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR :: PresentModeKHR |
|