Poor OpenGL performance under Xorg

Jan Beich jbeich at FreeBSD.org
Mon May 24 16:40:35 UTC 2021


Evgeniy Khramtsov via freebsd-x11 <freebsd-x11 at freebsd.org> writes:

>> While investigating Wayland performance for light gaming I've noticed an
>> anomaly with OpenGL under Xorg which doesn't translate to Vulkan under
>> Xorg or OpenGL under Xwayland. With DRI3 both Xwayland and Xorg should
>> be similar, especially in fullscreen when compositing is disabled.
>> 
>> See https://reviews.freebsd.org/P501
>> 
>> Is this a flaw in benchmark or GPU driver?
>
> Does it happen without libglvnd?

Yep, tested both in 12.2 jail and 14.0 host.

> My guess would be that libglvnd dlopen() or dlsym() the GL libs, while
> vulkan-loader might not be affected by what libglvnd does.

dlopen/dlsym are mainly called on GL init. "LD_DEBUG=1 glmark2" shows
very few relocations between demos, mostly outside of libGL such as
libpng.so for loading new textures.

> Does Xorg dlopen() libs?

Yes, when loading extensions (e.g., glx, glamoregl) and DDX drivers
(e.g, modesetting, xf86-video-intel, xf86-input-libinput).

I can't bisect: no known good state and no other systems to compare.


More information about the freebsd-x11 mailing list