mesa: add libva support and add upstream patch

This commit is contained in:
Lukas Rusak 2018-01-08 15:40:16 -08:00
parent 46021e1122
commit 7cb7c55919
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
2 changed files with 47 additions and 1 deletions

View File

@ -68,6 +68,13 @@ else
MESA_VDPAU="--disable-vdpau" MESA_VDPAU="--disable-vdpau"
fi fi
if [ "$VAAPI_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva"
MESA_VAAPI="--enable-va"
else
MESA_VAAPI="--disable-va"
fi
XA_CONFIG="--disable-xa" XA_CONFIG="--disable-xa"
for drv in $GRAPHIC_DRIVERS; do for drv in $GRAPHIC_DRIVERS; do
[ "$drv" = "vmware" ] && XA_CONFIG="--enable-xa" [ "$drv" = "vmware" ] && XA_CONFIG="--enable-xa"
@ -103,7 +110,7 @@ PKG_CONFIGURE_OPTS_TARGET="CC_FOR_BUILD=$HOST_CC \
--disable-xvmc \ --disable-xvmc \
$MESA_VDPAU \ $MESA_VDPAU \
--disable-omx-bellagio \ --disable-omx-bellagio \
--disable-va \ $MESA_VAAPI \
--disable-opencl \ --disable-opencl \
--enable-opencl-icd \ --enable-opencl-icd \
--disable-gallium-tests \ --disable-gallium-tests \

View File

@ -0,0 +1,39 @@
src/gallium/state_trackers/va/context.c | 8 +++++++-
src/gallium/state_trackers/va/surface.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 78e1f19ab7..c4abe77cf7 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -89,7 +89,13 @@ static struct VADriverVTable vtable =
&vlVaQuerySurfaceAttributes,
&vlVaAcquireBufferHandle,
&vlVaReleaseBufferHandle,
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
+ NULL, /* vaCreateMFContext */
+ NULL, /* vaMFAddContext */
+ NULL, /* vaMFReleaseContext */
+ NULL, /* vaMFSubmit */
+ NULL, /* vaCreateBuffer2 */
+ NULL, /* vaQueryProcessingRate */
&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.11.0