glx: Delegate the core of glXGetScreenDriver to the GLX screen vtable
authorAdam Jackson <ajax@redhat.com>
Fri, 16 Oct 2020 21:18:18 +0000 (17:18 -0400)
committerAdam Jackson <ajax@redhat.com>
Wed, 21 Oct 2020 14:24:31 +0000 (10:24 -0400)
commitce8530d6c9292d5a0c82522e5fd05831403a9c70
tree6a8fd95d936eb9cdc7a42c8049a4a2982e90b23e
parent3bb7ebfc7504af0e85596f3ad4b72a2ede10d227
glx: Delegate the core of glXGetScreenDriver to the GLX screen vtable

This is a minor bugfix, in that the prior code required that the server
expose either XFree86-DRI or DRI2 to get the name; Xwayland exposed
neither, just DRI3. Now, for DRI2 and DRI3, we just ask the loader. It
also means we report "swrast" for the driver name when that's what we're
using, which is probably a good thing.

v2: Trust the driver name from the server for DRI2 (Michel Dänzer)

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7219>
src/glx/dri2_glx.c
src/glx/dri2_priv.h
src/glx/dri3_glx.c
src/glx/dri_glx.c
src/glx/drisw_glx.c
src/glx/glxclient.h