aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-04 12:16:34 -0400
committerGitHub <noreply@github.com>2018-08-04 12:16:34 -0400
commite8fa25e0276e179015c8bcd70e857734cb32ab08 (patch)
tree9dc5c73a9b7b7c82998001b3c35d36b61671a58a /backend/drm/backend.c
parent23e2c3c75968f5b2905b761e6cfc7eedb3f8ce81 (diff)
parent1a2b3445dcd2c53fa5a1e315e436f5814c8765e6 (diff)
Merge pull request #1168 from manio/multi-gpu
Fix support for multiple GPU
Diffstat (limited to 'backend/drm/backend.c')
-rw-r--r--backend/drm/backend.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 5833d46e..1df5cdd1 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -51,7 +51,12 @@ static void backend_destroy(struct wlr_backend *backend) {
static struct wlr_renderer *backend_get_renderer(
struct wlr_backend *backend) {
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend;
- return drm->renderer.wlr_rend;
+
+ if (drm->parent) {
+ return drm->parent->renderer.wlr_rend;
+ } else {
+ return drm->renderer.wlr_rend;
+ }
}
static struct wlr_backend_impl backend_impl = {