| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_get_surface_capabilities2
Description
Name
VK_KHR_get_surface_capabilities2 - instance extension
VK_KHR_get_surface_capabilities2
- Name String
VK_KHR_get_surface_capabilities2
- Extension Type
- Instance extension
- Registered Extension Number
- 120
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_surface
- Contact
Other Extension Metadata
- Last Modified Date
- 2017-02-27
- IP Status
- No known IP claims.
- Contributors
- Ian Elliott, Google
- James Jones, NVIDIA
- Alon Or-bach, Samsung
Description
This extension provides new queries for device surface capabilities that
can be easily extended by other extensions, without introducing any
further queries. This extension can be considered the VK_KHR_surface
equivalent of the VK_KHR_get_physical_device_properties2 extension.
New Commands
New Structures
New Enum Constants
Issues
1) What should this extension be named?
RESOLVED: VK_KHR_get_surface_capabilities2. Other alternatives:
VK_KHR_surface2
- One extension, combining a separate display-specific query extension.
2) Should additional WSI query functions be extended?
RESOLVED:
getPhysicalDeviceSurfaceCapabilitiesKHR: Yes. The need for this motivated the extension.getPhysicalDeviceSurfaceSupportKHR: No. Currently only has boolean output. Extensions should instead extendgetPhysicalDeviceSurfaceCapabilities2KHR.getPhysicalDeviceSurfaceFormatsKHR: Yes.getPhysicalDeviceSurfacePresentModesKHR: No. Recent discussion concluded this introduced too much variability for applications to deal with. Extensions should instead extendgetPhysicalDeviceSurfaceCapabilities2KHR.getPhysicalDeviceXlibPresentationSupportKHR: Not in this extension.getPhysicalDeviceXcbPresentationSupportKHR: Not in this extension.getPhysicalDeviceWaylandPresentationSupportKHR: Not in this extension.getPhysicalDeviceWin32PresentationSupportKHR: Not in this extension.
Version History
Revision 1, 2017-02-27 (James Jones)
- Initial draft.
See Also
No cross-references are available
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
- getPhysicalDeviceSurfaceCapabilities2KHR :: forall (a :: [Type]) (b :: [Type]) io. (Extendss PhysicalDeviceSurfaceInfo2KHR a, PokeChain a, Extendss SurfaceCapabilities2KHR b, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (SurfaceCapabilities2KHR b)
- getPhysicalDeviceSurfaceFormats2KHR :: forall (a :: [Type]) (b :: [Type]) io. (Extendss PhysicalDeviceSurfaceInfo2KHR a, PokeChain a, Extendss SurfaceFormat2KHR b, PokeChain b, PeekChain b, MonadIO io) => PhysicalDevice -> PhysicalDeviceSurfaceInfo2KHR a -> io (Result, "surfaceFormats" ::: Vector (SurfaceFormat2KHR b))
- data PhysicalDeviceSurfaceInfo2KHR (es :: [Type]) = PhysicalDeviceSurfaceInfo2KHR {
- next :: Chain es
- surface :: SurfaceKHR
- data SurfaceCapabilities2KHR (es :: [Type]) = SurfaceCapabilities2KHR {}
- data SurfaceFormat2KHR (es :: [Type]) = SurfaceFormat2KHR {
- next :: Chain es
- surfaceFormat :: SurfaceFormatKHR
- type KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION = 1
- pattern KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION :: Integral a => a
- type KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"
- pattern KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME :: (Eq a, IsString a) => a
- newtype SurfaceKHR = SurfaceKHR Word64
- data SurfaceCapabilitiesKHR = SurfaceCapabilitiesKHR {
- minImageCount :: Word32
- maxImageCount :: Word32
- currentExtent :: Extent2D
- minImageExtent :: Extent2D
- maxImageExtent :: Extent2D
- maxImageArrayLayers :: Word32
- supportedTransforms :: SurfaceTransformFlagsKHR
- currentTransform :: SurfaceTransformFlagBitsKHR
- supportedCompositeAlpha :: CompositeAlphaFlagsKHR
- supportedUsageFlags :: ImageUsageFlags
- data SurfaceFormatKHR = SurfaceFormatKHR {}
- newtype ColorSpaceKHR where
- ColorSpaceKHR Int32
- pattern COLOR_SPACE_ADOBERGB_LINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_BT2020_LINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_BT709_LINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_BT709_NONLINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_DCI_P3_NONLINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_DISPLAY_NATIVE_AMD :: ColorSpaceKHR
- pattern COLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_DOLBYVISION_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_HDR10_HLG_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_HDR10_ST2084_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_PASS_THROUGH_EXT :: ColorSpaceKHR
- pattern COLOR_SPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR
- newtype CompositeAlphaFlagBitsKHR where
- CompositeAlphaFlagBitsKHR Flags
- pattern COMPOSITE_ALPHA_INHERIT_BIT_KHR :: CompositeAlphaFlagBitsKHR
- pattern COMPOSITE_ALPHA_OPAQUE_BIT_KHR :: CompositeAlphaFlagBitsKHR
- pattern COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagBitsKHR
- pattern COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: CompositeAlphaFlagBitsKHR
- type CompositeAlphaFlagsKHR = CompositeAlphaFlagBitsKHR
- newtype SurfaceTransformFlagBitsKHR where
- SurfaceTransformFlagBitsKHR Flags
- pattern SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_IDENTITY_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_INHERIT_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: SurfaceTransformFlagBitsKHR
- pattern SURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: SurfaceTransformFlagBitsKHR
- type SurfaceTransformFlagsKHR = SurfaceTransformFlagBitsKHR
Documentation
getPhysicalDeviceSurfaceCapabilities2KHR Source #
Arguments
| :: forall (a :: [Type]) (b :: [Type]) io. (Extendss PhysicalDeviceSurfaceInfo2KHR a, PokeChain a, Extendss SurfaceCapabilities2KHR b, PokeChain b, PeekChain b, MonadIO io) | |
| => PhysicalDevice |
|
| -> PhysicalDeviceSurfaceInfo2KHR a |
|
| -> io (SurfaceCapabilities2KHR b) |
vkGetPhysicalDeviceSurfaceCapabilities2KHR - Reports capabilities of a surface on a physical device
Description
getPhysicalDeviceSurfaceCapabilities2KHR behaves similarly to
getPhysicalDeviceSurfaceCapabilitiesKHR,
with the ability to specify extended inputs via chained input
structures, and to return extended information via chained output
structures.
Valid Usage
-
If the
VK_GOOGLE_surfaceless_queryextension is not enabled,pSurfaceInfo->surfacemust be a validSurfaceKHRhandle
-
If
pSurfaceInfo->surfaceis notNULL_HANDLE,pSurfaceInfo->surfacemust be supported byphysicalDevice, as reported bygetPhysicalDeviceSurfaceSupportKHRor an equivalent platform-specific mechanism - If a
SurfaceCapabilitiesFullScreenExclusiveEXTstructure is included in thepNextchain ofpSurfaceCapabilities, aSurfaceFullScreenExclusiveWin32InfoEXTstructure must be included in thepNextchain ofpSurfaceInfo - If a
SurfacePresentModeCompatibilityKHRstructure is included in thepNextchain ofpSurfaceCapabilities, aSurfacePresentModeKHRstructure must be included in thepNextchain ofpSurfaceInfo - If a
SurfacePresentScalingCapabilitiesKHRstructure is included in thepNextchain ofpSurfaceCapabilities, aSurfacePresentModeKHRstructure must be included in thepNextchain ofpSurfaceInfo - If a
SurfacePresentModeCompatibilityKHRstructure is included in thepNextchain ofpSurfaceCapabilities,pSurfaceInfo->surfacemust be a validSurfaceKHRhandle - If a
SurfacePresentScalingCapabilitiesKHRstructure is included in thepNextchain ofpSurfaceCapabilities,pSurfaceInfo->surfacemust be a validSurfaceKHRhandle
Valid Usage (Implicit)
-
physicalDevicemust be a validPhysicalDevicehandle
-
pSurfaceInfomust be a valid pointer to a validPhysicalDeviceSurfaceInfo2KHRstructure -
pSurfaceCapabilitiesmust be a valid pointer to aSurfaceCapabilities2KHRstructure
Return Codes
See Also
VK_KHR_get_surface_capabilities2,
PhysicalDevice, PhysicalDeviceSurfaceInfo2KHR,
SurfaceCapabilities2KHR
getPhysicalDeviceSurfaceFormats2KHR Source #
Arguments
| :: forall (a :: [Type]) (b :: [Type]) io. (Extendss PhysicalDeviceSurfaceInfo2KHR a, PokeChain a, Extendss SurfaceFormat2KHR b, PokeChain b, PeekChain b, MonadIO io) | |
| => PhysicalDevice |
|
| -> PhysicalDeviceSurfaceInfo2KHR a |
|
| -> io (Result, "surfaceFormats" ::: Vector (SurfaceFormat2KHR b)) |
vkGetPhysicalDeviceSurfaceFormats2KHR - Query color formats supported by surface
Description
getPhysicalDeviceSurfaceFormats2KHR behaves similarly to
getPhysicalDeviceSurfaceFormatsKHR,
with the ability to be extended via pNext chains.
If pSurfaceFormats is NULL, then the number of format tuples
supported for the given surface is returned in pSurfaceFormatCount.
Otherwise, pSurfaceFormatCount must point to a variable set by the
application to the number of elements in the pSurfaceFormats array,
and on return the variable is overwritten with the number of structures
actually written to pSurfaceFormats. If the value of
pSurfaceFormatCount is less than the number of format tuples
supported, at most pSurfaceFormatCount structures will be written, and
INCOMPLETE will be returned instead of
SUCCESS, to indicate that not all the
available values were returned.
Valid Usage
- If
the
VK_GOOGLE_surfaceless_queryextension is not enabled,pSurfaceInfo->surfacemust be a validSurfaceKHRhandle
- If
pSurfaceInfo->surfaceis notNULL_HANDLE,pSurfaceInfo->surfacemust be supported byphysicalDevice, as reported bygetPhysicalDeviceSurfaceSupportKHRor an equivalent platform-specific mechanism
Valid Usage (Implicit)
-
physicalDevicemust be a validPhysicalDevicehandle
-
pSurfaceInfomust be a valid pointer to a validPhysicalDeviceSurfaceInfo2KHRstructure -
pSurfaceFormatCountmust be a valid pointer to auint32_tvalue -
If the value referenced by
pSurfaceFormatCountis not0, andpSurfaceFormatsis notNULL,pSurfaceFormatsmust be a valid pointer to an array ofpSurfaceFormatCountSurfaceFormat2KHRstructures
Return Codes
See Also
VK_KHR_get_surface_capabilities2,
PhysicalDevice, PhysicalDeviceSurfaceInfo2KHR,
SurfaceFormat2KHR
data PhysicalDeviceSurfaceInfo2KHR (es :: [Type]) Source #
VkPhysicalDeviceSurfaceInfo2KHR - Structure specifying a surface and related swapchain creation parameters
Description
The members of PhysicalDeviceSurfaceInfo2KHR correspond to the
arguments to
getPhysicalDeviceSurfaceCapabilitiesKHR,
with sType and pNext added for extensibility.
Additional capabilities of a surface may be available to swapchains
created with different full-screen exclusive settings - particularly if
exclusive full-screen access is application controlled. These additional
capabilities can be queried by adding a
SurfaceFullScreenExclusiveInfoEXT
structure to the pNext chain of this structure when used to query
surface properties. Additionally, for Win32 surfaces with application
controlled exclusive full-screen access, chaining a
SurfaceFullScreenExclusiveWin32InfoEXT
structure may also report additional surface capabilities. These
additional capabilities only apply to swapchains created with the same
parameters included in the pNext chain of
SwapchainCreateInfoKHR.
Valid Usage
- If the
pNextchain includes aSurfaceFullScreenExclusiveInfoEXTstructure with itsfullScreenExclusivemember set toFULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT, andsurfacewas created usingcreateWin32SurfaceKHR, aSurfaceFullScreenExclusiveWin32InfoEXTstructure must be included in thepNextchain
- If surface is
not VK_NULL_HANDLE, and the
VK_GOOGLE_surfaceless_queryextension is not enabled,surfacemust be a validSurfaceKHRhandle
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofSurfaceFullScreenExclusiveInfoEXT,SurfaceFullScreenExclusiveWin32InfoEXT, orSurfacePresentModeKHR - The
sTypevalue of each structure in thepNextchain must be unique
See Also
VK_KHR_get_surface_capabilities2,
StructureType,
SurfaceKHR,
getDeviceGroupSurfacePresentModes2EXT,
getPhysicalDeviceSurfaceCapabilities2KHR,
getPhysicalDeviceSurfaceFormats2KHR,
getPhysicalDeviceSurfacePresentModes2EXT
Constructors
| PhysicalDeviceSurfaceInfo2KHR | |
Fields
| |
Instances
data SurfaceCapabilities2KHR (es :: [Type]) Source #
VkSurfaceCapabilities2KHR - Structure describing capabilities of a surface
Description
If the VK_GOOGLE_surfaceless_query extension is enabled and
PhysicalDeviceSurfaceInfo2KHR::surface in the
getPhysicalDeviceSurfaceCapabilities2KHR call is
NULL_HANDLE, the values returned in
minImageCount, maxImageCount, currentExtent, and
currentTransform will not reflect that of any surface and will instead
be as such:
minImageCountandmaxImageCountwill be 0xFFFFFFFFcurrentExtentwill be (0xFFFFFFFF, 0xFFFFFFFF)currentTransformwill beSURFACE_TRANSFORM_INHERIT_BIT_KHR
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofDisplayNativeHdrSurfaceCapabilitiesAMD,LatencySurfaceCapabilitiesNV,PresentTimingSurfaceCapabilitiesEXT,SharedPresentSurfaceCapabilitiesKHR,SurfaceCapabilitiesFullScreenExclusiveEXT,SurfaceCapabilitiesPresentBarrierNV,SurfaceCapabilitiesPresentId2KHR,SurfaceCapabilitiesPresentWait2KHR,SurfacePresentModeCompatibilityKHR,SurfacePresentScalingCapabilitiesKHR, orSurfaceProtectedCapabilitiesKHR - The
sTypevalue of each structure in thepNextchain must be unique
See Also
VK_KHR_get_surface_capabilities2,
StructureType,
SurfaceCapabilitiesKHR,
getPhysicalDeviceSurfaceCapabilities2KHR
Constructors
| SurfaceCapabilities2KHR | |
Fields
| |
Instances
data SurfaceFormat2KHR (es :: [Type]) Source #
VkSurfaceFormat2KHR - Structure describing a supported swapchain format tuple
Description
If the
imageCompressionControlSwapchain
feature is supported and a
ImageCompressionPropertiesEXT
structure is included in the pNext chain of this structure, then it
will be filled with the compression properties that are supported for
the surfaceFormat.
Valid Usage
- If the
VK_EXT_image_compression_control_swapchainextension is not supported, thepNextchain must not include anImageCompressionPropertiesEXTstructure
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_SURFACE_FORMAT_2_KHR
-
pNextmust beNULLor a pointer to a valid instance ofImageCompressionPropertiesEXT - The
sTypevalue of each structure in thepNextchain must be unique
See Also
VK_KHR_get_surface_capabilities2,
StructureType,
SurfaceFormatKHR,
getPhysicalDeviceSurfaceFormats2KHR
Constructors
| SurfaceFormat2KHR | |
Fields
| |
Instances
pattern KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION :: Integral a => a Source #
type KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2" Source #
pattern KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
newtype SurfaceKHR Source #
VkSurfaceKHR - Opaque handle to a surface object
Description
The VK_KHR_surface extension declares the SurfaceKHR object, and
provides a function for destroying SurfaceKHR objects. Separate
platform-specific extensions each provide a function for creating a
SurfaceKHR object for the respective platform. From the application’s
perspective this is an opaque handle, just like the handles of other
Vulkan objects.
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_KHR_surface,
PhysicalDeviceSurfaceInfo2KHR,
SwapchainCreateInfoKHR,
createAndroidSurfaceKHR,
createDirectFBSurfaceEXT,
createDisplayPlaneSurfaceKHR,
createHeadlessSurfaceEXT,
createIOSSurfaceMVK,
createImagePipeSurfaceFUCHSIA,
createMacOSSurfaceMVK,
createMetalSurfaceEXT,
createScreenSurfaceQNX,
createStreamDescriptorSurfaceGGP,
vkCreateSurfaceOHOS,
vkCreateUbmSurfaceSEC,
createViSurfaceNN,
createWaylandSurfaceKHR,
createWin32SurfaceKHR,
createXcbSurfaceKHR,
createXlibSurfaceKHR,
destroySurfaceKHR,
getDeviceGroupSurfacePresentModesKHR,
getPhysicalDevicePresentRectanglesKHR,
getPhysicalDeviceSurfaceCapabilities2EXT,
getPhysicalDeviceSurfaceCapabilitiesKHR,
getPhysicalDeviceSurfaceFormatsKHR,
getPhysicalDeviceSurfacePresentModesKHR,
getPhysicalDeviceSurfaceSupportKHR
Constructors
| SurfaceKHR Word64 |
Instances
data SurfaceCapabilitiesKHR Source #
VkSurfaceCapabilitiesKHR - Structure describing capabilities of a surface
Description
Supported usage flags of a presentable image when using
PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or
PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are
provided by
SharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags.
Formulas such as min(N, maxImageCount) are not correct, since
maxImageCount may be zero.
See Also
VK_KHR_surface,
CompositeAlphaFlagsKHR, Extent2D,
ImageUsageFlags,
SurfaceCapabilities2KHR,
SurfaceTransformFlagBitsKHR, SurfaceTransformFlagsKHR,
getPhysicalDeviceSurfaceCapabilitiesKHR
Constructors
| SurfaceCapabilitiesKHR | |
Fields
| |
Instances
data SurfaceFormatKHR Source #
VkSurfaceFormatKHR - Structure describing a supported swapchain format-color space pair
See Also
VK_KHR_surface,
ColorSpaceKHR, Format,
SurfaceFormat2KHR,
getPhysicalDeviceSurfaceFormatsKHR
Constructors
| SurfaceFormatKHR | |
Fields
| |
Instances
newtype ColorSpaceKHR Source #
VkColorSpaceKHR - Supported color space of the presentation engine
Description
COLOR_SPACE_SRGB_NONLINEAR_KHRspecifies support for the images in sRGB color space, encoded according to the sRGB specification.
COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXTspecifies support for the images in Display-P3 color space, encoded using a Display-P3 transfer function.COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXTspecifies support for the images in extended sRGB color space, encoded using a linear transfer function.COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXTspecifies support for the images in extended sRGB color space, encoded according to the scRGB specification.COLOR_SPACE_DISPLAY_P3_LINEAR_EXTspecifies support for the images in Display-P3 color space, encoded using a linear transfer function.COLOR_SPACE_DCI_P3_NONLINEAR_EXTspecifies support for the images in DCI-P3 color space, encoded according to the DCI-P3 specification. Note that values in such an image are interpreted as XYZ encoded color data by the presentation engine.COLOR_SPACE_BT709_LINEAR_EXTspecifies support for the images in BT709 color space, encoded using a linear transfer function.COLOR_SPACE_BT709_NONLINEAR_EXTspecifies support for the images in BT709 color space, encoded according to the BT709 specification.COLOR_SPACE_BT2020_LINEAR_EXTspecifies support for the images in BT2020 color space, encoded using a linear transfer function.COLOR_SPACE_HDR10_ST2084_EXTspecifies support for the images in HDR10 (BT2020) color space, encoded according to SMPTE ST2084 Perceptual Quantizer (PQ) specification.COLOR_SPACE_HDR10_HLG_EXTspecifies support for the images in HDR10 (BT2020) color space, encoded according to the Hybrid Log Gamma (HLG) specification.COLOR_SPACE_ADOBERGB_LINEAR_EXTspecifies support for images in Adobe RGB color space, encoded using a linear transfer function.COLOR_SPACE_ADOBERGB_NONLINEAR_EXTspecifies support for the images in Adobe RGB color space, encoded according to the Adobe RGB specification (approximately Gamma 2.2).COLOR_SPACE_PASS_THROUGH_EXTspecifies that color components are used “as is”. This is intended to allow applications to supply data for color spaces not described here.COLOR_SPACE_DISPLAY_NATIVE_AMDspecifies support for the display’s native color space. This matches the color space expectations of AMD’s FreeSync2 standard, for displays supporting it.
In the initial release of the VK_KHR_surface and VK_KHR_swapchain
extensions, the token COLORSPACE_SRGB_NONLINEAR_KHR was used. Starting
in the 2016-05-13 updates to the extension branches, matching release
1.0.13 of the core API specification, COLOR_SPACE_SRGB_NONLINEAR_KHR
is used instead for consistency with Vulkan naming rules. The older enum
is still available for backwards compatibility.
In older versions of this extension COLOR_SPACE_DISPLAY_P3_LINEAR_EXT
was misnamed
COLOR_SPACE_DCI_P3_LINEAR_EXT.
This has been updated to indicate that it uses RGB color encoding, not
XYZ. The old name is legacy but is maintained for backwards
compatibility.
In older versions of the VK_EXT_swapchain_colorspace extension,
COLOR_SPACE_DOLBYVISION_EXT was exposed. The intent was to indicate
the presentation engine shall decode an image using the SMPTE ST 2084
Perceptual Quantizer (PQ) EOTF, and then apply a proprietary OOTF to
process the image. However, Dolby Vision profile 8.4 describes an
encoding using the Hybrid Log Gamma (HLG) OETF, and there is no
swapchain extension for signaling Dolby Vision metadata to be used by a
proprietary OOTF. This enum is legacy but is maintained for backwards
compatibility.
For a traditional “Linear” or non-gamma transfer function color space
use COLOR_SPACE_PASS_THROUGH_EXT.
On Wayland, COLOR_SPACE_PASS_THROUGH_EXT can be used to disable color
management by the WSI on a surface, which makes it possible for the
application to create a wp_color_management_surface_v1 object without
triggering a surface_exists protocol error.
The presentation engine interprets the pixel values of the R, G, and B components as having been encoded using an appropriate transfer function. Applications should ensure that the appropriate transfer function has been applied. Texel encode requires that all implementations implicitly apply the sRGB EOTF-1 on R, G, and B components when shaders write to an sRGB pixel format image, which is useful for sRGB color spaces. For sRGB color spaces with other pixel formats, or other non-linear color spaces, applications can apply the transfer function explicitly in a shader. The A channel is always interpreted as linearly encoded.
This extension defines enums for ColorSpaceKHR that correspond to the
following color spaces:
| Name | Red Primary | Green Primary | Blue Primary | White-point | Transfer function |
|---|---|---|---|---|---|
| DCI-P3 | 1.000, 0.000 | 0.000, 1.000 | 0.000, 0.000 | 0.3333, 0.3333 | DCI P3 |
| Display-P3 | 0.680, 0.320 | 0.265, 0.690 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | Display-P3 |
| BT709 | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | BT709 |
| sRGB | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | sRGB |
| extended sRGB | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | scRGB |
| HDR10_ST2084 | 0.708, 0.292 | 0.170, 0.797 | 0.131, 0.046 | 0.3127, 0.3290 (D65) | ST2084 PQ |
| HDR10_HLG | 0.708, 0.292 | 0.170, 0.797 | 0.131, 0.046 | 0.3127, 0.3290 (D65) | HLG |
| Adobe RGB | 0.640, 0.330 | 0.210, 0.710 | 0.150, 0.060 | 0.3127, 0.3290 (D65) | Adobe RGB |
Color Spaces and Attributes
The transfer functions are described in the “Transfer Functions” chapter of the Khronos Data Format Specification.
Except Display-P3 OETF, which is:
[begin{aligned} E & = begin{cases} 1.055 times L^{1 over 2.4} - 0.055 & text{for} 0.0030186 leq L leq 1 -- 12.92 times L & text{for} 0 leq L < 0.0030186
Constructors
| ColorSpaceKHR Int32 |
Bundled Patterns
| pattern COLOR_SPACE_ADOBERGB_LINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_ADOBERGB_NONLINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_BT2020_LINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_BT709_LINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_BT709_NONLINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_DCI_P3_NONLINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_DISPLAY_NATIVE_AMD :: ColorSpaceKHR | |
| pattern COLOR_SPACE_DISPLAY_P3_LINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_DOLBYVISION_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_HDR10_HLG_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_HDR10_ST2084_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_PASS_THROUGH_EXT :: ColorSpaceKHR | |
| pattern COLOR_SPACE_SRGB_NONLINEAR_KHR :: ColorSpaceKHR |
Instances
newtype CompositeAlphaFlagBitsKHR Source #
VkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a device
Description
These values are described as follows:
COMPOSITE_ALPHA_OPAQUE_BIT_KHR: The alpha component, if it exists, of the images is ignored in the compositing process. Instead, the image is treated as if it has a constant alpha of 1.0.COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR: The alpha component, if it exists, of the images is respected in the compositing process. The non-alpha components of the image are expected to already be multiplied by the alpha component by the application.COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR: The alpha component, if it exists, of the images is respected in the compositing process. The non-alpha components of the image are not expected to already be multiplied by the alpha component by the application; instead, the compositor will multiply the non-alpha components of the image by the alpha component during compositing.COMPOSITE_ALPHA_INHERIT_BIT_KHR: The way in which the presentation engine treats the alpha component in the images is unknown to the Vulkan API. Instead, the application is responsible for setting the composite alpha blending mode using native window system commands. If the application does not set the blending mode using native window system commands, then a platform-specific default will be used.
See Also
VK_KHR_surface,
CompositeAlphaFlagsKHR,
SwapchainCreateInfoKHR
Constructors
| CompositeAlphaFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype SurfaceTransformFlagBitsKHR Source #
VkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a device
Description
SURFACE_TRANSFORM_IDENTITY_BIT_KHRspecifies that image content is presented without being transformed.
SURFACE_TRANSFORM_ROTATE_90_BIT_KHRspecifies that image content is rotated 90 degrees clockwise.SURFACE_TRANSFORM_ROTATE_180_BIT_KHRspecifies that image content is rotated 180 degrees clockwise.SURFACE_TRANSFORM_ROTATE_270_BIT_KHRspecifies that image content is rotated 270 degrees clockwise.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHRspecifies that image content is mirrored horizontally.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHRspecifies that image content is mirrored horizontally, then rotated 90 degrees clockwise.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHRspecifies that image content is mirrored horizontally, then rotated 180 degrees clockwise.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHRspecifies that image content is mirrored horizontally, then rotated 270 degrees clockwise.SURFACE_TRANSFORM_INHERIT_BIT_KHRspecifies that the presentation transform is not specified, and is instead determined by platform-specific considerations and mechanisms outside Vulkan.
See Also
VK_KHR_surface,
CommandBufferInheritanceRenderPassTransformInfoQCOM,
CopyCommandTransformInfoQCOM,
DisplaySurfaceCreateInfoKHR,
RenderPassTransformBeginInfoQCOM,
SurfaceCapabilities2EXT,
SurfaceCapabilitiesKHR, SurfaceTransformFlagsKHR,
SwapchainCreateInfoKHR
Constructors
| SurfaceTransformFlagBitsKHR Flags |
Bundled Patterns