-
-
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_KHR_platform_gbm
(but not EGL_MESA_platform_gbm
) client extension present on EGL 1.4
#1708
Comments
Hmm, this is in RawDisplayHandle::Gbm(handle) if extensions.contains("EGL_KHR_platform_gbm") => {
(egl::PLATFORM_GBM_KHR, handle.gbm_device.as_ptr())
}, Differently put: Could you try to see why that didn't work? |
@fluolite can you clarify what the issue is? You provided a list of extensions including Specifically, can you clarify if you actually have a |
@fluolite is using Slint IIRC and there we do create a |
The get_platform_display did not matched! |
I didn't use it directly but use slint ui, and slint backend is linuxkms-skia-opengl. |
Thanks @tronical, I see no way how I should have inferred that from @fluolite's minimal description 😅. @fluolite please share snippets of code in backticks instead of screenshots, they are unnecessarily hard to read and digest. Please debug-print the value of EDIT: Not to mention, @tronical is correct here that glutin/glutin/src/api/egl/display.rs Lines 365 to 366 in 76dac27
We should instead debug why |
This is the debug output.
|
Thanks! In your glutin/glutin/src/api/egl/display.rs Lines 506 to 513 in d8e7569
Is scenario 2 working for you? I'm curious if |
|
So that's a broken EGL driver, if it advertises EGL 1.4 but also |
AFAIK this is in the context of a Rockchip RK3568 with a Mali-G52 GPU. That's not too exotic. Would you be open to a workaround in glutin? I think @fluolite is correct in his observation that Qt treats |
That doesn't use the Mesa driver stack, right? I found that it should expose both The commit that added the https://gitlab.freedesktop.org/mesa/mesa/-/commit/a3fb064e000a8706319dc996788159bf84a13f0f Neither of which is the case here, again detailing that this driver should've exposed I'm not the one to sign off on having workarounds in And as detailed above, while the value of Maybe if you link the Qt source code (which would anyway be useful when referencing something...) that does this, we could reverse-search whether that followed up with an upstream report and justification of this workaround. |
EGL_KHR_platform_gbm
(but not EGL_MESA_platform_gbm
) client extension present on EGL 1.4
I'm trying to come up with a title that is more descriptive about the actual issue at hand, since |
Note that I am now reading from https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/251#note_2553412:
Not that that changes much. While we can't say from the result of |
Given that they are all the same and that EGLDisplay is the same no matter which path you take, it'll probably be fine to workaround here. And yes, @fluolite I'd assume that diff --git a/glutin/src/api/egl/display.rs b/glutin/src/api/egl/display.rs
index 4c2454d..ffe7cb0 100644
--- a/glutin/src/api/egl/display.rs
+++ b/glutin/src/api/egl/display.rs
@@ -362,7 +362,10 @@ impl Display {
handle.connection.map_or(egl::DEFAULT_DISPLAY as *mut _, |c| c.as_ptr()),
)
},
- RawDisplayHandle::Gbm(handle) if extensions.contains("EGL_MESA_platform_gbm") => {
+ RawDisplayHandle::Gbm(handle)
+ if extensions.contains("EGL_MESA_platform_gbm")
+ || extensions.contains("EGL_KHR_platform_gbm") =>
+ {
(egl::PLATFORM_GBM_MESA, handle.gbm_device.as_ptr())
},
RawDisplayHandle::Drm(_) => {
works? |
I generally don't mind working around stuff like that, since usually nothing can be done in some cases other than that, and it's not like we can fail here, since if Though, a link with justification for stuff like that would be nice. |
These are the two places I was looking at earlier: https://github.com/qt/qtbase/blob/b429da48bed8cfa58f361ae85503c412919c3dd6/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp#L41 |
Hm, just to make it clear, does creating surface actually work with EXT function here? Or you'd need a KHR as well for it, if that's the case it could be a bit more weird? |
@kchibisov it seems yes, per the answer to my question 2 here. (After all the enum value is the same, and the underlying function implementation likely behaves the same, even it the combination of extension version and "inferred EGL client version" is wrong) |
Some EGL drivers report the KHR extension with EGL 1.4, which doesn't make any sense, however given that the constant for MESA and KHR is the same, we can check for KHR in MESA branch, but still use the Ext functions. Fixes #1708.
One can try this #1716 , from what I've understood in QT code it should be enough... |
Some EGL drivers report the KHR extension with EGL 1.4, which doesn't make any sense, however given that the constant for MESA and KHR is the same, we can check for KHR in MESA branch, but still use the Ext functions. Fixes rust-windowing#1708.
Some EGL drivers report the KHR extension with EGL 1.4, which doesn't make any sense, however given that the constant for MESA and KHR is the same, we can check for KHR in MESA branch, but still use the Ext functions. Fixes #1708.
In my project, get_platform_display_ext get failed because egl client extensions mismatch。
The text was updated successfully, but these errors were encountered: