2017-09-23 10:26:01 +02:00
|
|
|
#ifndef BACKEND_MULTI_H
|
|
|
|
|
#define BACKEND_MULTI_H
|
2017-06-12 22:22:40 -04:00
|
|
|
|
2018-02-12 21:29:23 +01:00
|
|
|
#include <wayland-util.h>
|
2017-06-12 22:22:40 -04:00
|
|
|
#include <wlr/backend/interface.h>
|
|
|
|
|
#include <wlr/backend/multi.h>
|
2022-07-27 16:07:21 -04:00
|
|
|
#include <wlr/render/allocator.h>
|
|
|
|
|
#include <wlr/render/wlr_renderer.h>
|
|
|
|
|
|
|
|
|
|
struct wlr_multi_gpu_device {
|
|
|
|
|
struct wlr_renderer *renderer;
|
|
|
|
|
struct wlr_allocator *allocator;
|
|
|
|
|
struct wl_list link;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Helper struct for tracking multiple renderers. This solves the
|
|
|
|
|
* problem of us having many renderers (primary, plus individual
|
|
|
|
|
* secondary GPU drm renderers) but not tracking them in one location.
|
|
|
|
|
* We can use this struct to access renderers for each GPU in
|
|
|
|
|
* the system all from one place. Will be populated by the renderer
|
|
|
|
|
* the compositor makes, plus every time a drm mgpu renderer is made.
|
|
|
|
|
*/
|
|
|
|
|
struct wlr_multi_gpu {
|
|
|
|
|
struct wl_list devices;
|
|
|
|
|
};
|
2017-06-12 22:22:40 -04:00
|
|
|
|
2017-08-12 11:43:36 -04:00
|
|
|
struct wlr_multi_backend {
|
|
|
|
|
struct wlr_backend backend;
|
|
|
|
|
|
2022-07-27 16:07:21 -04:00
|
|
|
struct wlr_multi_gpu *multi_gpu;
|
2017-10-14 22:55:45 +03:00
|
|
|
struct wl_list backends;
|
2017-12-20 05:54:41 -05:00
|
|
|
|
2023-11-23 14:11:23 +01:00
|
|
|
struct wl_listener event_loop_destroy;
|
2017-12-21 08:13:36 -05:00
|
|
|
|
2017-12-20 05:54:41 -05:00
|
|
|
struct {
|
|
|
|
|
struct wl_signal backend_add;
|
|
|
|
|
struct wl_signal backend_remove;
|
|
|
|
|
} events;
|
2017-06-12 22:22:40 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|