-
Notifications
You must be signed in to change notification settings - Fork 342
render/egl: initialize wlr_egl with EGL_PLATFORM_DEVICE_EXT #2671
Conversation
00bcbc9
to
cf0c923
Compare
Note, the Mesa MR that makes the device platform work is: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8638 |
cf0c923
to
9423ed1
Compare
9423ed1
to
6cfa332
Compare
6cfa332
to
a441ee5
Compare
Unfortunately this PR breaks split display/render devices. This happens because Mesa doesn't create an |
Want me to take a look at that issue? |
It's a tricky issue, I'm not sure what's the best way to fix it. I'd like to hear ideas from Mesa devs. |
I'll keep an eye on the issue then, let me know if I can do anything to help |
If we keep the GBM fallback, it should work fine. Unfortunately this means we can't get rid of GBM in the renderer yet. |
9423ed1
to
d729cbc
Compare
Alpine failure because of some python trouble |
d729cbc
to
3aa24f8
Compare
d729cbc
to
074e36d
Compare
a5ac54c
to
2f51cd9
Compare
The fix is finally in Mesa 21.1.0, I'll rebase the patch. |
We never create an EGL context with the platform set to something other than EGL_PLATFORM_GBM_KHR. Let's simplify wlr_egl_create by taking a DRM FD instead of a (platform, remote_display) tuple. This hides the internal details of creating an EGL context for a specific device. This will allow us to transparently use the device platform [1] when the time comes. [1]: swaywm#2671
67c2699
to
8000140
Compare
8000140
to
8f68093
Compare
8f68093
to
976d853
Compare
976d853
to
1bf356f
Compare
1bf356f
to
52fcef6
Compare
f2fb205
to
bcdae12
Compare
Uses the EXT_device_query extension to get the EGL device matching the requested DRM file descriptor. If the extension is not supported or no device is found, the EGL device will be retrieved using GBM. Depends on the EGL_EXT_device_enumeration to get the list of EGL devices.
bcdae12
to
7e1272f
Compare
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.
Thanks for your patience. This version LGTM!
This function relies on the extension EGL_WL_bind_wayland_display being present. If not, the creation of
wlr_egl
will fallback on using GBM.I see in the logs that the client extensions are being printed twice, would you prefer the fallback to be in
wlr_egl_create_from_drm_fd
rather than inwlr_renderer_autocreate_with_drm_fd
?I also I fixed an issue regarding
eglMakeCurrent
when processing the error,EGL_NO_DISPLAY
is not a valid display handle and will cause anEGL_BAD_DISPLAY
error.https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglMakeCurrent.xhtml
Fixes #2649