glx: Use vnd layer for dispatch (v4)

Graphics / X.Org / X.Org Server - Adam Jackson [redhat.com] - 14 February 2018 22:04 EST

The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it.

Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID.

v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks.

v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman)

v4: Fix deletion of ghost contexts (Kyle Brenneman)

d8ec33fe0 glx: Use vnd layer for dispatch (v4)
configure.ac | 2 +-
glx/createcontext.c | 2 -
glx/glxcmds.c | 213 ++++++-------------------
glx/glxcmdsswap.c | 98 +-----------
glx/glxext.c | 341 +++++++++++++++++++++++++++++------------
glx/glxext.h | 4 +
glx/glxscreens.h | 1 +
glx/glxserver.h | 5 -
glx/xfont.c | 2 -
hw/kdrive/ephyr/ephyr.c | 2 +-
hw/kdrive/ephyr/meson.build | 1 +
hw/kdrive/src/kdrive.c | 3 +
hw/vfb/InitOutput.c | 2 +
hw/vfb/meson.build | 3 +-
hw/xfree86/Makefile.am | 5 +
hw/xfree86/common/xf86Init.c | 2 +-
hw/xfree86/dixmods/glxmodule.c | 1 +
hw/xfree86/meson.build | 1 +
hw/xquartz/darwin.c | 4 +-
hw/xwayland/Makefile.am | 1 +
hw/xwayland/meson.build | 1 +
hw/xwayland/xwayland.c | 2 +
include/glx_extinit.h | 5 +-
23 files changed, 326 insertions(+), 375 deletions(-)

Upstream: cgit.freedesktop.org


  • Share