Closed Molytho closed 8 months ago
Thanks for the patch! Note, however, that we already bind the zwp_linux_dmabuf_v1
protocol and retrieve the default feedback during wlEglInitializeHook
. So we shouldn't need to do it a second time.
I do think it's a good idea to use zwp_linux_dmabuf_v1
to determine the compositor device instead of wl_drm
when possible. If you could modify the patch to keep that part but use the existing WlEglDisplay::defaultFeedback
I would be happy to merge it.
I changed the code to bind to zwp_linux_dmabuf_v1 only once. I also added some error handling to getServerProtocolsInfo. Sadly this made it more ugly
Thanks. This looks good to me. I just need to get a +1 from another NVIDIA engineer and then I will merge it.
Compositors start dropping support for wl_drm because it is replaced by linux-dmabuf. See https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/2f2a55ebd3c5a950f1bf8c280edf0838721363da. Try reading compositors main device from linux-dmabuf v4 if supported and otherwise fallback to wl_drm.