diff options
author | Julien Isorce <[email protected]> | 2015-10-30 11:42:53 +0000 |
---|---|---|
committer | Christian König <[email protected]> | 2015-10-30 13:21:20 +0100 |
commit | e7ed3963ed33134cc214f0a8b8e4b8cb6029887d (patch) | |
tree | 52f0c6ff2de8ce0d065b8c7206b6e6bf60dfd742 /src/gallium/state_trackers/va/va_private.h | |
parent | 802ba6f8655bf967299b027204ecdd5855050609 (diff) |
st/va: add support to export a surface as dmabuf
I.e. implements:
VaAcquireBufferHandle
VaReleaseBufferHandle
for memory of type VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME
And apply relatives change to:
vlVaMapBuffer
vlVaUnMapBuffer
vlVaDestroyBuffer
Implementation inspired from cgit.freedesktop.org/vaapi/intel-driver
Tested with gstreamer-vaapi with nouveau driver.
Signed-off-by: Julien Isorce <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/va_private.h')
-rw-r--r-- | src/gallium/state_trackers/va/va_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h index 3ae51a766a0..2b645d08a03 100644 --- a/src/gallium/state_trackers/va/va_private.h +++ b/src/gallium/state_trackers/va/va_private.h @@ -34,6 +34,7 @@ #include <va/va.h> #include <va/va_backend.h> #include <va/va_backend_vpp.h> +#include <va/va_drmcommon.h> #include "pipe/p_video_enums.h" #include "pipe/p_video_codec.h" @@ -238,6 +239,8 @@ typedef struct { struct pipe_transfer *transfer; struct pipe_fence_handle *fence; } derived_surface; + unsigned int export_refcount; + VABufferInfo export_state; } vlVaBuffer; typedef struct { @@ -328,6 +331,9 @@ VAStatus vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format, unsigned VAStatus vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config, VASurfaceAttrib *attrib_list, unsigned int *num_attribs); +VAStatus vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id, VABufferInfo *out_buf_info); +VAStatus vlVaReleaseBufferHandle(VADriverContextP ctx, VABufferID buf_id); + VAStatus vlVaQueryVideoProcFilters(VADriverContextP ctx, VAContextID context, VAProcFilterType *filters, unsigned int *num_filters); VAStatus vlVaQueryVideoProcFilterCaps(VADriverContextP ctx, VAContextID context, VAProcFilterType type, |