• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revisión62bad1239d8ea1bb269ca69d3469aa267f57cdec (tree)
Tiempo2018-12-26 17:08:34
AutorHaihao Xiang <haihao.xiang@inte...>
CommiterXiang, Haihao

Log Message

Add pointer to struct wl_interface for driver to use

See https://github.com/intel/intel-vaapi-driver/issues/419 for the
information

Note: don't export the interface symbol in case others may reuse it.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>

Cambiar Resumen

Diferencia incremental

--- a/va/wayland/va_backend_wayland.h
+++ b/va/wayland/va_backend_wayland.h
@@ -64,8 +64,16 @@ struct VADriverVTableWayland {
6464 /** \brief Indicate whether buffer sharing with prime fd is supported. */
6565 unsigned int has_prime_sharing;
6666
67+ /**
68+ * Pointer to an implementation of struct wl_interface
69+ *
70+ * It is set by libva-wayland when a context is created, then the backend
71+ * driver may reuse it.
72+ */
73+ const void *wl_interface;
74+
6775 /** \brief Reserved bytes for future use, must be zero */
68- unsigned long reserved[8];
76+ unsigned long reserved[7];
6977 };
7078
7179 #endif /* VA_BACKEND_WAYLAND_H */
--- a/va/wayland/va_wayland_drm.c
+++ b/va/wayland/va_wayland_drm.c
@@ -136,6 +136,7 @@ va_wayland_drm_destroy(VADisplayContextP pDisplayContext)
136136 struct VADriverVTableWayland *vtable = ctx->vtable_wayland;
137137
138138 vtable->has_prime_sharing = 0;
139+ vtable->wl_interface = NULL;
139140
140141 wl_drm_ctx->is_authenticated = 0;
141142
@@ -222,6 +223,8 @@ va_wayland_drm_create(VADisplayContextP pDisplayContext)
222223 struct VADriverVTableWayland *vtable = ctx->vtable_wayland;
223224 struct wl_display *wrapped_display = NULL;
224225
226+ vtable->wl_interface = NULL;
227+
225228 wl_drm_ctx = malloc(sizeof(*wl_drm_ctx));
226229 if (!wl_drm_ctx) {
227230 va_wayland_error("could not allocate wl_drm_ctx");
@@ -300,6 +303,7 @@ va_wayland_drm_create(VADisplayContextP pDisplayContext)
300303 goto end;
301304 }
302305
306+ vtable->wl_interface = &wl_drm_interface;
303307 result = true;
304308
305309 end: