3 ms·
> Part one is modern clients render everything on the client, instead of the original design of X where clients more or less sent geometric things down the wire
by derefr 8y ago
> Part one is modern clients render everything on the client, instead of the original design of X where clients more or less sent geometric things down the wire
Ever since we've moved to the paradigm where window rendering and compositing happens on the GPU, I've been wondering whether the X11 protocol would make a comeback. After all, from the CPU's perspective, we're essentially doing what X11 does again: sending descriptions of geometry and texmaps to "somewhere else", where they're put together, and then referring to the elements we've sent by handles we got back from the "somewhere else." That somewhere else is the GPU.
In the case of combining GPU rendering with X11, we're doing a weird sort of dance (direct rendering) where—just in this one case—the X11 server allocates a GPU handle, and then we get an X11 handle wrapping the GPU handle, from which we can extract the GPU handle and reference it in GPU commands, with X11 being able to use the result as, essentially, an X11 texmap in the compositing process. (Wayland is the same, just with more efficient compositing and no other primitives than the DRI surface.)
But what if we went the other way: gave the X11 protocol primitives for all of the primitives that GPU drivers expose, such you X11 is essentially acting as a proxy for the GPU? So, instead of speaking to the GPU and getting GPU handles back, we'd be speaking to X11 and getting X11 handles back, which—on the X11 server side—would be toll-free-bridged to GPU handles?
You could take any code that makes OpenGL calls, and just switch out the DRI OpenGL driver for an X11Client OpenGL driver, and it would all suddenly be network-transparent (with not even that much overhead for the loopback case, because these are high-level commands streaming over the socket, not pixbufs.) An X11 "display server" would be made into, in effect, a network-transparent "virtual GPU." (Which, of course, you could also implement yourself in software—xvfb would handle X11GL messages just fine, doing internal Mesa software rendering in response.)
- toast0 8y agoI'm rather uninformed about the nuts and bolts of rendering: my dabbling in X includes getting things to more or less work as a user of an X desktop, with varying degrees of success since about 1997 but also a bit of wire protocol tweaking with ex11, an erlang x11 client protocol library, just enough so I could output images from an erlang program at 3 frames per second without the background color flashing I was getting with the wxWindow bindings. I debugged some crashes I was having, and added interfaces to set window titles and window dimensions via ICCCM standards. But, with that meager background, it sounds like you may be describing GLX? Originally, that supported OpenGL over the network, although later versions stopped working, because it was hard/nobody cared enough. Although, the spec says that GLX 1.4 only supports up to OpenGL 1.3; and my understanding is the newer versions of OpenGL are a lot easier to work with / better specified. And/or Vulkan is supposed to be cool? :)