Renderer v6, incremental version
This is an alternative to https://github.com/swaywm/wlroots/pull/1355. Instead of re-working the whole API, this PR just uses the new infrastructure inside the DRM backend.
The DRM backend used EGLSurface
and gbm_surface
until now. Stop using them and switch to wlr_allocator
and wlr_swapchain
. These new interfaces are mostly copied over from glider.
This PR doesn't break the wlroots API. For now the new APIs are not exposed in public header, once we add APIs that allow compositors to use it directly, we can easily move the headers to the public dir.
TODO:
-
Fix flip & 180 degree rotation -
Damage tracking support (buffer age) -
Multi-GPU -
Debug EGL_BAD_PARAMETER
failures when callingeglDestroyImageKHR
on shutdown -
Make sure screencopy + export-dmabuf work fine -
Testing -
Investigate glClear issue in iris: https://github.com/swaywm/wlroots/pull/2240#issuecomment-673517061 (upstream bug, fix, workaround: INTEL_DEBUG=nofc
orMESA_LOADER_DRIVER_OVERRIDE=i965
) -
Investigate crashes when switching resolution: https://github.com/swaywm/wlroots/pull/2240#issuecomment-674381722 -
Fix inverted captured rect with screencopy
-
References: https://github.com/swaywm/wlroots/issues/1352
Breaking changes: some implicit assumptions about wlr_renderer
's EGL context no longer hold true. Compositors not using EGL directly shouldn't be affected.
- wlroots' framebuffer no longer is the EGL default framebuffer
- wlroots' framebuffer no longer has a depth attachment