From: Mark Thompson <s...@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 <s...@jkqxz.net>
Signed-off-by: Leo Liu <leo....@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to