-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0009-Make-wl_drm-optional.patch
49 lines (40 loc) · 1.82 KB
/
0009-Make-wl_drm-optional.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From d30e01329344858f3c84d0ef9c2b68cbde37bb9a Mon Sep 17 00:00:00 2001
From: Simon Ser <[email protected]>
Date: Mon, 11 Mar 2024 23:48:17 +0100
Subject: [PATCH 09/10] Make wl_drm optional
Don't error out when vtable->wl_interface is NULL.
Fetching wl_drm_interface from libEGL used to work but doesn't
anymore: it's now a private symbol (wayland-scanner private-code).
---
src/i965_output_wayland.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c
index a6120b7..a002cae 100644
--- a/src/i965_output_wayland.c
+++ b/src/i965_output_wayland.c
@@ -154,7 +154,7 @@ registry_handle_global(
struct va_wl_output * const wl_output = i965->wl_output;
struct wl_vtable * const wl_vtable = &wl_output->vtable;
- if (strcmp(interface, "wl_drm") == 0) {
+ if (strcmp(interface, "wl_drm") == 0 && wl_vtable->drm_interface) {
wl_output->wl_drm_name = name;
wl_output->wl_drm = registry_bind(wl_vtable, wl_output->wl_registry,
name, wl_vtable->drm_interface,
@@ -472,6 +472,7 @@ i965_output_wayland_init(VADriverContextP ctx)
wl_vtable = &i965->wl_output->vtable;
+ /* drm_interface is optional */
if (vtable->wl_interface)
wl_vtable->drm_interface = vtable->wl_interface;
else {
@@ -483,9 +484,8 @@ i965_output_wayland_init(VADriverContextP ctx)
}
dso_handle = i965->wl_output->libegl_handle;
- if (!dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable),
- libegl_symbols))
- goto error;
+ dso_get_symbols(dso_handle, wl_vtable, sizeof(*wl_vtable),
+ libegl_symbols);
}
i965->wl_output->libwl_client_handle = dso_open(LIBWAYLAND_CLIENT_NAME);
--
2.47.1.windows.1