vc4: Add support for the TXL opcode.
[mesa.git] / configure.ac
index 51f6c66e90fc6b4405b06dd77269e06bf42b0018..59b90e6cbfc8b7488cbd8babdf6d66e3e39c1b17 100644 (file)
@@ -32,7 +32,7 @@ LIBDRM_RADEON_REQUIRED=2.4.56
 LIBDRM_INTEL_REQUIRED=2.4.52
 LIBDRM_NVVIEUX_REQUIRED=2.4.33
 LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
-LIBDRM_FREEDRENO_REQUIRED=2.4.55
+LIBDRM_FREEDRENO_REQUIRED=2.4.57
 DRI2PROTO_REQUIRED=2.6
 DRI3PROTO_REQUIRED=1.0
 PRESENTPROTO_REQUIRED=1.0
@@ -673,6 +673,11 @@ AC_ARG_ENABLE([omx],
          [enable OpenMAX library @<:@default=disabled@:>@])],
    [enable_omx="$enableval"],
    [enable_omx=no])
+AC_ARG_ENABLE([va],
+   [AS_HELP_STRING([--enable-va],
+         [enable va library @<:@default=auto@:>@])],
+   [enable_va="$enableval"],
+   [enable_va=auto])
 AC_ARG_ENABLE([opencl],
    [AS_HELP_STRING([--enable-opencl],
          [enable OpenCL library @<:@default=disabled@:>@])],
@@ -744,6 +749,7 @@ if test "x$enable_opengl" = xno -a \
         "x$enable_xvmc" = xno -a \
         "x$enable_vdpau" = xno -a \
         "x$enable_omx" = xno -a \
+        "x$enable_va" = xno -a \
         "x$enable_opencl" = xno; then
     AC_MSG_ERROR([at least one API should be enabled])
 fi
@@ -1404,6 +1410,10 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
     if test "x$enable_omx" = xauto; then
        PKG_CHECK_EXISTS([libomxil-bellagio], [enable_omx=yes], [enable_omx=no])
     fi
+
+    if test "x$enable_va" = xauto; then
+        PKG_CHECK_EXISTS([libva], [enable_va=yes], [enable_va=no])
+    fi
 fi
 
 if test "x$enable_xvmc" = xyes; then
@@ -1425,6 +1435,13 @@ if test "x$enable_omx" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_ST_OMX, test "x$enable_omx" = xyes)
 
+if test "x$enable_va" = xyes; then
+    PKG_CHECK_MODULES([VA], [libva >= 0.35.0 x11-xcb xcb-dri2 >= $XCBDRI2_REQUIRED],
+                      [VA_LIBS="`$PKG_CONFIG --libs x11-xcb xcb-dri2`"])
+    enable_gallium_loader=$enable_shared_pipe_drivers
+fi
+AM_CONDITIONAL(HAVE_ST_VA, test "x$enable_va" = xyes)
+
 dnl
 dnl OpenCL configuration
 dnl
@@ -1768,31 +1785,32 @@ if test "x$enable_gallium_tests" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes)
 
-VDPAU_LIB_INSTALL_DIR_DEFAULT=''
-if test "x$enable_vdpau" = xyes; then
-    VDPAU_LIB_INSTALL_DIR_DEFAULT=`$PKG_CONFIG --variable=moduledir vdpau`
-fi
-
 dnl Directory for VDPAU libs
 AC_ARG_WITH([vdpau-libdir],
     [AS_HELP_STRING([--with-vdpau-libdir=DIR],
-        [directory for the VDPAU libraries @<:@default=`pkg-config --variable=moduledir vdpau`@:>@])],
+        [directory for the VDPAU libraries @<:@default=${libdir}/vdpau@:>@])],
     [VDPAU_LIB_INSTALL_DIR="$withval"],
