[3/3] st/va: Enable vaExportSurfaceHandle()

Submitted by Liu, Leo on Dec. 4, 2017, 8:50 p.m.

Details

Message ID 20171204205014.14203-3-leo.liu@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Liu, Leo Dec. 4, 2017, 8:50 p.m.
From: Mark Thompson <sw@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@jkqxz.net>
Signed-off-by: Leo Liu <leo.liu@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(-)

Patch hide | download patch | download mbox

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,