| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Extensions.VK_KHR_surface
- newtype VkColorSpaceKHR = VkColorSpaceKHR Int32
- pattern VK_COLOR_SPACE_SRGB_NONLINEAR_KHR :: VkColorSpaceKHR
- newtype VkPresentModeKHR = VkPresentModeKHR Int32
- pattern VK_PRESENT_MODE_IMMEDIATE_KHR :: VkPresentModeKHR
- pattern VK_PRESENT_MODE_MAILBOX_KHR :: VkPresentModeKHR
- pattern VK_PRESENT_MODE_FIFO_KHR :: VkPresentModeKHR
- pattern VK_PRESENT_MODE_FIFO_RELAXED_KHR :: VkPresentModeKHR
- newtype VkCompositeAlphaFlagBitsKHR = VkCompositeAlphaFlagBitsKHR VkFlags
- pattern VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR :: VkCompositeAlphaFlagBitsKHR
- pattern VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR :: VkCompositeAlphaFlagBitsKHR
- pattern VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR :: VkCompositeAlphaFlagBitsKHR
- pattern VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR :: VkCompositeAlphaFlagBitsKHR
- newtype VkSurfaceTransformFlagBitsKHR = VkSurfaceTransformFlagBitsKHR VkFlags
- pattern VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR :: VkSurfaceTransformFlagBitsKHR
- pattern VK_ERROR_SURFACE_LOST_KHR :: VkResult
- pattern VK_ERROR_NATIVE_WINDOW_IN_USE_KHR :: VkResult
- pattern VK_OBJECT_TYPE_SURFACE_KHR :: VkObjectType
- pattern VK_KHR_SURFACE_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_SURFACE_EXTENSION_NAME :: (Eq a, IsString a) => a
- pattern VK_COLORSPACE_SRGB_NONLINEAR_KHR :: VkColorSpaceKHR
- type VkSurfaceKHR = Ptr VkSurfaceKHR_T
- vkDestroySurfaceKHR :: ("instance" ::: VkInstance) -> ("surface" ::: VkSurfaceKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkGetPhysicalDeviceSurfaceSupportKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("queueFamilyIndex" ::: Word32) -> ("surface" ::: VkSurfaceKHR) -> ("pSupported" ::: Ptr VkBool32) -> IO VkResult
- vkGetPhysicalDeviceSurfaceCapabilitiesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pSurfaceCapabilities" ::: Ptr VkSurfaceCapabilitiesKHR) -> IO VkResult
- vkGetPhysicalDeviceSurfaceFormatsKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pSurfaceFormatCount" ::: Ptr Word32) -> ("pSurfaceFormats" ::: Ptr VkSurfaceFormatKHR) -> IO VkResult
- vkGetPhysicalDeviceSurfacePresentModesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pPresentModeCount" ::: Ptr Word32) -> ("pPresentModes" ::: Ptr VkPresentModeKHR) -> IO VkResult
- data VkSurfaceCapabilitiesKHR = VkSurfaceCapabilitiesKHR {
- vkMinImageCount :: Word32
- vkMaxImageCount :: Word32
- vkCurrentExtent :: VkExtent2D
- vkMinImageExtent :: VkExtent2D
- vkMaxImageExtent :: VkExtent2D
- vkMaxImageArrayLayers :: Word32
- vkSupportedTransforms :: VkSurfaceTransformFlagsKHR
- vkCurrentTransform :: VkSurfaceTransformFlagBitsKHR
- vkSupportedCompositeAlpha :: VkCompositeAlphaFlagsKHR
- vkSupportedUsageFlags :: VkImageUsageFlags
- data VkSurfaceFormatKHR = VkSurfaceFormatKHR {}
- type VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagBitsKHR
- type VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagBitsKHR
Documentation
newtype VkColorSpaceKHR Source #
VkColorSpaceKHR - supported color space of the presentation engine
Description
VK_COLOR_SPACE_SRGB_NONLINEAR_KHRspecifies support for the sRGB color space.
VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXTspecifies support for the Display-P3 color space and applies an sRGB-like transfer function (defined below).VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXTspecifies support for the extended sRGB color space and applies a linear transfer function.VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXTspecifies support for the extended sRGB color space and applies an sRGB transfer function.VK_COLOR_SPACE_DCI_P3_LINEAR_EXTspecifies support for the DCI-P3 color space and applies a linear OETF.VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXTspecifies support for the DCI-P3 color space and applies the Gamma 2.6 OETF.VK_COLOR_SPACE_BT709_LINEAR_EXTspecifies support for the BT709 color space and applies a linear OETF.VK_COLOR_SPACE_BT709_NONLINEAR_EXTspecifies support for the BT709 color space and applies the SMPTE 170M OETF.VK_COLOR_SPACE_BT2020_LINEAR_EXTspecifies support for the BT2020 color space and applies a linear OETF.VK_COLOR_SPACE_HDR10_ST2084_EXTspecifies support for the HDR10 (BT2020 color) space and applies the SMPTE ST2084 Perceptual Quantizer (PQ) OETF.VK_COLOR_SPACE_DOLBYVISION_EXTspecifies support for the Dolby Vision (BT2020 color space), proprietary encoding, and applies the SMPTE ST2084 OETF.VK_COLOR_SPACE_HDR10_HLG_EXTspecifies support for the HDR10 (BT2020 color space) and applies the Hybrid Log Gamma (HLG) OETF.VK_COLOR_SPACE_ADOBERGB_LINEAR_EXTspecifies support for the AdobeRGB color space and applies a linear OETF.VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXTspecifies support for the AdobeRGB color space and applies the Gamma 2.2 OETF.VK_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.
The color components of Non-linear color space swap chain images have
had the appropriate transfer function applied. Vulkan requires that all
implementations support the sRGB transfer function when using an SRGB
pixel format. Other transfer functions, such as SMPTE 170M or SMPTE2084,
must not be performed by the implementation, but can be performed by
the application shader. This extension defines enums for
VkColorSpaceKHR that correspond to the following color spaces:
+----------+----------+----------+----------+----------+-----------+ | Name | Red | Green | Blue | White-po | Transfer | | | Primary | Primary | Primary | int | function | +==========+==========+==========+==========+==========+===========+ | DCI-P3 | 0.680, | 0.265, | 0.150, | 0.3127, | Gamma 2.6 | | | 0.320 | 0.690 | 0.060 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | Display- | 0.680, | 0.265, | 0.150, | 0.3127, | Display-P | | P3 | 0.320 | 0.690 | 0.060 | 0.3290 | 3 | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | BT709 | 0.640, | 0.300, | 0.150, | 0.3127, | SMPTE | | | 0.330 | 0.600 | 0.060 | 0.3290 | 170M | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | sRGB | 0.640, | 0.300, | 0.150, | 0.3127, | sRGB | | | 0.330 | 0.600 | 0.060 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | extended | 0.640, | 0.300, | 0.150, | 0.3127, | extended | | sRGB | 0.330 | 0.600 | 0.060 | 0.3290 | sRGB | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | HDR10_ST | 0.708, | 0.170, | 0.131, | 0.3127, | ST2084 | | 2084 | 0.292 | 0.797 | 0.046 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | DOLBYVIS | 0.708, | 0.170, | 0.131, | 0.3127, | ST2084 | | ION | 0.292 | 0.797 | 0.046 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | HDR10_HL | 0.708, | 0.170, | 0.131, | 0.3127, | HLG | | G | 0.292 | 0.797 | 0.046 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ | AdobeRGB | 0.640, | 0.210, | 0.150, | 0.3127, | AdobeRGB | | | 0.330 | 0.710 | 0.060 | 0.3290 | | | | | | | (D65) | | +----------+----------+----------+----------+----------+-----------+ Color Spaces and Attributes
For Opto-Electrical Transfer Function (OETF), unless otherwise specified, the values of L and E are defined as:
L - linear luminance of image \(0 \\leq L \\leq 1\) for conventional colorimetry
E - corresponding electrical signal (value stored in memory)
See Also
Constructors
| VkColorSpaceKHR Int32 |
pattern VK_COLOR_SPACE_SRGB_NONLINEAR_KHR :: VkColorSpaceKHR Source #
newtype VkPresentModeKHR Source #
VkPresentModeKHR - presentation mode supported for a surface
Description
VK_PRESENT_MODE_IMMEDIATE_KHRspecifies that the presentation engine does not wait for a vertical blanking period to update the current image, meaning this mode may result in visible tearing. No internal queuing of presentation requests is needed, as the requests are applied immediately.
VK_PRESENT_MODE_MAILBOX_KHRspecifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal single-entry queue is used to hold pending presentation requests. If the queue is full when a new presentation request is received, the new request replaces the existing entry, and any images associated with the prior entry become available for re-use by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.VK_PRESENT_MODE_FIFO_KHRspecifies that the presentation engine waits for the next vertical blanking period to update the current image. Tearing cannot be observed. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during each vertical blanking period in which the queue is non-empty. This is the only value ofpresentModethat is required to be supported.VK_PRESENT_MODE_FIFO_RELAXED_KHRspecifies that the presentation engine generally waits for the next vertical blanking period to update the current image. If a vertical blanking period has already passed since the last update of the current image then the presentation engine does not wait for another vertical blanking period for the update, meaning this mode may result in visible tearing in this case. This mode is useful for reducing visual stutter with an application that will mostly present a new image before the next vertical blanking period, but may occasionally be late, and present a new image just after the next vertical blanking period. An internal queue is used to hold pending presentation requests. New requests are appended to the end of the queue, and one request is removed from the beginning of the queue and processed during or after each vertical blanking period in which the queue is non-empty.VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHRspecifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine is only required to update the current image after a new presentation request is received. Therefore the application must make a presentation request whenever an update is required. However, the presentation engine may update the current image at any point, meaning this mode may result in visible tearing.VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRspecifies that the presentation engine and application have concurrent access to a single image, which is referred to as a shared presentable image. The presentation engine periodically updates the current image on its regular refresh cycle. The application is only required to make one initial presentation request, after which the presentation engine must update the current image without any need for further presentation requests. The application can indicate the image contents have been updated by making a presentation request, but this does not guarantee the timing of when it will be updated. This mode may result in visible tearing if rendering to the image is not timed correctly.
The supported
VkImageUsageFlagBits 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 | +===================================+===================================+ | @VK_PRESENT_MODE_IMMEDIATE_KHR@ | 'VkSurfaceCapabilitiesKHR'::@supp | | | ortedUsageFlags@ | +-----------------------------------+-----------------------------------+ | @VK_PRESENT_MODE_MAILBOX_KHR@ | 'VkSurfaceCapabilitiesKHR'::@supp | | | ortedUsageFlags@ | +-----------------------------------+-----------------------------------+ | @VK_PRESENT_MODE_FIFO_KHR@ | 'VkSurfaceCapabilitiesKHR'::@supp | | | ortedUsageFlags@ | +-----------------------------------+-----------------------------------+ | @VK_PRESENT_MODE_FIFO_RELAXED_KHR | 'VkSurfaceCapabilitiesKHR'::@supp | | @ | ortedUsageFlags@ | +-----------------------------------+-----------------------------------+ | @VK_PRESENT_MODE_SHARED_DEMAND_RE | 'Graphics.Vulkan.Extensions.VK_KH | | FRESH_KHR@ | R_shared_presentable_image.VkShar | | | edPresentSurfaceCapabilitiesKHR': | | | :@sharedPresentSupportedUsageFlag | | | s@ | +-----------------------------------+-----------------------------------+ | @VK_PRESENT_MODE_SHARED_CONTINUOU | 'Graphics.Vulkan.Extensions.VK_KH | | S_REFRESH_KHR@ | R_shared_presentable_image.VkShar | | | edPresentSurfaceCapabilitiesKHR': | | | :@sharedPresentSupportedUsageFlag | | | s@ | +-----------------------------------+-----------------------------------+ Presentable image usage queries
Note
For reference, the mode indicated by VK_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
VK_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
VkSwapchainCreateInfoKHR,
vkGetPhysicalDeviceSurfacePresentModesKHR
Constructors
| VkPresentModeKHR Int32 |
pattern VK_PRESENT_MODE_IMMEDIATE_KHR :: VkPresentModeKHR Source #
pattern VK_PRESENT_MODE_MAILBOX_KHR :: VkPresentModeKHR Source #
pattern VK_PRESENT_MODE_FIFO_KHR :: VkPresentModeKHR Source #
pattern VK_PRESENT_MODE_FIFO_RELAXED_KHR :: VkPresentModeKHR Source #
newtype VkCompositeAlphaFlagBitsKHR Source #
VkCompositeAlphaFlagBitsKHR - alpha compositing modes supported on a device
Description
These values are described as follows:
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR: The alpha channel, 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.VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR: The alpha channel, if it exists, of the images is respected in the compositing process. The non-alpha channels of the image are expected to already be multiplied by the alpha channel by the application.VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR: The alpha channel, if it exists, of the images is respected in the compositing process. The non-alpha channels of the image are not expected to already be multiplied by the alpha channel by the application; instead, the compositor will multiply the non-alpha channels of the image by the alpha channel during compositing.VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR: The way in which the presentation engine treats the alpha channel 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
Constructors
| VkCompositeAlphaFlagBitsKHR VkFlags |
Instances
newtype VkSurfaceTransformFlagBitsKHR Source #
VkSurfaceTransformFlagBitsKHR - presentation transforms supported on a device
See Also
VkDisplaySurfaceCreateInfoKHR,
VkSurfaceCapabilities2EXT,
VkSurfaceCapabilitiesKHR, VkSurfaceTransformFlagsKHR,
VkSwapchainCreateInfoKHR
Constructors
| VkSurfaceTransformFlagBitsKHR VkFlags |
Instances
pattern VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR specifies that image content is
presented without being transformed.
pattern VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR specifies that image content is
rotated 90 degrees clockwise.
pattern VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR specifies that image content
is rotated 180 degrees clockwise.
pattern VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR specifies that image content
is rotated 270 degrees clockwise.
pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR specifies that image
content is mirrored horizontally.
pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR specifies
that image content is mirrored horizontally, then rotated 90 degrees
clockwise.
pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR specifies
that image content is mirrored horizontally, then rotated 180 degrees
clockwise.
pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR specifies
that image content is mirrored horizontally, then rotated 270 degrees
clockwise.
pattern VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR :: VkSurfaceTransformFlagBitsKHR Source #
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR specifies that the presentation
transform is not specified, and is instead determined by
platform-specific considerations and mechanisms outside Vulkan.
pattern VK_ERROR_SURFACE_LOST_KHR :: VkResult Source #
pattern VK_ERROR_NATIVE_WINDOW_IN_USE_KHR :: VkResult Source #
pattern VK_OBJECT_TYPE_SURFACE_KHR :: VkObjectType Source #
pattern VK_KHR_SURFACE_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_SURFACE_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
pattern VK_COLORSPACE_SRGB_NONLINEAR_KHR :: VkColorSpaceKHR Source #
type VkSurfaceKHR = Ptr VkSurfaceKHR_T Source #
VkSurfaceKHR - Opaque handle to a surface object
Description
The VK_KHR_surface extension declares the VkSurfaceKHR object, and
provides a function for destroying VkSurfaceKHR objects. Separate
platform-specific extensions each provide a function for creating a
VkSurfaceKHR 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
VkPhysicalDeviceSurfaceInfo2KHR,
VkSwapchainCreateInfoKHR,
vkCreateAndroidSurfaceKHR,
vkCreateDisplayPlaneSurfaceKHR,
vkCreateIOSSurfaceMVK,
vkCreateMacOSSurfaceMVK,
vkCreateMirSurfaceKHR,
vkCreateViSurfaceNN,
vkCreateWaylandSurfaceKHR,
vkCreateWin32SurfaceKHR,
vkCreateXcbSurfaceKHR,
vkCreateXlibSurfaceKHR,
vkDestroySurfaceKHR,
vkGetDeviceGroupSurfacePresentModesKHR,
vkGetPhysicalDevicePresentRectanglesKHR,
vkGetPhysicalDeviceSurfaceCapabilities2EXT,
vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
vkGetPhysicalDeviceSurfaceFormatsKHR,
vkGetPhysicalDeviceSurfacePresentModesKHR,
vkGetPhysicalDeviceSurfaceSupportKHR
vkDestroySurfaceKHR :: ("instance" ::: VkInstance) -> ("surface" ::: VkSurfaceKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroySurfaceKHR - Destroy a VkSurfaceKHR object
Parameters
instanceis the instance used to create the surface.
surfaceis the surface to destroy.pAllocatoris the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).
Description
Destroying a VkSurfaceKHR merely severs the connection between Vulkan
and the native surface, and does not imply destroying the native
surface, closing a window, or similar behavior.
Valid Usage
- All
VkSwapchainKHRobjects created forsurfacemust have been destroyed prior to destroyingsurface
- If
VkAllocationCallbackswere provided whensurfacewas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whensurfacewas created,pAllocatormust beNULL
Valid Usage (Implicit)
instancemust be a validVkInstancehandle
- If
surfaceis notVK_NULL_HANDLE,surfacemust be a validVkSurfaceKHRhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
surfaceis a valid handle, it must have been created, allocated, or retrieved frominstance
Host Synchronization
- Host access to
surfacemust be externally synchronized
See Also
vkGetPhysicalDeviceSurfaceSupportKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("queueFamilyIndex" ::: Word32) -> ("surface" ::: VkSurfaceKHR) -> ("pSupported" ::: Ptr VkBool32) -> IO VkResult Source #
vkGetPhysicalDeviceSurfaceSupportKHR - Query if presentation is supported
Parameters
physicalDeviceis the physical device.
queueFamilyIndexis the queue family.surfaceis the surface.pSupportedis a pointer to aVkBool32, which is set toVK_TRUEto indicate support, andVK_FALSEotherwise.
Description
Valid Usage
queueFamilyIndexmust be less thanpQueueFamilyPropertyCountreturned byvkGetPhysicalDeviceQueueFamilyPropertiesfor the givenphysicalDevice
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle
surfacemust be a validVkSurfaceKHRhandlepSupportedmust be a valid pointer to aVkBool32value- Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_SURFACE_LOST_KHR
See Also
VkBool32,
VkPhysicalDevice,
VkSurfaceKHR
vkGetPhysicalDeviceSurfaceCapabilitiesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pSurfaceCapabilities" ::: Ptr VkSurfaceCapabilitiesKHR) -> IO VkResult Source #
vkGetPhysicalDeviceSurfaceCapabilitiesKHR - Query surface capabilities
Parameters
physicalDeviceis the physical device that will be associated with the swapchain to be created, as described forvkCreateSwapchainKHR.
surfaceis the surface that will be associated with the swapchain.pSurfaceCapabilitiesis a pointer to an instance of theVkSurfaceCapabilitiesKHRstructure in which the capabilities are returned.
Description
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle
surfacemust be a validVkSurfaceKHRhandlepSurfaceCapabilitiesmust be a valid pointer to aVkSurfaceCapabilitiesKHRstructure- Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_SURFACE_LOST_KHR
See Also
vkGetPhysicalDeviceSurfaceFormatsKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pSurfaceFormatCount" ::: Ptr Word32) -> ("pSurfaceFormats" ::: Ptr VkSurfaceFormatKHR) -> IO VkResult Source #
vkGetPhysicalDeviceSurfaceFormatsKHR - Query color formats supported by surface
Parameters
physicalDeviceis the physical device that will be associated with the swapchain to be created, as described forvkCreateSwapchainKHR.
surfaceis the surface that will be associated with the swapchain.pSurfaceFormatCountis a pointer to an integer related to the number of format pairs available or queried, as described below.pSurfaceFormatsis eitherNULLor a pointer to an array ofVkSurfaceFormatKHRstructures.
Description
If pSurfaceFormats is NULL, then the number of format pairs
supported for the given surface is returned in pSurfaceFormatCount.
The number of format pairs supported will be greater than or equal to 1.
Otherwise, pSurfaceFormatCount must point to a variable set by the
user 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 pairs supported,
at most pSurfaceFormatCount structures will be written. If
pSurfaceFormatCount is smaller than the number of format pairs
supported for the given surface, VK_INCOMPLETE will be returned
instead of VK_SUCCESS to indicate that not all the available values
were returned.
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle
surfacemust be a validVkSurfaceKHRhandlepSurfaceFormatCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pSurfaceFormatCountis not0, andpSurfaceFormatsis notNULL,pSurfaceFormatsmust be a valid pointer to an array ofpSurfaceFormatCountVkSurfaceFormatKHRstructures - Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- Success
- -
VK_SUCCESSVK_INCOMPLETE
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_SURFACE_LOST_KHR
See Also
vkGetPhysicalDeviceSurfacePresentModesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pPresentModeCount" ::: Ptr Word32) -> ("pPresentModes" ::: Ptr VkPresentModeKHR) -> IO VkResult Source #
vkGetPhysicalDeviceSurfacePresentModesKHR - Query supported presentation modes
Parameters
physicalDeviceis the physical device that will be associated with the swapchain to be created, as described forvkCreateSwapchainKHR.
surfaceis the surface that will be associated with the swapchain.pPresentModeCountis a pointer to an integer related to the number of presentation modes available or queried, as described below.pPresentModesis eitherNULLor a pointer to an array ofVkPresentModeKHRvalues, indicating the supported presentation modes.
Description
If pPresentModes is NULL, then the number of presentation modes
supported for the given surface is returned in pPresentModeCount.
Otherwise, pPresentModeCount must point to a variable 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 pPresentModeCount is less
than the number of presentation modes supported, at most
pPresentModeCount values will be written. If pPresentModeCount is
smaller than the number of presentation modes supported for the given
surface, VK_INCOMPLETE will be returned instead of VK_SUCCESS to
indicate that not all the available values were returned.
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle
surfacemust be a validVkSurfaceKHRhandlepPresentModeCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pPresentModeCountis not0, andpPresentModesis notNULL,pPresentModesmust be a valid pointer to an array ofpPresentModeCountVkPresentModeKHRvalues - Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- Success
- -
VK_SUCCESSVK_INCOMPLETE
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_SURFACE_LOST_KHR
See Also
data VkSurfaceCapabilitiesKHR Source #
VkSurfaceCapabilitiesKHR - Structure describing capabilities of a surface
Description
Note
Supported usage flags of a presentable image when using
VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR or
VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR presentation mode are
provided by
VkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlags.
Note
Formulas such as min(N, maxImageCount) are not correct, since
maxImageCount may be zero.
See Also
VkCompositeAlphaFlagsKHR,
VkExtent2D,
VkImageUsageFlags,
VkSurfaceCapabilities2KHR,
VkSurfaceTransformFlagBitsKHR, VkSurfaceTransformFlagsKHR,
vkGetPhysicalDeviceSurfaceCapabilitiesKHR
Constructors
| VkSurfaceCapabilitiesKHR | |
Fields
| |
data VkSurfaceFormatKHR Source #
VkSurfaceFormatKHR - Structure describing a supported swapchain format-color space pair
Description
See Also
VkColorSpaceKHR, VkFormat,
VkSurfaceFormat2KHR,
vkGetPhysicalDeviceSurfaceFormatsKHR
Constructors
| VkSurfaceFormatKHR | |
Fields
| |
type VkCompositeAlphaFlagsKHR = VkCompositeAlphaFlagBitsKHR Source #
VkCompositeAlphaFlagsKHR - Bitmask of VkCompositeAlphaFlagBitsKHR
Description
VkCompositeAlphaFlagsKHR is a bitmask type for setting a mask of zero
or more VkCompositeAlphaFlagBitsKHR.
See Also
VkCompositeAlphaFlagBitsKHR,
VkSurfaceCapabilities2EXT,
VkSurfaceCapabilitiesKHR
type VkSurfaceTransformFlagsKHR = VkSurfaceTransformFlagBitsKHR Source #
VkSurfaceTransformFlagsKHR - Bitmask of VkSurfaceTransformFlagBitsKHR
Description
VkSurfaceTransformFlagsKHR is a bitmask type for setting a mask of
zero or more VkSurfaceTransformFlagBitsKHR.
See Also
VkDisplayPropertiesKHR,
VkSurfaceCapabilities2EXT,
VkSurfaceCapabilitiesKHR, VkSurfaceTransformFlagBitsKHR