backends/drm: Support hardware cursors on NVidia GPUs
This change enables the use of HW cursors on Nvidia GPUs. The problem with the current approach is that the cursor plane requires a linear buffer to be attached on the Nvidia hardware. However, Nvidia GPUs cannot render to a linear texture, this is why DRM_FORMAT_MOD_LINEAR is marked as "external only" when the supported modifiers are queried by eglQueryDmaBufModifiersEXT(). Since the EGL render backend in KWin cannot find a common DRM format modifier between what the cursor plane needs and what the GPU can render to, it falls back to the SW cursor implementation. With this change, when the EGL renderer detects that a plane only supports linear buffers but rendering directly to a linear buffer is not possible, it copies the rendered content into a linear dumb buffer, and attaches that buffer to the plane instead of using the rendered buffer directly.
Please register or sign in to comment