-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow libopengl.so to be used when GLX_LIB is missing #257
Conversation
PTAL. Also, if you have a repro with one of the known downstream failures caused by #229, it would help to have someone test one of those cases. |
ping. |
@batesj Checked it on my libGL-free system - it works:
(spam about libGLX.so is caused by lack of check, which I had in one of my other patches)
But previous one worked for me, too, so, somebody with Xorg should also check... |
I've tested this extensively now in Chrome OS and confirmed that it works to enable the use of libOpenGL.so while not changing behavior of existing libGLX expectations. For example, confirmed that this libepoxy change does not break crostini apps when libopengl0 is installed. |
@ebassi ptal |
Let's see if the people having issues in #252 and #240 can test this: @Ernest1338 and @evelikov As an aside: there's no point in pinging me. I receive all bug mail for libepoxy. |
LGTM from code inspection, we didn't experience any known crashes on FreeBSD that I am aware of but just switched to libglvnd everywhere so would like to drop the direct GLX dependency. |
From a quick look libGL -> libOpenGL fallback sounds like the right thing to do. Thank you. I would suggest a couple of things:
Doubt I can test it at the moment @linkmauve - do you have some time to check this on your end? |
Does the test need to be in this pull request or can it be a followup? The nature of this change is at the level of attempting to open libGL.so.1 and libOpenGL.so.0 so a test could have have dummy libraries that confirm libGL.so.1 is loaded if it exists, and then fall back on libOpenGL.so.0. |
I'm on vacation at the moment, I will test this when I get home. |
I don't have a preference if tests come here or as follow-up. The test you outlined doesn't sound super useful. Tests which do functional testing, similar to the bugs #240 #252 and even #253 would be much more valuable. Mind you I did not trace each use-case, so it might be that they all follow the exact same problematic pattern. Note: the tests are a suggestion, ultimately it's not my call to make. |
Perhaps there's an easy github workflow that would repro some of the original integration bugs in #240, #252 and/or #253. There is some investigation to be done for that, so would prefer to not block this CL -- filed #258 for that. In the mean time this CL fixes the bug that @ya-isakov described in #229 (comment). To reiterate the motivation here: without this fix, it is impossible for a wayland-only system to use OpenGL via libepoxy. |
From the outside it seems like this is an acceptable workaround to an issue that is not very well understood. With my cursory inspection it seems to require non-trivial knowledge of how these handles are used everywhere (which might affect library-consumers?) and whether there are known or unknown limitations with libOpenGL in a GLX setup. Until the issue is better understood, it is difficult to prescribe a test plan, and the salient change is to preserve old known good behavior for GLX. This is probably obvious to most but I'll just write it here for completeness: libGL == libOpenGL + libGLX. |
Done. |
@batesj I'm aware how annoying libGL.so can be. In case it's unclear - I'm not suggesting we should block this MR. I did said "suggestion" and not "requirement" exactly for that reason ;-) |
Thanks for the review, @evelikov! |
This maintains compatibility with previous behavior of always using GLX_LIB if it is found. The only change is when there is no GLX_LIB. Previous behavior when no GLX_LIB: - abort. New behavior when no GLX_LIB: - Try to load libOpenGL.so as gl_handle (glx_handle remains NULL). - Else, abort. Reviewed-by: Emil Velikov <[email protected]>
So I tested this, and found no issues (related to Xorg at least). ;) |
Thanks for testing @Ernest1338, sounds like we can land this then. |
I agree. Thanks to everyone who tested this, it's very much appreciated. Thanks @batesj for working on this, as well. |
Thanks @ebassi, let me know when you think we can release version 1.5.9 with this change. |
This maintains compatibility with previous behavior of
always using GLX_LIB if it is found. The only change is
when there is no GLX_LIB.
Previous behavior when no GLX_LIB:
New behavior when no GLX_LIB: