WebKit failing to find GLXFBConfig, confusion around fbconfigs + swrast

Daniel Drake drake at endlessm.com
Mon Sep 10 07:59:58 UTC 2018


On Fri, Sep 7, 2018 at 7:05 AM, Jasper St. Pierre <jstpierre at mecheye.net> wrote:
> So this is a fun question and took me a day or two of random spelunking.
> Let's start with the last question, since it gives us a good starting point:
> why are the PCI IDs necessary?
>
> The answer is "DRI2 needs to figure out the driver to load if the user
> doesn't pass it into DRI2Connect".
> https://gitlab.freedesktop.org/xorg/xserver/blob/master/hw/xfree86/dri2/dri2.c#L1440

Thanks Jasper. Highly informative as usual!

> Let's now ask and answer two more follow-up questions: 1. Why is the server
> using DRI2, 2. Why does the server need the driver name, and 3. Why doesn't
> mesa pass the driver name along?
>
> My best guess for why DRI2 is being used is that xf86-video-intel turns it
> off by default, because ickle didn't like the implicit synchronization that
> DRI3 had and refused to fix some bugs in it. So if you load
> xf86-video-intel, unless you configure it to turn on DRI3, you get DRI2.
> Yay.
>
> As for why mesa doesn't pass the driver name along, the answer just is that
> it doesn't. Maybe it should?
> https://github.com/mesa3d/mesa/blob/bd963f84302adb563136712c371023f15dadbea7/src/glx/dri2_glx.c#L1196
>
> DRI3 works a bit differently -- an FD is passed to the X server by mesa, and
> the DDX figures out how to interpret that FD. The full flow in rootless X is
> that logind picks an FD, passes that to the X server, and then the DDX
> driver (likely -modesetting) calls drmGetDeviceNameFromFd2, and all the
> logic is encapsulated in libdrm and mesa. But the generic DRI2 doesn't have
> an FD, really, so you have to get something.

I really appreciate all the info and explanations. This part (pass
driver name and/or switch to DRI3) looks like it may be the most
easily actionable improvement that could be made, I'll look into it as
time permits.

Daniel


More information about the xorg-devel mailing list