summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/context.c
diff options
context:
space:
mode:
authorMark Thompson <[email protected]>2017-10-01 18:40:45 +0100
committerLeo Liu <[email protected]>2017-10-07 10:15:14 -0400
commitc4ed39f85b1ebd062eaa51880fcc79cfbcb4e5c3 (patch)
tree1c6afdcf2bda376e0325b6b71efe9804f7c4b666 /src/gallium/state_trackers/va/context.c
parent52b73caaf40e79c90a105ec6d349abb3398e3c6b (diff)
st/va: Implement vaExportSurfaceHandle()
This is a new interface in libva2 to support wider use-cases of passing surfaces to external APIs. In particular, this allows export of NV12 and P010 surfaces. v2: Convert surfaces to progressive before exporting them (Christian). v3: Set destination rectangle to match source when converting (Leo). Add guards to allow building with libva1. Signed-off-by: Mark Thompson <[email protected]> Acked-by: Christian König <[email protected]> Acked-and-Tested-by: Leo Liu <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/context.c')
-rw-r--r--src/gallium/state_trackers/va/context.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index f2cb37aa22a..1207499a788 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -88,7 +88,10 @@ static struct VADriverVTable vtable =
&vlVaCreateSurfaces2,
&vlVaQuerySurfaceAttributes,
&vlVaAcquireBufferHandle,
- &vlVaReleaseBufferHandle
+ &vlVaReleaseBufferHandle,
+#if VA_CHECK_VERSION(1, 0, 0)
+ &vlVaExportSurfaceHandle,
+#endif
};
static struct VADriverVTableVPP vtable_vpp =