-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GTK] Layout tests with ANGLE backend require to use GLX to make Xvfb and software rasterization work #4429
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
Conversation
EWS run on previous version of this PR (hash f3403d3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, it's OK for some things to be different in developer mode, but forcing GLX is pretty extreme. It means we'll have a different set of graphics bugs in developer mode than our users will encounter. And frankly, we have a lot of graphics bugs. This seems like too much: if developers get forced into a legacy graphics mode, we'll fail to notice bugs before users complain, and will have increased difficulty reproducing bugs that users report.
It's also moving backwards. GLX is a legacy technology, and I understand that nowadays using EGL instead of GLX is recommended even under X11, right?
Ideally, we'd stop using Xvfb for layout tests and use Weston instead, but I understand that would probably require a bunch of rebaselining.
I agree, but in this case we are choosing using GLX inside ANGLE because WebKit is already using GLX for rendering, that is the problem, we are using GLX already and ANGLE was forcing EGL backend, I mean we need to use GLX for ANGLE because tests were already using it. It is not that we are changing that.
Exactly I would love we stop using Xvfb but that is a different task, I don't think we should block bugs waiting for that. |
Are you sure that your changes are limited to the case where we are using GLX already? It doesn't look like they are?
|
So does this affect more than just layout tests? If not, I think the next step is: find another way to do what you need for layout tests without looking at |
Far-sighted solution would be to just remove GLX support throughout. |
Yeah, you are right, but this is the fallback class used when we do not have dmabuf support in a platform, we have it here just for the testing platforms, it is not something we want anyone to use because it copies memory. Currently layout tests is the first thing we want to use it until we solve the mess with EGL and nvidia drivers. Anyway, a good addition I can add is to add the same check we use to choose GLX in other classes in that case, it is not something we know it is there but it can be a good improvement, that way it can pick EGL or GLX because we know in developer mode we are going to compile it. I'll do the modification, but remember this is the fallback class for dmabuf support that is even causing a big warning because it is used for testing and making sure everyone knows we don't want you to use it. |
It affects any platform that does not support dmabuf, wants to use ANGLE and WebKit decides GLX is the way to go for all the GL rendering, this is not something we want applications to use. We don't know if there is going to be anyone using it like that in the future for testing purposes, because the fallback is not for production, so we don't think it makes sense to spend more effort trying to support this situation. At least for the moment. |
Since this is only a fallback that you don't want applications to ever wind up in, how about just making the changes unconditionally, instead of looking at |
We didn't want to compile GLX backend in the release versions for the gtk port because we just wanted to solve a problem with Xvfb testing, we would like to avoid that backend and remove GLX support at some point as Zan explained. I guess we can add it to GTK and avoid it in WPE, if that is something acceptable for everyone I'm ok with it. |
That sounds much better than varying graphics behavior based on |
… and software rasterization work https://bugs.webkit.org/show_bug.cgi?id=245288 Reviewed by NOBODY (OOPS!). Gtk layout tests are using Xvfb and software rasterization, this is detected and uses the X11 backends and GLX in WebKit, we need to make sure we have the GLX backend compiled for ANGLE and we use it in GTK for the GraphicsContextGLFallback class. That solves crashes in the Layout tests for WebGL with ANGLE. * Source/ThirdParty/ANGLE/CMakeLists.txt: Compile GLX backend when using gtk if x11 is enabled. * Source/ThirdParty/ANGLE/PlatformGTK.cmake: Add compilation options for x11, use platform types in that case. * Source/WebCore/platform/graphics/gbm/GraphicsContextGLFallback.cpp: (WebCore::GraphicsContextGLFallback::platformInitializeContext): In case of gtk and x11 enabled we configure the display to use the ANGLE GLX backend.
f3403d3
to
7edb066
Compare
EWS run on current version of this PR (hash 7edb066)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK thanks, this looks better.
I'll let graphics reviewers handle final review.
Thanks for your comments when reviewing the patch. |
I think this needs a solution in the form of removing GLX support. Until that can be done, I'm not the best to review such patches. |
After https://commits.webkit.org/254751@main this is not a problem anymore because we prefer EGL, so we go in the good directorion to remove GLX. I'm closing this PR. |
7edb066
7edb066
🛠 tv🛠 tv-sim🛠 watch🛠 watch-sim