<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 7, 2018 at 11:25 PM, Keith Packard <span dir="ltr"><<a href="mailto:keithp@keithp.com" target="_blank">keithp@keithp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Add support for the EXT_direct_mode_display extension. This just<br>
provides the vkReleaseDisplayEXT function.<br>
<br>
Signed-off-by: Keith Packard <<a href="mailto:keithp@keithp.com">keithp@keithp.com</a>><br>
---<br>
 src/vulkan/wsi/wsi_common_<wbr>display.c | 17 +++++++++++++++++<br>
 src/vulkan/wsi/wsi_common_<wbr>display.h |  5 +++++<br>
 2 files changed, 22 insertions(+)<br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>display.c b/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
index be31043f3de..45626541022 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
@@ -1399,3 +1399,20 @@ wsi_display_finish_wsi(struct wsi_device *wsi_device,<br>
       vk_free(alloc, wsi);<br>
    }<br>
 }<br>
+<br>
+/*<br>
+ * Implement vkReleaseDisplay<br>
+ */<br>
+VkResult<br>
+wsi_release_display(<wbr>VkPhysicalDevice            physical_device,<br>
+                    struct wsi_device           *wsi_device,<br>
+                    VkDisplayKHR                display)<br>
+{<br>
+   struct wsi_display           *wsi = (struct wsi_display *) wsi_device->wsi[VK_ICD_WSI_<wbr>PLATFORM_DISPLAY];<br>
+<br>
+   if (wsi->fd >= 0) {<br>
+      close(wsi->fd);<br>
+      wsi->fd = -1;<br></blockquote><div><br></div><div>This seems a bit odd.  Why is the FD not stored in the display?  What if you acquire multiple displays for two-player VR?  If the master FD passed in is not -1, we could just create a VkDisplayKHR object containing it.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+   }<br>
+   return VK_SUCCESS;<br>
+}<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>display.h b/src/vulkan/wsi/wsi_common_<wbr>display.h<br>
index b414a226293..5fbb6925e4a 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>display.h<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>display.h<br>
@@ -69,4 +69,9 @@ wsi_create_display_surface(<wbr>VkInstance instance,<br>
                            const VkDisplaySurfaceCreateInfoKHR *pCreateInfo,<br>
                            VkSurfaceKHR *pSurface);<br>
<br>
+VkResult<br>
+wsi_release_display(<wbr>VkPhysicalDevice            physical_device,<br>
+                    struct wsi_device           *wsi_device,<br>
+                    VkDisplayKHR                display);<br>
+<br>
 #endif<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.16.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>