[Mesa-dev] [PATCH 3/3] st/va: Enable vaExportSurfaceHandle()

Leo Liu leo.liu at amd.com
Mon Dec 4 20:52:52 UTC 2017


From: Mark Thompson <sw at jkqxz.net>

It will be present from libva 2.1 (VAAPI 1.1.0 or higher).

v2: rebase to previous patches(Leo)

Signed-off-by: Mark Thompson <sw at jkqxz.net>
Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 src/gallium/state_trackers/va/context.c | 2 +-
 src/gallium/state_trackers/va/surface.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 8c624d05c1..ad59294010 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -88,7 +88,7 @@ static struct VADriverVTable vtable =
    .vaQuerySurfaceAttributes = &vlVaQuerySurfaceAttributes,
    .vaAcquireBufferHandle = &vlVaAcquireBufferHandle,
    .vaReleaseBufferHandle = &vlVaReleaseBufferHandle,
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
    .vaExportSurfaceHandle = &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,
-- 
2.14.1



More information about the mesa-dev mailing list