-    [VDPAU_LIB_INSTALL_DIR="$VDPAU_LIB_INSTALL_DIR_DEFAULT"])
+    [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau'])
 AC_SUBST([VDPAU_LIB_INSTALL_DIR])
 
-OMX_LIB_INSTALL_DIR_DEFAULT=''
-if test "x$enable_omx" = xyes; then
-    OMX_LIB_INSTALL_DIR_DEFAULT=`$PKG_CONFIG --variable=pluginsdir libomxil-bellagio`
-fi
+dnl Directory for OMX libs
 
 AC_ARG_WITH([omx-libdir],
     [AS_HELP_STRING([--with-omx-libdir=DIR],
-        [directory for the OMX libraries @<:@default=`pkg-config --variable=pluginsdir libomxil-bellagio`@:>@])],
+        [directory for the OMX libraries])],
     [OMX_LIB_INSTALL_DIR="$withval"],
-    [OMX_LIB_INSTALL_DIR="$OMX_LIB_INSTALL_DIR_DEFAULT"])
+    [OMX_LIB_INSTALL_DIR=`$PKG_CONFIG --define-variable=libdir=\$libdir --variable=pluginsdir libomxil-bellagio`])
 AC_SUBST([OMX_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 @<:@${libdir}/dri@:>@])],
+    [VA_LIB_INSTALL_DIR="$withval"],
+    [VA_LIB_INSTALL_DIR="${libdir}/dri"])
+AC_SUBST([VA_LIB_INSTALL_DIR])
+
 dnl
 dnl Gallium helper functions
 dnl
@@ -1818,6 +1836,9 @@ gallium_require_drm_loader() {
         fi
         enable_gallium_drm_loader=yes
     fi
+    if test "x$enable_va" = xyes && test "x$7" != x; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7"
+    fi
 }
 
 require_egl_drm() {
@@ -2071,6 +2092,11 @@ AM_CONDITIONAL(HAVE_SPARC_ASM, test "x$asm_arch" = xsparc)
 AC_SUBST([VDPAU_MAJOR], 1)
 AC_SUBST([VDPAU_MINOR], 0)
 
+VA_MAJOR=`$PKG_CONFIG --modversion libva | $SED -n 's/\([[^\.]]*\)\..*$/\1/p'`
+VA_MINOR=`$PKG_CONFIG --modversion libva | $SED -n 's/.*\.\(.*\)\..*$/\1/p'`
+AC_SUBST([VA_MAJOR], $VA_MAJOR)
+AC_SUBST([VA_MINOR], $VA_MINOR)
+
 AC_SUBST([XVMC_MAJOR], 1)
 AC_SUBST([XVMC_MINOR], 0)
 
@@ -2128,6 +2154,7 @@ AC_CONFIG_FILES([Makefile
                src/gallium/drivers/svga/Makefile
                src/gallium/drivers/trace/Makefile
                src/gallium/drivers/vc4/Makefile
+               src/gallium/drivers/vc4/kernel/Makefile
                src/gallium/state_trackers/clover/Makefile
                src/gallium/state_trackers/dri/Makefile
                src/gallium/state_trackers/egl/Makefile
@@ -2135,6 +2162,7 @@ AC_CONFIG_FILES([Makefile
                src/gallium/state_trackers/glx/xlib/Makefile
                src/gallium/state_trackers/omx/Makefile
                src/gallium/state_trackers/osmesa/Makefile
+               src/gallium/state_trackers/va/Makefile
                src/gallium/state_trackers/vdpau/Makefile
                src/gallium/state_trackers/vega/Makefile
                src/gallium/state_trackers/xa/Makefile
@@ -2148,6 +2176,7 @@ AC_CONFIG_FILES([Makefile
                src/gallium/targets/osmesa/Makefile
                src/gallium/targets/osmesa/osmesa.pc
                src/gallium/targets/pipe-loader/Makefile
+               src/gallium/targets/va/Makefile
                src/gallium/targets/vdpau/Makefile
                src/gallium/targets/xa/Makefile
                src/gallium/targets/xa/xatracker.pc