summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch')
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch90
1 files changed, 0 insertions, 90 deletions
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch
deleted file mode 100644
index 96110ef8..00000000
--- a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1From 2e2bcb1817f2dc91adf85f5255a4792a6213a74e Mon Sep 17 00:00:00 2001
2From: "Ung, Teng En" <teng.en.ung@intel.com>
3Date: Fri, 8 Oct 2021 14:19:40 +0000
4Subject: [PATCH 2/3] sample_misc: Addin basic wayland dmabuf support.
5
6Upstream-Status: Submitted
7innersource PR #269
8
9---
10 .../sample_misc/wayland/include/class_wayland.h | 16 ++++++++++++++++
11 .../sample_misc/wayland/src/class_wayland.cpp | 8 ++++++++
12 2 files changed, 24 insertions(+)
13
14diff --git a/tools/legacy/sample_misc/wayland/include/class_wayland.h b/tools/legacy/sample_misc/wayland/include/class_wayland.h
15index 564b9b8b..e5267ec2 100644
16--- a/tools/legacy/sample_misc/wayland/include/class_wayland.h
17+++ b/tools/legacy/sample_misc/wayland/include/class_wayland.h
18@@ -32,6 +32,9 @@ extern "C" {
19 #include "sample_defs.h"
20 #include "vpl/mfxstructures.h"
21 #include "wayland-drm-client-protocol.h"
22+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
23+ #include "linux-dmabuf-unstable-v1.h"
24+#endif
25
26 typedef struct buffer wld_buffer;
27
28@@ -93,6 +96,11 @@ public:
29 struct wl_drm* GetDrm() {
30 return m_drm;
31 }
32+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
33+ struct zwp_linux_dmabuf_v1* GetDMABuf() {
34+ return m_dmabuf;
35+ }
36+#endif
37 struct wl_shm* GetShm() {
38 return m_shm;
39 };
40@@ -120,6 +128,11 @@ public:
41 void SetDrm(struct wl_drm* drm) {
42 m_drm = drm;
43 }
44+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
45+ void SetDMABuf(struct zwp_linux_dmabuf_v1* dmabuf) {
46+ m_dmabuf = dmabuf;
47+ }
48+#endif
49 void DrmHandleDevice(const char* device);
50 void DrmHandleAuthenticated();
51 void RegistryGlobal(struct wl_registry* registry,
52@@ -147,6 +160,9 @@ private:
53 struct wl_compositor* m_compositor;
54 struct wl_shell* m_shell;
55 struct wl_drm* m_drm;
56+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
57+ struct zwp_linux_dmabuf_v1* m_dmabuf;
58+#endif
59 struct wl_shm* m_shm;
60 struct wl_shm_pool* m_pool;
61 struct wl_surface* m_surface;
62diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
63index 65147973..dc2fc718 100644
64--- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
65+++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp
66@@ -50,6 +50,9 @@ Wayland::Wayland()
67 m_compositor(NULL),
68 m_shell(NULL),
69 m_drm(NULL),
70+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
71+ m_dmabuf(NULL),
72+#endif
73 m_shm(NULL),
74 m_pool(NULL),
75 m_surface(NULL),
76@@ -360,6 +363,11 @@ void Wayland::RegistryGlobal(struct wl_registry* registry,
77 m_drm = static_cast<wl_drm*>(wl_registry_bind(registry, name, &wl_drm_interface, 2));
78 wl_drm_add_listener(m_drm, &drm_listener, this);
79 }
80+#if defined(WAYLAND_LINUX_DMABUF_SUPPORT)
81+ else if(0 == strcmp(interface, "zwp_linux_dmabuf_v1"))
82+ m_dmabuf = static_cast<zwp_linux_dmabuf_v1*>(
83+ wl_registry_bind(registry, name, &zwp_linux_dmabuf_v1_interface, version));
84+#endif
85 }
86
87 void Wayland::DrmHandleDevice(const char* name) {
88--
892.31.1
90