aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-18 16:39:22 +0200
committerSimon Ser <contact@emersion.fr>2022-10-18 16:39:22 +0200
commitb475190327ee7109c01ee952f41fd17e93b12f76 (patch)
tree05e1b70158dcd499fdf203c6e83460940266fbc4 /backend/drm
parenta2063c93ea68e7c97cf60a4a36fe7fba2e1cbca6 (diff)
backend/drm: log failures in drm_surface_blit()
Can make issues like [1] easier to debug. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3451
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/renderer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 9e1de3d0..50be0a96 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -92,11 +92,13 @@ struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
struct wlr_texture *tex = wlr_texture_from_buffer(renderer, buffer);
if (tex == NULL) {
+ wlr_log(WLR_ERROR, "Failed to import source buffer into multi-GPU renderer");
return NULL;
}
struct wlr_buffer *dst = wlr_swapchain_acquire(surf->swapchain, NULL);
if (!dst) {
+ wlr_log(WLR_ERROR, "Failed to acquire multi-GPU swapchain buffer");
wlr_texture_destroy(tex);
return NULL;
}
@@ -106,6 +108,7 @@ struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
wlr_matrix_scale(mat, surf->swapchain->width, surf->swapchain->height);
if (!wlr_renderer_begin_with_buffer(renderer, dst)) {
+ wlr_log(WLR_ERROR, "Failed to bind multi-GPU destination buffer");
wlr_buffer_unlock(dst);
wlr_texture_destroy(tex);
return NULL;