[Mesa-dev] [PATCH mesa 04/21] vulkan: Add EXT_direct_mode_display
Keith Packard
keithp at keithp.com
Tue Jun 12 04:32:08 UTC 2018
Jason Ekstrand <jason at jlekstrand.net> writes:
> 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.
You want to share the master_fd passed in at init_wsi time among all
VkDisplayKHR objects, so you need to leave that FD in the global
structure. However, you're right that when you use
EXT_acquire_xlib_display, then you get a separate master_fd for each DRM
output and need to have one per display.
However, extending this code to support multiple master FDs looks tricky
-- in the case where you have a single master_fd, then enumerating the
DRM resources for that gives you all of the available
connectors. However, if you have one DRM master per connector, then you
need to enumerate each independently to get the complete set of
available resources. For APIs which don't explicitly include a
connector, I would have to go find a suitable master FD for each
resource.
How about I just disallow multiple leases for now? If you want multiple
outputs, I think you'd want them on the same DRM master anyways, and we
could get that by creating a new extension which had the application
pass in a DRM master that had all of the resources you want to access.
/* XXX no support for multiple leases yet */
if (wsi->fd >= 0)
return VK_ERROR_OUT_OF_DATE_KHR;
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180611/52c7412b/attachment.sig>
More information about the mesa-dev
mailing list