mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-06 13:29:45 -05:00
backend/drm: use modifiers for our GBM buffers
This commit is contained in:
parent
11bf87d678
commit
2bdd1d0896
3 changed files with 24 additions and 11 deletions
|
|
@ -680,22 +680,24 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
|||
ret = drmGetCap(drm->fd, DRM_CAP_CURSOR_HEIGHT, &h);
|
||||
h = ret ? 64 : h;
|
||||
|
||||
|
||||
if (!drm->parent) {
|
||||
if (!init_drm_surface(&plane->surf, &drm->renderer, w, h,
|
||||
drm->renderer.gbm_format, GBM_BO_USE_LINEAR | GBM_BO_USE_SCANOUT)) {
|
||||
drm->renderer.gbm_format, NULL,
|
||||
GBM_BO_USE_LINEAR | GBM_BO_USE_SCANOUT)) {
|
||||
wlr_log(WLR_ERROR, "Cannot allocate cursor resources");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!init_drm_surface(&plane->surf, &drm->parent->renderer, w, h,
|
||||
drm->parent->renderer.gbm_format, GBM_BO_USE_LINEAR)) {
|
||||
drm->parent->renderer.gbm_format, NULL,
|
||||
GBM_BO_USE_LINEAR)) {
|
||||
wlr_log(WLR_ERROR, "Cannot allocate cursor resources");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!init_drm_surface(&plane->mgpu_surf, &drm->renderer, w, h,
|
||||
drm->renderer.gbm_format, GBM_BO_USE_LINEAR | GBM_BO_USE_SCANOUT)) {
|
||||
drm->renderer.gbm_format, NULL,
|
||||
GBM_BO_USE_LINEAR | GBM_BO_USE_SCANOUT)) {
|
||||
wlr_log(WLR_ERROR, "Cannot allocate cursor resources");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue