backend/drm: Fix hardware cursors when rendering to linear is not available

GPUs such as NVIDIA and VmWare do not support rendering to a linear
buffer, but require linear cursor buffers. This means we have to
render to some other format, and then convert it ourselves.

This change advertises any render format as an available cursor format.
This commit is contained in:
Austin Shafer 2024-02-05 16:04:56 -05:00
parent 5a2e98e6c2
commit 02cf478581
4 changed files with 134 additions and 16 deletions

View file

@ -33,6 +33,8 @@ void finish_drm_surface(struct wlr_drm_surface *surf);
struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
struct wlr_buffer *buffer);
struct wlr_buffer *drm_cursor_copy(struct wlr_drm_surface *surf,
struct wlr_drm_renderer *parent_renderer, struct wlr_buffer *buffer);
bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
struct wlr_drm_format *fmt, struct wlr_drm_renderer *renderer);