Mesa (18.0): st/va: Enable vaExportSurfaceHandle()
Juan Antonio Suárez Romero
jasuarez at kemper.freedesktop.org
Wed Apr 18 14:47:29 UTC 2018
Module: Mesa
Branch: 18.0
Commit: 19db663cf028c184b1173795d1d38b152743e781
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=19db663cf028c184b1173795d1d38b152743e781
Author: Mark Thompson <sw at jkqxz.net>
Date: Wed Feb 7 23:10:15 2018 +0000
st/va: Enable vaExportSurfaceHandle()
It is present from libva 2.1 (VAAPI 1.1.0 or higher).
Signed-off-by: Mark Thompson <sw at jkqxz.net>
Reviewed-by: Christian König <christian.koenig at amd.com>
(cherry picked from commit 768f1487b0c084507ba5e2641e0bbf4ec789ec85)
---
src/gallium/state_trackers/va/context.c | 8 +++++++-
src/gallium/state_trackers/va/surface.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 78e1f19ab7..c4abe77cf7 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -89,7 +89,13 @@ static struct VADriverVTable vtable =
&vlVaQuerySurfaceAttributes,
&vlVaAcquireBufferHandle,
&vlVaReleaseBufferHandle,
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
+ NULL, /* vaCreateMFContext */
+ NULL, /* vaMFAddContext */
+ NULL, /* vaMFReleaseContext */
+ NULL, /* vaMFSubmit */
+ NULL, /* vaCreateBuffer2 */
+ NULL, /* vaQueryProcessingRate */
&vlVaExportSurfaceHandle,
#endif
};
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 636505b720..f9412ce52e 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -923,7 +923,7 @@ vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx, VAContextID context,
return VA_STATUS_SUCCESS;
}
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
VAStatus
vlVaExportSurfaceHandle(VADriverContextP ctx,
VASurfaceID surface_id,
More information about the mesa-commit
mailing list