mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 23:28:06 +02:00
loader/wayland: Add named queue fallback
If libwayland isn't new enough to create event queues with names, just throw away the name. It's just a debug feature anyway. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
This commit is contained in:
parent
4e219a22e2
commit
eb1235f343
3 changed files with 22 additions and 1 deletions
|
|
@ -2020,6 +2020,12 @@ if with_platform_wayland
|
|||
dependencies: dep_wayland_client)
|
||||
pre_args += ['-DHAVE_WL_DISPATCH_QUEUE_TIMEOUT']
|
||||
endif
|
||||
if cc.has_function(
|
||||
'wl_display_create_queue_with_name',
|
||||
prefix : '#include <wayland-client.h>',
|
||||
dependencies: dep_wayland_client)
|
||||
pre_args += ['-DHAVE_WL_CREATE_QUEUE_WITH_NAME']
|
||||
endif
|
||||
endif
|
||||
|
||||
dep_x11 = null_dep
|
||||
|
|
|
|||
|
|
@ -133,3 +133,11 @@ wl_display_dispatch_queue_timeout(struct wl_display *display,
|
|||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WL_CREATE_QUEUE_WITH_NAME
|
||||
struct wl_event_queue *
|
||||
wl_display_create_queue_with_name(struct wl_display *display, const char *name)
|
||||
{
|
||||
return wl_display_create_queue(display);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@
|
|||
#ifndef LOADER_WAYLAND_HELPER_HEADER_H
|
||||
#define LOADER_WAYLAND_HELPER_HEADER_H
|
||||
|
||||
#include <wayland-client.h>
|
||||
|
||||
#ifndef HAVE_WL_DISPATCH_QUEUE_TIMEOUT
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <util/timespec.h>
|
||||
int
|
||||
wl_display_dispatch_queue_timeout(struct wl_display *display,
|
||||
|
|
@ -33,4 +34,10 @@ wl_display_dispatch_queue_timeout(struct wl_display *display,
|
|||
const struct timespec *deadline);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WL_CREATE_QUEUE_WITH_NAME
|
||||
struct wl_event_queue *
|
||||
wl_display_create_queue_with_name(struct wl_display *display,
|
||||
const char *name);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue