diff options
author | Keith Packard <[email protected]> | 2018-02-09 07:38:32 -0800 |
---|---|---|
committer | Keith Packard <[email protected]> | 2018-06-19 14:17:46 -0700 |
commit | 352d320a07458eb05e4929fdc1e0d1dbe1b07dda (patch) | |
tree | a6a1e8bc58ca7d4cb46df17762d634b8a1e7b022 /src/vulkan/wsi | |
parent | 451b58a51e9ffa0b2fbbe143ca47c3ee31ad2f58 (diff) |
vulkan: Add EXT_direct_mode_display [v2]
Add support for the EXT_direct_mode_display extension. This just
provides the vkReleaseDisplayEXT function.
v2:
Adopt Jason Ekstrand's coding conventions
Declare variables at first use, eliminate extra whitespace
between types and names. Wrap lines to 80 columns.
Suggested-by: Jason Ekstrand <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r-- | src/vulkan/wsi/wsi_common_display.c | 18 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_display.h | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index fd2a4ad9930..d9569981ab5 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -1475,3 +1475,21 @@ wsi_display_finish_wsi(struct wsi_device *wsi_device, vk_free(alloc, wsi); } } + +/* + * Implement vkReleaseDisplay + */ +VkResult +wsi_release_display(VkPhysicalDevice physical_device, + struct wsi_device *wsi_device, + VkDisplayKHR display) +{ + struct wsi_display *wsi = + (struct wsi_display *) wsi_device->wsi[VK_ICD_WSI_PLATFORM_DISPLAY]; + + if (wsi->fd >= 0) { + close(wsi->fd); + wsi->fd = -1; + } + return VK_SUCCESS; +} diff --git a/src/vulkan/wsi/wsi_common_display.h b/src/vulkan/wsi/wsi_common_display.h index 9ca1fa6be86..f1e53484bac 100644 --- a/src/vulkan/wsi/wsi_common_display.h +++ b/src/vulkan/wsi/wsi_common_display.h @@ -82,4 +82,9 @@ wsi_create_display_surface(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR *pCreateInfo, VkSurfaceKHR *pSurface); +VkResult +wsi_release_display(VkPhysicalDevice physical_device, + struct wsi_device *wsi_device, + VkDisplayKHR display); + #endif |