Wayland For Very Large Wall of Screens
Daniel Stone
daniel at fooishbar.org
Tue Sep 30 10:15:22 PDT 2014
Hi,
On 30 September 2014 16:44, Jasper St. Pierre <jstpierre at mecheye.net> wrote:
> It's a great question, with a complicated answer. Part of this is the
> fault of the DRM kernel interface, which is being improved. Part of it is
> the fault of GL/EGL, which really doesn't have proper multi-GPU support.
>
EGL_EXT_device_base is one way to handle this, although we're still missing
API for the application to determine which GPU it should render on.
Assuming proper cross-GPU support, then it should just work regardless,
although with the penalty of a cross-GPU transfer/blit/stall.
> GL/EGL on DRM devices can only be booted up on one card at a time due to
> the way the interface works. I'm not sure if there's any plans to change
> this. (It's possible to create multiple EGLDisplays and switch between them
> to render, but this is really ridiculous, and EGL_WL_bind_display won't
> work with that). That means that you're left with software rendering. Which
> is totally possible to do, but Weston still doesn't support that.
>
Well yes, you do need to create multiple EGLDisplays. How else are you
going to deal with disjoint extensions / configs / shader compilers, let
alone figure out where to dispatch the drawing? EGL itself is a bit
culpable here though, because without the mooted NVIDIA vendor-independent
dispatch layer, you're going to require the same stack (Mesa, NVIDIA, Mali,
whatever) on both GPUs.
BindWaylandDisplay is fine in theory: you create one EGLDisplay for each
GPU you have, and then attach them all to the same wl_display. In practice,
Mesa dies hard if you have two wl_drm instances attached to the same
display, and reasonably enough. This is an implementation issue though.
I think the answer is going to look something like this:
- implement EGL_EXT_device_base inside Mesa
- work out the EGL/GL/GLES/CL dispatch problem (when I call
glCompileShader, which shader compiler does it go to?)
- fix client-side-Mesa's buggy/non-existent handling of a wl_display with
multiple EGLDisplays bound
- add infrastructure to Weston to work out which GPU should render which
output, possibly involving multiple gbm instances
- work out the gbm dispatch problem, which I think basically means
minigbm (and switching to EGL_KHR_surfaceless_context + GL_OES_sl_c)
- add Wayland protocol to hint clients as to which GPU they should use
- extend EGL_EXT_platform_wayland (or platform_base ... ?) to allow
specification of a device (from device_base) to use when creating a display
- solve cross-device format issues once and for all (tiling, compression,
etc), which I'm increasingly thinking has to be in the kernel
tl;dr: entirely solvable with Wayland, but a lot of infrastructure required
in EGL/gbm/kernel
Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140930/30c30ef2/attachment.html>
More information about the wayland-devel
mailing list