My system is FreeBSD 11-RELEASE (amd64) and after update xserver to 1.84 I got an error related to libGL. For example if I run glxinfo I got: libGL error: Version 7 or imageFromFds image extension not found libGL error: failed to load driver: r600 display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.4 I found online that reinstall libGL, libEGL and libglesvg2 solved the problem. I did and I also reboot computer but the problem is still here. My graphics card: vendor='Advanced Micro Devices, Inc. [AMD/ATI] device="RV770/MP8L [Mobility Radeon HD 4850}' Thank you.
A web search shows that the error message comes from https://cgit.freedesktop.org/mesa/mesa/tree/src/glx/dri3_glx.c#n847 AFAIK, FreeBSD doesn't actually support DRI3 yet. Fortunately, there's an option to turn it off, see radeon(4). $ cat /usr/local/etc/X11/xorg.conf.d/dri.conf Section "Device" Identifier "foobar radeon" Driver "radeon" Option "DRI" "2" EndSection $ That works for my card (Radeon HD 6450).
(In reply to wjenkner from comment #1) DRI3 was support was enabled in ports to allow those on drm-next to try it. The error message simply means that DRI3 failed, which is expected on stock FreeBSD, but the driver did not fail to load as stated and should in fact be operating with DRI2. Do you notice any difference when adding Option "DRI" "2" to your xorg.conf? I have not noticed any ill affect of letting the radeon driver fall back to DRI2 on its own.
Created attachment 180940 [details] disable dri3 in mesa ports
I hit the same problem and fixed it using the attached patch as I didn't want to have xorg.conf around. With the patch applied, I rebuilt all ports that come from mesa (dri, gbm, libglapi, libGL, libEGL, libgles2). Without the patch I got the errors described by the initial reporter. Despite the errors, glxinfo showed the correct renderer info (JUNIPER for my 5770), but OpenGL apps did not work correctly. With the patch no errors, no xorg.conf and everything seems to work.
If drm-next testers are too lazy to enable dri3 by hand, how about adding it as a non-default option to the mesa ports?
(In reply to holindho from comment #4) Again, the error only means that DRI3 init failed and it will continue on with DRI2, so the output of glxinfo should be the same. I could easily make DRI3 an option if need be. I've tried a couple DEs and half a dozen games without problems, but maybe not any of the applications you are using. Which OpenGL applications are working incorrectly and how? Please be specific (port versions, logs, etc).
(In reply to Matthew Rezny from comment #6) Sorry I can't be more specific, but I've already fought thru dozens problems and had to touch kernel and user-space library code just to get a working FreeBSD system (compared to OS X that "just works" or Linux that's very close to "just working"), so I kind of got frustrated at having to fix so many things and didn't keep a detailed log of all of the stuff I did anymore (yeah, yeah, logic fails here). Anyway, I'm 100% that mpv with opengl output failed when I didn't have dri2 forced and the mesa libs were still built with dri3. It did not display anything and when I tried to fullscreen it, it messed up the whole display. I'm not using any compositing DE (WindowMaker). I don't remember if mpv spewed any additional error information compared to the ones already mentioned. Other programs I used for testing were usually glxgears and kodi. If there's a handy one-liner to rebuild/reinstall/clean all mesa libs I can re-test.
(In reply to holindho from comment #7) Generally more info is always better, but in this case just knowing mpv will exhibit the issue was sufficient. I installed mpv and did some quick experimentation. Results: mpv video.mp4 -> window never draws (initial underlying content is stuck) mpv --opengl-backend=x11 video.mp4 -> video plays correctly mpv --opengl-backend=x11probe video.mp4 -> video plays correctly mpv --opengl-backend=x11egl video.mp4 -> window never draws So, OpenGL works fine, the issue is with EGL. I may not have tried anything using EGL after turning on DRI3, games are using GLX or SDL. The output from eglinfo looks ok but both eglgears_x11 and egltri_x11 dump core. I will investigate this issue.
The issue with EGL has been addressed by hiding DRI3 behind a runtime switch. Support for DRI3 is remains enabled at build time, but now will not be used unless LIBGL_DRI3_ENABLE is set in the environment.