-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
egl: use EGL_KHR_display_reference #1632
Conversation
49f9b96
to
ff69874
Compare
What's the reason of submitting my code again which you can't test? It's not like I'll use this over what I had, since I don't even understand what are you trying to do with your loops? |
First there are some notable changes in the drop/terminate path: it has to check the availability of EGL_KHR_display_reference against the client extensions and not the display extensions like it does in your version. Regarding the loop: Regarding the testing: |
But you've just renamed the variables, you still query extensions the way it was before and you still check things the way they were before, you just changed a name in the codebase.
Sounds like the bug should go upstream and not to glutin. Adding hacks like that means that no-one will ever fix it upstream, especially when nvidia is at play, since no-one will bother. I'd
Good, that means we have something to work with, but I'd suggest to leave review comments on original PR or at least, explain what you're trying to do when submitting patches which were waiting for their testing. It's not like I can't review your comments to fix stuff, and the In general, I'm fine with the renaming, but not fine with the loop and use of |
Also, if you haven't understood why I said that you haven't tested, it's because you have unchecked checkbox for 'testing stuff'. Which I have because mesa doesn't support this extension thus I can't test myself, but given that you can test and tested you should mark check it. |
That's not true: glutin/glutin/src/api/egl/display.rs Line 559 in ff69874
https://github.com/kchibisov/glutin/blob/b39853aaf68da3c9dbb14a2d69a8de7f22fe20e7/glutin/src/api/egl/display.rs#L548C74-L548C74 I use CLIENT_EXTENSIONS while you use self.client_extensions (renamed to self.display_extensions)
You misread that. You where using u32.
I can drop this part but to clarify: I think this is not the fault of nvidia neither do I think this is fixable upstream. The way egl dispatching currently work in combination with EGL_KHR_display_reference being a client extension just doesn't allow libglvnd to do something else except joining all client extensions supported by any vendor.
Sorry for that. I didn't check the box because I didn't test it on windows which might also be effected by this patch.
|
This part I know that it's wrong, the way you said it sounded like something more than that was wrong. I just hasn't bothered to fix, since after checking user's Also, maybe we can merge all the extensions together? Because
aye, sorry. I used that
I don't like the loop, but if there's no other way around it, I'd suggest to add the reference stuff in the end, and if adding them fails, just
Given that you're the one which can test you can continue with the patch. It was better initially to either comment or open a PR against my PR and ping me (github doesn't notify on forks by default). |
This resolves a past issue where glutin would not be able to terminate a display due to risk of two displays being created from the same native display. Besides not terminating EGL raises issue with nvidia on Wayland, thus the `api::egl::Display::terminate` is added to help clients call this function when calling `eglTerminate` is generally unsafe to do automatically when dropping the `Display`. Links: alacritty/alacritty#7146 Fixes: rust-windowing#1588
444f626
to
430627d
Compare
We could but I think this isn't a good idea. Client extensions and display extensions are intentionally kept apart by the spec as they do serve different purposes. Most client extensions are useless after display creation so it's just waste of space to store them together with the display extensions. |
It's not like it'll be more space, since it'll be the same space. But yeah, |
6a03553
to
556a4b5
Compare
libglvnd reports client extensions if at least one vendor supports them. This might lead to display creation failure when a vendor library reports support but fails to create a display for another reason (like when the nvidia egl implementation is installed but no nvidia card is available). To work around this issue retry creation without EGL_KHR_display_reference.
Thanks, I'd assume that we still need libglvnd update? |
Yes we do. I opened an issue upstream: |
This is a updated version of #1626 which intends to fix alacritty/alacritty#7146
CHANGELOG.md
if knowledge of this change could be valuable to users