From 009c3747a8771bcd441dc9cf95823fe40895f1e0 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sun, 1 Oct 2017 19:22:47 +1300 Subject: Multi-GPU DRM --- include/wlr/backend/drm.h | 2 +- include/wlr/render.h | 9 +++++++-- include/wlr/render/interface.h | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index fa63df0a..b3475703 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -6,7 +6,7 @@ #include struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, - struct wlr_session *session, int gpu_fd); + struct wlr_session *session, int gpu_fd, struct wlr_backend *parent); bool wlr_backend_is_drm(struct wlr_backend *backend); diff --git a/include/wlr/render.h b/include/wlr/render.h index 325f8c01..2fbfb476 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -2,6 +2,8 @@ #define WLR_RENDER_H #include +#include +#include #include #include @@ -93,8 +95,11 @@ bool wlr_texture_upload_shm(struct wlr_texture *tex, uint32_t format, * texture. The wl_resource is not used after this call. * Will fail (return false) if the given resource is no drm buffer. */ - bool wlr_texture_upload_drm(struct wlr_texture *tex, - struct wl_resource *drm_buffer); +bool wlr_texture_upload_drm(struct wlr_texture *tex, + struct wl_resource *drm_buffer); + +bool wlr_texture_upload_eglimage(struct wlr_texture *tex, + EGLImageKHR image, uint32_t width, uint32_t height); /** * Copies a rectangle of pixels from a wl_shm_buffer onto the texture. The diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h index e3ba0414..cbe33822 100644 --- a/include/wlr/render/interface.h +++ b/include/wlr/render/interface.h @@ -2,6 +2,8 @@ #define WLR_RENDER_INTERFACE_H #include +#include +#include #include #include #include @@ -45,6 +47,8 @@ struct wlr_texture_impl { int x, int y, int width, int height, struct wl_shm_buffer *shm); bool (*upload_drm)(struct wlr_texture *texture, struct wl_resource *drm_buf); + bool (*upload_eglimage)(struct wlr_texture *texture, EGLImageKHR image, + uint32_t width, uint32_t height); void (*get_matrix)(struct wlr_texture *state, float (*matrix)[16], const float (*projection)[16], int x, int y); void (*get_buffer_size)(struct wlr_texture *texture, -- cgit v1.2.3