From: Thomas Balling Sørensen Date: Sun, 24 Oct 2010 17:27:29 +0000 (+0200) Subject: vl: va state-tracker configuration scripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=501ac572c604ef248ed41311a065bc5f4746fcb3;p=mesa.git vl: va state-tracker configuration scripts --- diff --git a/configs/autoconf.in b/configs/autoconf.in index d7eb162b684..df52b3f42f6 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -160,6 +160,9 @@ EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ # VDPAU library install directory VDPAU_LIB_INSTALL_DIR=@VDPAU_LIB_INSTALL_DIR@ +# VA library install directory +VA_LIB_INSTALL_DIR=@VA_LIB_INSTALL_DIR@ + # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ diff --git a/configure.ac b/configure.ac index 0344be00703..59c2eb157b7 100644 --- a/configure.ac +++ b/configure.ac @@ -1345,6 +1345,13 @@ yes) fi HAVE_ST_VDPAU="yes" ;; + va) + # Check for libva? + if test "x$enable_gallium_g3dvl" != xyes; then + AC_MSG_ERROR([cannot build va state tracker without --enable-gallium-g3dvl]) + fi + HAVE_ST_VA="yes" + ;; esac if test -n "$tracker"; then @@ -1479,7 +1486,7 @@ dnl dnl Gallium helper functions dnl gallium_check_st() { - if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_EGL" = xyes || test "x$HAVE_ST_XORG" = xyes || test "x$HAVE_ST_XVMC" = xyes || test "x$HAVE_ST_VDPAU" = xyes; then + if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_EGL" = xyes || test "x$HAVE_ST_XORG" = xyes || test "x$HAVE_ST_XVMC" = xyes || test "x$HAVE_ST_VDPAU" = xyes || test "x$HAVE_ST_VA" = xyes; then GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1" fi if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then @@ -1497,6 +1504,9 @@ gallium_check_st() { if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6" fi + if test "x$HAVE_ST_VA" = xyes && test "x$7" != x; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7" + fi } @@ -1613,8 +1623,13 @@ AC_ARG_ENABLE([gallium-g3dvl], if test "x$enable_gallium_g3dvl" = xyes; then case "$mesa_driver" in xlib) + if test "x$HAVE_ST_VDPAU" = xyes; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe" - ;; + fi + if test "x$HAVE_ST_VA" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS va-softpipe" + fi + ;; dri) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri" ;; @@ -1628,6 +1643,14 @@ AC_ARG_WITH([vdpau-libdir], [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau']) AC_SUBST([VDPAU_LIB_INSTALL_DIR]) +dnl Directory for VA libs +AC_ARG_WITH([va-libdir], + [AS_HELP_STRING([--with-va-libdir=DIR], + [directory for the VA libraries @<:@default=${libdir}/va@:>@])], + [VA_LIB_INSTALL_DIR="$withval"], + [VA_LIB_INSTALL_DIR='${libdir}/va']) +AC_SUBST([VA_LIB_INSTALL_DIR]) + dnl dnl Gallium swrast configuration dnl diff --git a/src/gallium/state_trackers/va/Makefile b/src/gallium/state_trackers/va/Makefile index 28fe5d09694..15c6ee0ef6d 100644 --- a/src/gallium/state_trackers/va/Makefile +++ b/src/gallium/state_trackers/va/Makefile @@ -8,7 +8,7 @@ VA_MINOR = 3 LIBRARY_DEFINES = -DVER_MAJOR=$(VA_MAJOR) -DVER_MINOR=$(VA_MINOR) $(STATE_TRACKER_DEFINES) LIBRARY_INCLUDES = \ - $(shell pkg-config --cflags-only-I vdpau) \ + $(shell pkg-config --cflags-only-I va) \ -I$(TOP)/src/gallium/winsys/g3dvl C_SOURCES = htab.c \ diff --git a/src/gallium/state_trackers/va/ftab.c b/src/gallium/state_trackers/va/ftab.c index 694390b3464..034424cdee7 100644 --- a/src/gallium/state_trackers/va/ftab.c +++ b/src/gallium/state_trackers/va/ftab.c @@ -26,7 +26,7 @@ **************************************************************************/ #include -#include +#include const struct VADriverVTable vtable = { diff --git a/src/gallium/state_trackers/va/htab.c b/src/gallium/state_trackers/va/htab.c index 7b7c111a4be..069c7930927 100644 --- a/src/gallium/state_trackers/va/htab.c +++ b/src/gallium/state_trackers/va/htab.c @@ -29,6 +29,10 @@ #include #include "va_private.h" +#define VL_HANDLES + +typedef uint32_t vlHandle; + #ifdef VL_HANDLES static struct handle_table *htab = NULL; pipe_static_mutex(htab_lock); diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h index e69de29bb2d..8264c259ed1 100644 --- a/src/gallium/state_trackers/va/va_private.h +++ b/src/gallium/state_trackers/va/va_private.h @@ -0,0 +1,32 @@ +/************************************************************************** + * + * Copyright 2010 Thomas Balling Sørensen. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + + #ifndef VA_PRIVATE_H + #define VA_PRIVATE_H + + + #endif // VA_PRIVATE_H \ No newline at end of file diff --git a/src/gallium/state_trackers/vdpau/mpeg2_bitstream_parser.h b/src/gallium/state_trackers/vdpau/mpeg2_bitstream_parser.h index 414d6597c6c..25f3516f821 100644 --- a/src/gallium/state_trackers/vdpau/mpeg2_bitstream_parser.h +++ b/src/gallium/state_trackers/vdpau/mpeg2_bitstream_parser.h @@ -36,19 +36,14 @@ enum vdpMPEG2States { MPEG2_SEEK_HEADER, MPEG2_HEADER_DONE, - MPEG2_BITSTREAM_DONE - MPEG2 + MPEG2_BITSTREAM_DONE, + MPEG2_HEADER_START_CODE }; -enum vdpMPEG2Action -{ - MPEG2_ -}; struct vdpMPEG2BitstreamParser { enum vdpMPEG2States state; - enum vdpMPEG2Actions action; uint32_t cur_bitstream; const uint8_t *ptr_bitstream_end; const uint8_t *ptr_bitstream; diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index d582b8e6c29..1deea3a67d3 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -1,6 +1,6 @@ /************************************************************************** * - * Copyright 2010 Younes Manton. + * Copyright 2010 Younes Manton & Thomas Balling Sørensen. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a