Class KHRSurface
VK_KHR_surface extension is an instance extension. It introduces VkSurfaceKHR objects, which abstract native platform surface or window objects for use with Vulkan. It also provides a way to determine whether a queue family in a physical device supports presenting to particular surface.
Separate extensions for each platform provide the mechanisms for creating VkSurfaceKHR objects, but once created they may be used in this and other platform-independent extensions, in particular the VK_KHR_swapchain extension.
Examples
Note
The example code for the VK_KHR_surface and VK_KHR_swapchain extensions was removed from the appendix after revision 1.0.29. This WSI example code was ported to the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-Tools/blob/main/cube/cube.c).
- Name String
VK_KHR_surface- Extension Type
- Instance extension
- Registered Extension Number
- 1
- Revision
- 25
- Contact
- James Jones cubanismo
- Ian Elliott ianelliottus
Other Extension Metadata
- Last Modified Date
- 2016-08-25
- IP Status
- No known IP claims.
- Contributors
- Patrick Doane, Blizzard
- Ian Elliott, LunarG
- Jesse Hall, Google
- James Jones, NVIDIA
- David Mao, AMD
- Norbert Nopper, Freescale
- Alon Or-bach, Samsung
- Daniel Rakos, AMD
- Graham Sellers, AMD
- Jeff Vigil, Qualcomm
- Chia-I Wu, LunarG
- Faith Ekstrand, Intel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intVkColorSpaceKHR - Supported color space of the presentation enginestatic final intVkColorSpaceKHR - Supported color space of the presentation enginestatic final intVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a devicestatic final intVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a devicestatic final intVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a devicestatic final intVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a devicestatic final intExtendsVkResult.static final intExtendsVkResult.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkObjectType.static final intVkPresentModeKHR - Presentation mode supported for a surfacestatic final intVkPresentModeKHR - Presentation mode supported for a surfacestatic final intVkPresentModeKHR - Presentation mode supported for a surfacestatic final intVkPresentModeKHR - Presentation mode supported for a surfacestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a devicestatic final intVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a device -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkDestroySurfaceKHR(org.lwjgl.vulkan.VkInstance instance, long surface, long pAllocator) Unsafe version of:DestroySurfaceKHRstatic intnvkGetPhysicalDeviceSurfaceCapabilitiesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pSurfaceCapabilities) Unsafe version of:GetPhysicalDeviceSurfaceCapabilitiesKHRstatic intnvkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pSurfaceFormatCount, long pSurfaceFormats) Unsafe version of:GetPhysicalDeviceSurfaceFormatsKHRstatic intnvkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pPresentModeCount, long pPresentModes) Unsafe version of:GetPhysicalDeviceSurfacePresentModesKHRstatic intnvkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, long pSupported) Unsafe version of:GetPhysicalDeviceSurfaceSupportKHRstatic voidvkDestroySurfaceKHR(org.lwjgl.vulkan.VkInstance instance, long surface, @Nullable VkAllocationCallbacks pAllocator) Destroy a VkSurfaceKHR object.static intvkGetPhysicalDeviceSurfaceCapabilitiesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, VkSurfaceCapabilitiesKHR pSurfaceCapabilities) Query surface capabilities.static intvkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, int[] pSurfaceFormatCount, @Nullable VkSurfaceFormatKHR.Buffer pSurfaceFormats) Array version of:GetPhysicalDeviceSurfaceFormatsKHRstatic intvkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, IntBuffer pSurfaceFormatCount, @Nullable VkSurfaceFormatKHR.Buffer pSurfaceFormats) Query color formats supported by surface.static intvkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, int[] pPresentModeCount, int @Nullable [] pPresentModes) Array version of:GetPhysicalDeviceSurfacePresentModesKHRstatic intvkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, IntBuffer pPresentModeCount, @Nullable IntBuffer pPresentModes) Query supported presentation modes.static intvkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, int[] pSupported) Array version of:GetPhysicalDeviceSurfaceSupportKHRstatic intvkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, IntBuffer pSupported) Query if presentation is supported.
-
Field Details
-
VK_KHR_SURFACE_SPEC_VERSION
public static final int VK_KHR_SURFACE_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_KHR_SURFACE_EXTENSION_NAME
The extension name.- See Also:
-
VK_ERROR_SURFACE_LOST_KHR
public static final int VK_ERROR_SURFACE_LOST_KHR- See Also:
-
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
public static final int VK_ERROR_NATIVE_WINDOW_IN_USE_KHR- See Also:
-
VK_OBJECT_TYPE_SURFACE_KHR
public static final int VK_OBJECT_TYPE_SURFACE_KHRExtendsVkObjectType.- See Also:
-
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR
public static final int VK_SURFACE_TRANSFORM_INHERIT_BIT_KHRVkSurfaceTransformFlagBitsKHR - Presentation transforms supported on a deviceDescription
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
VkCommandBufferInheritanceRenderPassTransformInfoQCOM,VkCopyCommandTransformInfoQCOM,VkDisplaySurfaceCreateInfoKHR,VkRenderPassTransformBeginInfoQCOM,VkSurfaceCapabilities2EXT,VkSurfaceCapabilitiesKHR,VkSwapchainCreateInfoKHR- See Also:
-
VK_PRESENT_MODE_IMMEDIATE_KHR
public static final int VK_PRESENT_MODE_IMMEDIATE_KHRVkPresentModeKHR - Presentation mode supported for a surfaceDescription
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.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 reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.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.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.PRESENT_MODE_FIFO_LATEST_READY_EXTspecifies 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. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If usingVK_GOOGLE_display_timingto provide a target present time, the presentation engine will check the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine will dequeue the image and check the next one. The image of the last dequeued request will be presented. The other dequeued requests will be dropped.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.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
VkImageUsageFlagBitsof 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:Presentable Image Usage Queries
Presentation mode Image usage flags PRESENT_MODE_IMMEDIATE_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_MAILBOX_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_RELAXED_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_LATEST_READY_EXTVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_SHARED_DEMAND_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsNote
For reference, the mode indicated by
PRESENT_MODE_FIFO_KHRis equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated byPRESENT_MODE_FIFO_RELAXED_KHRis 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
VkLatencySurfaceCapabilitiesNV,VkSurfacePresentModeCompatibilityEXT,VkSurfacePresentModeEXT,VkSwapchainCreateInfoKHR,VkSwapchainPresentModeInfoEXT,VkSwapchainPresentModesCreateInfoEXT,GetPhysicalDeviceSurfacePresentModes2EXT,GetPhysicalDeviceSurfacePresentModesKHR- See Also:
-
VK_PRESENT_MODE_MAILBOX_KHR
public static final int VK_PRESENT_MODE_MAILBOX_KHRVkPresentModeKHR - Presentation mode supported for a surfaceDescription
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.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 reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.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.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.PRESENT_MODE_FIFO_LATEST_READY_EXTspecifies 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. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If usingVK_GOOGLE_display_timingto provide a target present time, the presentation engine will check the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine will dequeue the image and check the next one. The image of the last dequeued request will be presented. The other dequeued requests will be dropped.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.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
VkImageUsageFlagBitsof 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:Presentable Image Usage Queries
Presentation mode Image usage flags PRESENT_MODE_IMMEDIATE_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_MAILBOX_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_RELAXED_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_LATEST_READY_EXTVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_SHARED_DEMAND_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsNote
For reference, the mode indicated by
PRESENT_MODE_FIFO_KHRis equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated byPRESENT_MODE_FIFO_RELAXED_KHRis 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
VkLatencySurfaceCapabilitiesNV,VkSurfacePresentModeCompatibilityEXT,VkSurfacePresentModeEXT,VkSwapchainCreateInfoKHR,VkSwapchainPresentModeInfoEXT,VkSwapchainPresentModesCreateInfoEXT,GetPhysicalDeviceSurfacePresentModes2EXT,GetPhysicalDeviceSurfacePresentModesKHR- See Also:
-
VK_PRESENT_MODE_FIFO_KHR
public static final int VK_PRESENT_MODE_FIFO_KHRVkPresentModeKHR - Presentation mode supported for a surfaceDescription
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.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 reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.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.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.PRESENT_MODE_FIFO_LATEST_READY_EXTspecifies 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. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If usingVK_GOOGLE_display_timingto provide a target present time, the presentation engine will check the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine will dequeue the image and check the next one. The image of the last dequeued request will be presented. The other dequeued requests will be dropped.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.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
VkImageUsageFlagBitsof 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:Presentable Image Usage Queries
Presentation mode Image usage flags PRESENT_MODE_IMMEDIATE_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_MAILBOX_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_RELAXED_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_LATEST_READY_EXTVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_SHARED_DEMAND_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsNote
For reference, the mode indicated by
PRESENT_MODE_FIFO_KHRis equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated byPRESENT_MODE_FIFO_RELAXED_KHRis 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
VkLatencySurfaceCapabilitiesNV,VkSurfacePresentModeCompatibilityEXT,VkSurfacePresentModeEXT,VkSwapchainCreateInfoKHR,VkSwapchainPresentModeInfoEXT,VkSwapchainPresentModesCreateInfoEXT,GetPhysicalDeviceSurfacePresentModes2EXT,GetPhysicalDeviceSurfacePresentModesKHR- See Also:
-
VK_PRESENT_MODE_FIFO_RELAXED_KHR
public static final int VK_PRESENT_MODE_FIFO_RELAXED_KHRVkPresentModeKHR - Presentation mode supported for a surfaceDescription
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.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 reuse by the application. One request is removed from the queue and processed during each vertical blanking period in which the queue is non-empty.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.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.PRESENT_MODE_FIFO_LATEST_READY_EXTspecifies 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. At each vertical blanking period, the presentation engine dequeues all successive requests that are ready to be presented from the beginning of the queue. If usingVK_GOOGLE_display_timingto provide a target present time, the presentation engine will check the specified time for each image. If the target present time is less-than or equal-to the current time, the presentation engine will dequeue the image and check the next one. The image of the last dequeued request will be presented. The other dequeued requests will be dropped.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.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
VkImageUsageFlagBitsof 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:Presentable Image Usage Queries
Presentation mode Image usage flags PRESENT_MODE_IMMEDIATE_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_MAILBOX_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_RELAXED_KHRVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_FIFO_LATEST_READY_EXTVkSurfaceCapabilitiesKHR::supportedUsageFlagsPRESENT_MODE_SHARED_DEMAND_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHRVkSharedPresentSurfaceCapabilitiesKHR::sharedPresentSupportedUsageFlagsNote
For reference, the mode indicated by
PRESENT_MODE_FIFO_KHRis equivalent to the behavior of {wgl|glX|egl}SwapBuffers with a swap interval of 1, while the mode indicated byPRESENT_MODE_FIFO_RELAXED_KHRis 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
VkLatencySurfaceCapabilitiesNV,VkSurfacePresentModeCompatibilityEXT,VkSurfacePresentModeEXT,VkSwapchainCreateInfoKHR,VkSwapchainPresentModeInfoEXT,VkSwapchainPresentModesCreateInfoEXT,GetPhysicalDeviceSurfacePresentModes2EXT,GetPhysicalDeviceSurfacePresentModesKHR- See Also:
-
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
public static final int VK_COLOR_SPACE_SRGB_NONLINEAR_KHRVkColorSpaceKHR - Supported color space of the presentation engineDescription
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.
Note
In the initial release of the
VK_KHR_surfaceandVK_KHR_swapchainextensions, the tokenVK_COLORSPACE_SRGB_NONLINEAR_KHRwas 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_KHRis used instead for consistency with Vulkan naming rules. The older enum is still available for backwards compatibility.Note
In older versions of this extension
COLOR_SPACE_DISPLAY_P3_LINEAR_EXTwas misnamedVK_COLOR_SPACE_DCI_P3_LINEAR_EXT. This has been updated to indicate that it uses RGB color encoding, not XYZ. The old name is deprecated but is maintained for backwards compatibility.Note
In older versions of the
VK_EXT_swapchain_colorspaceextension,COLOR_SPACE_DOLBYVISION_EXTwas 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 deprecated but is maintained for backwards compatibility.Note
For a traditional “
Linear” or non-gamma transfer function color space useCOLOR_SPACE_PASS_THROUGH_EXT.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. Textures Output Format Conversion 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
VkColorSpaceKHRthat correspond to the following color spaces:Color Spaces and Attributes
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 The transfer functions are described in the “
Transfer Functions” chapter of the Khronos Data Format Specification.Except Display-P3 OETF, which is:
E = 1.055 × L1/2.4 - 0.055 for 0.0030186 ≤ L ≤ 1 12.92 × L for 0 ≤ L < 0.0030186where
Lis the linear value of a color component andEis the encoded value (as stored in the image in memory).Note
For most uses, the sRGB OETF is equivalent.
See Also
VkSurfaceFormatKHR,VkSwapchainCreateInfoKHREnum values:
- See Also:
-
VK_COLORSPACE_SRGB_NONLINEAR_KHR
public static final int VK_COLORSPACE_SRGB_NONLINEAR_KHRVkColorSpaceKHR - Supported color space of the presentation engineDescription
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.
Note
In the initial release of the
VK_KHR_surfaceandVK_KHR_swapchainextensions, the tokenVK_COLORSPACE_SRGB_NONLINEAR_KHRwas 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_KHRis used instead for consistency with Vulkan naming rules. The older enum is still available for backwards compatibility.Note
In older versions of this extension
COLOR_SPACE_DISPLAY_P3_LINEAR_EXTwas misnamedVK_COLOR_SPACE_DCI_P3_LINEAR_EXT. This has been updated to indicate that it uses RGB color encoding, not XYZ. The old name is deprecated but is maintained for backwards compatibility.Note
In older versions of the
VK_EXT_swapchain_colorspaceextension,COLOR_SPACE_DOLBYVISION_EXTwas 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 deprecated but is maintained for backwards compatibility.Note
For a traditional “
Linear” or non-gamma transfer function color space useCOLOR_SPACE_PASS_THROUGH_EXT.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. Textures Output Format Conversion 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
VkColorSpaceKHRthat correspond to the following color spaces:Color Spaces and Attributes
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 The transfer functions are described in the “
Transfer Functions” chapter of the Khronos Data Format Specification.Except Display-P3 OETF, which is:
E = 1.055 × L1/2.4 - 0.055 for 0.0030186 ≤ L ≤ 1 12.92 × L for 0 ≤ L < 0.0030186where
Lis the linear value of a color component andEis the encoded value (as stored in the image in memory).Note
For most uses, the sRGB OETF is equivalent.
See Also
VkSurfaceFormatKHR,VkSwapchainCreateInfoKHREnum values:
- See Also:
-
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
public static final int VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHRVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a deviceDescription
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
- See Also:
-
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR
public static final int VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHRVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a deviceDescription
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
- See Also:
-
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR
public static final int VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHRVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a deviceDescription
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
- See Also:
-
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
public static final int VK_COMPOSITE_ALPHA_INHERIT_BIT_KHRVkCompositeAlphaFlagBitsKHR - Alpha compositing modes supported on a deviceDescription
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
- See Also:
-
-
Method Details
-
nvkDestroySurfaceKHR
public static void nvkDestroySurfaceKHR(org.lwjgl.vulkan.VkInstance instance, long surface, long pAllocator) Unsafe version of:DestroySurfaceKHR -
vkDestroySurfaceKHR
public static void vkDestroySurfaceKHR(org.lwjgl.vulkan.VkInstance instance, long surface, @Nullable VkAllocationCallbacks pAllocator) Destroy a VkSurfaceKHR object.C Specification
To destroy a
VkSurfaceKHRobject, call:void vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator);Description
Destroying a
VkSurfaceKHRmerely 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 notNULL_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
- Parameters:
instance- the instance used to create the surface.surface- the surface to destroy.pAllocator- the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).
- All
-
nvkGetPhysicalDeviceSurfaceSupportKHR
public static int nvkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, long pSupported) Unsafe version of:GetPhysicalDeviceSurfaceSupportKHR -
vkGetPhysicalDeviceSurfaceSupportKHR
public static int vkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, IntBuffer pSupported) Query if presentation is supported.C Specification
To determine whether a queue family of a physical device supports presentation to a given surface, call:
VkResult vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported);Valid Usage
queueFamilyIndexmust be less thanpQueueFamilyPropertyCountreturned byvkGetPhysicalDeviceQueueFamilyPropertiesfor the givenphysicalDevice
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlesurfacemust be a validVkSurfaceKHRhandlepSupportedmust be a valid pointer to aVkBool32value- Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- On success, this command returns
- On failure, this command returns
-
nvkGetPhysicalDeviceSurfaceCapabilitiesKHR
public static int nvkGetPhysicalDeviceSurfaceCapabilitiesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pSurfaceCapabilities) Unsafe version of:GetPhysicalDeviceSurfaceCapabilitiesKHR -
vkGetPhysicalDeviceSurfaceCapabilitiesKHR
public static int vkGetPhysicalDeviceSurfaceCapabilitiesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, VkSurfaceCapabilitiesKHR pSurfaceCapabilities) Query surface capabilities.C Specification
To query the basic capabilities of a surface, needed in order to create a swapchain, call:
VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);Valid Usage
surfacemust be a validVkSurfaceKHRhandlesurfacemust be supported byphysicalDevice, as reported byGetPhysicalDeviceSurfaceSupportKHRor an equivalent platform-specific mechanism
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlesurfacemust be a validVkSurfaceKHRhandlepSurfaceCapabilitiesmust be a valid pointer to aVkSurfaceCapabilitiesKHRstructure- Both of
physicalDevice, andsurfacemust have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice- the physical device that will be associated with the swapchain to be created, as described forCreateSwapchainKHR.surface- the surface that will be associated with the swapchain.pSurfaceCapabilities- a pointer to aVkSurfaceCapabilitiesKHRstructure in which the capabilities are returned.
-
nvkGetPhysicalDeviceSurfaceFormatsKHR
public static int nvkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pSurfaceFormatCount, long pSurfaceFormats) Unsafe version of:GetPhysicalDeviceSurfaceFormatsKHR- Parameters:
pSurfaceFormatCount- a pointer to an integer related to the number of format pairs available or queried, as described below.
-
vkGetPhysicalDeviceSurfaceFormatsKHR
public static int vkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, IntBuffer pSurfaceFormatCount, @Nullable VkSurfaceFormatKHR.Buffer pSurfaceFormats) Query color formats supported by surface.C Specification
To query the supported swapchain format-color space pairs for a surface, call:
VkResult vkGetPhysicalDeviceSurfaceFormatsKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats);Description
If
pSurfaceFormatsisNULL, then the number of format pairs supported for the givensurfaceis returned inpSurfaceFormatCount. Otherwise,pSurfaceFormatCountmust point to a variable set by the application to the number of elements in thepSurfaceFormatsarray, and on return the variable is overwritten with the number of structures actually written topSurfaceFormats. If the value ofpSurfaceFormatCountis less than the number of format pairs supported, at mostpSurfaceFormatCountstructures will be written, andINCOMPLETEwill be returned instead ofSUCCESS, to indicate that not all the available format pairs were returned.The number of format pairs supported must be greater than or equal to 1.
pSurfaceFormatsmust not contain an entry whose value forformatisFORMAT_UNDEFINED.If
pSurfaceFormatsincludes an entry whose value forcolorSpaceisCOLOR_SPACE_SRGB_NONLINEAR_KHRand whose value forformatis a UNORM (or SRGB) format and the corresponding SRGB (or UNORM) format is a color renderable format forIMAGE_TILING_OPTIMAL, thenpSurfaceFormatsmust also contain an entry with the same value forcolorSpaceandformatequal to the corresponding SRGB (or UNORM) format.If the
VK_GOOGLE_surfaceless_queryextension is enabled, the values returned inpSurfaceFormatswill be identical for every valid surface created on this physical device, and sosurfacecan beNULL_HANDLE.Valid Usage
- If the
VK_GOOGLE_surfaceless_queryextension is not enabled,surfacemust be a validVkSurfaceKHRhandle - If
surfaceis notNULL_HANDLE,surfacemust be supported byphysicalDevice, as reported byGetPhysicalDeviceSurfaceSupportKHRor an equivalent platform-specific mechanism
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle- If
surfaceis notNULL_HANDLE,surfacemust be a validVkSurfaceKHRhandle pSurfaceFormatCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pSurfaceFormatCountis not 0, andpSurfaceFormatsis notNULL,pSurfaceFormatsmust be a valid pointer to an array ofpSurfaceFormatCountVkSurfaceFormatKHRstructures - Both of
physicalDevice, andsurfacethat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice- the physical device that will be associated with the swapchain to be created, as described forCreateSwapchainKHR.surface- the surface that will be associated with the swapchain.pSurfaceFormatCount- a pointer to an integer related to the number of format pairs available or queried, as described below.pSurfaceFormats- eitherNULLor a pointer to an array ofVkSurfaceFormatKHRstructures.
- If the
-
nvkGetPhysicalDeviceSurfacePresentModesKHR
public static int nvkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, long pPresentModeCount, long pPresentModes) Unsafe version of:GetPhysicalDeviceSurfacePresentModesKHR- Parameters:
pPresentModeCount- a pointer to an integer related to the number of presentation modes available or queried, as described below.
-
vkGetPhysicalDeviceSurfacePresentModesKHR
public static int vkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, IntBuffer pPresentModeCount, @Nullable IntBuffer pPresentModes) Query supported presentation modes.C Specification
To query the supported presentation modes for a surface, call:
VkResult vkGetPhysicalDeviceSurfacePresentModesKHR( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);Description
If
pPresentModesisNULL, then the number of presentation modes supported for the givensurfaceis returned inpPresentModeCount. Otherwise,pPresentModeCountmust point to a variable set by the application to the number of elements in thepPresentModesarray, and on return the variable is overwritten with the number of values actually written topPresentModes. If the value ofpPresentModeCountis less than the number of presentation modes supported, at mostpPresentModeCountvalues will be written, andINCOMPLETEwill be returned instead ofSUCCESS, to indicate that not all the available modes were returned.If the
VK_GOOGLE_surfaceless_queryextension is enabled andsurfaceisNULL_HANDLE, the values returned inpPresentModeswill only indicate support forPRESENT_MODE_FIFO_KHR,PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR, andPRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR. To query support for any other present mode, a valid handle must be provided insurface.Valid Usage
- If the
VK_GOOGLE_surfaceless_queryextension is not enabled,surfacemust be a validVkSurfaceKHRhandle - If
surfaceis notNULL_HANDLE,surfacemust be supported byphysicalDevice, as reported byGetPhysicalDeviceSurfaceSupportKHRor an equivalent platform-specific mechanism
Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandle- If
surfaceis notNULL_HANDLE,surfacemust be a validVkSurfaceKHRhandle pPresentModeCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pPresentModeCountis not 0, andpPresentModesis notNULL,pPresentModesmust be a valid pointer to an array ofpPresentModeCountVkPresentModeKHRvalues - Both of
physicalDevice, andsurfacethat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkInstance
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
physicalDevice- the physical device that will be associated with the swapchain to be created, as described forCreateSwapchainKHR.surface- the surface that will be associated with the swapchain.pPresentModeCount- a pointer to an integer related to the number of presentation modes available or queried, as described below.pPresentModes- eitherNULLor a pointer to an array ofVkPresentModeKHRvalues, indicating the supported presentation modes.
- If the
-
vkGetPhysicalDeviceSurfaceSupportKHR
public static int vkGetPhysicalDeviceSurfaceSupportKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int queueFamilyIndex, long surface, int[] pSupported) Array version of:GetPhysicalDeviceSurfaceSupportKHR -
vkGetPhysicalDeviceSurfaceFormatsKHR
public static int vkGetPhysicalDeviceSurfaceFormatsKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, int[] pSurfaceFormatCount, @Nullable VkSurfaceFormatKHR.Buffer pSurfaceFormats) Array version of:GetPhysicalDeviceSurfaceFormatsKHR -
vkGetPhysicalDeviceSurfacePresentModesKHR
public static int vkGetPhysicalDeviceSurfacePresentModesKHR(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, long surface, int[] pPresentModeCount, int @Nullable [] pPresentModes) Array version of:GetPhysicalDeviceSurfacePresentModesKHR
-