mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
Add workaround for hardware cursors on nouveau
This commit is contained in:
parent
bc048b22fb
commit
26a9fa8148
1 changed files with 9 additions and 0 deletions
|
@ -729,6 +729,15 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
||||||
bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back);
|
bo = copy_drm_surface_mgpu(&plane->mgpu_surf, plane->surf.back);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bo) {
|
||||||
|
// workaround for nouveau
|
||||||
|
// Buffers created with GBM_BO_USER_LINEAR are placed in NOUVEAU_GEM_DOMAIN_GART.
|
||||||
|
// When the bo is attached to the cursor plane it is moved to NOUVEAU_GEM_DOMAIN_VRAM.
|
||||||
|
// However, this does not wait for the render operations to complete, leaving an empty surface.
|
||||||
|
// see https://bugs.freedesktop.org/show_bug.cgi?id=109631
|
||||||
|
// The render operations can be waited for using:
|
||||||
|
glFinish();
|
||||||
|
}
|
||||||
bool ok = drm->iface->crtc_set_cursor(drm, crtc, bo);
|
bool ok = drm->iface->crtc_set_cursor(drm, crtc, bo);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
wlr_output_update_needs_swap(output);
|
wlr_output_update_needs_swap(output);
|
||||||
|
|
Loading…
Reference in a new issue