diff -Nru mesa-12.0.6/bin/get-typod-pick-list.sh mesa-17.0.7/bin/get-typod-pick-list.sh
--- mesa-12.0.6/bin/get-typod-pick-list.sh 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/bin/get-typod-pick-list.sh 1970-01-01 00:00:00.000000000 +0000
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# Script for generating a list of candidates which have typos in the nomination line
-#
-# Usage examples:
-#
-# $ bin/get-typod-pick-list.sh
-# $ bin/get-typod-pick-list.sh > picklist
-# $ bin/get-typod-pick-list.sh | tee picklist
-
-# NB:
-# This script intentionally _never_ checks for specific version tag
-# Should we consider folding it with the original get-pick-list.sh
-
-# Grep for commits with "cherry picked from commit" in the commit message.
-git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
- grep "cherry picked from commit" |\
- sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
-
-# Grep for commits that were marked as a candidate for the stable tree.
-git log --reverse --pretty=%H -i --grep='^CC:.*mesa-dev' HEAD..origin/master |\
-while read sha
-do
- # Check to see whether the patch is on the ignore list.
- if [ -f bin/.cherry-ignore ] ; then
- if grep -q ^$sha bin/.cherry-ignore ; then
- continue
- fi
- fi
-
- # Check to see if it has already been picked over.
- if grep -q ^$sha already_picked ; then
- continue
- fi
-
- git log -n1 --pretty=oneline $sha | cat
-done
-
-rm -f already_picked
diff -Nru mesa-12.0.6/common.py mesa-17.0.7/common.py
--- mesa-12.0.6/common.py 2017-01-24 01:41:27.000000000 +0000
+++ mesa-17.0.7/common.py 2017-06-01 10:37:10.000000000 +0000
@@ -59,7 +59,7 @@
# find default_llvm value
-if 'LLVM' in os.environ:
+if 'LLVM' in os.environ or 'LLVM_CONFIG' in os.environ:
default_llvm = 'yes'
else:
default_llvm = 'no'
@@ -86,7 +86,7 @@
from SCons.Options.EnumOption import EnumOption
opts.Add(EnumOption('build', 'build type', 'debug',
allowed_values=('debug', 'checked', 'profile',
- 'release')))
+ 'release', 'opt')))
opts.Add(BoolOption('verbose', 'verbose output', 'no'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code',
default_machine,
@@ -110,5 +110,6 @@
opts.Add(BoolOption('texture_float',
'enable floating-point textures and renderbuffers',
'no'))
+ opts.Add(BoolOption('swr', 'Build OpenSWR', 'no'))
if host_platform == 'windows':
opts.Add('MSVC_VERSION', 'Microsoft Visual C/C++ version')
diff -Nru mesa-12.0.6/configure mesa-17.0.7/configure
--- mesa-12.0.6/configure 2017-01-24 01:41:43.000000000 +0000
+++ mesa-17.0.7/configure 2017-06-01 10:37:18.000000000 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Mesa 12.0.6.
+# Generated by GNU Autoconf 2.69 for Mesa 17.0.7.
#
# Report bugs to .
#
@@ -591,8 +591,8 @@
# Identity of this package.
PACKAGE_NAME='Mesa'
PACKAGE_TARNAME='mesa'
-PACKAGE_VERSION='12.0.6'
-PACKAGE_STRING='Mesa 12.0.6'
+PACKAGE_VERSION='17.0.7'
+PACKAGE_STRING='Mesa 17.0.7'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa'
PACKAGE_URL=''
@@ -638,13 +638,14 @@
LIBOBJS
VALGRIND_LIBS
VALGRIND_CFLAGS
-TIMESTAMP_CMD
XA_VERSION
XA_TINY
XA_MINOR
XA_MAJOR
XVMC_MINOR
XVMC_MAJOR
+HAVE_VULKAN_COMMON_FALSE
+HAVE_VULKAN_COMMON_TRUE
VA_MINOR
VA_MAJOR
VDPAU_MINOR
@@ -669,8 +670,8 @@
HAVE_LIBDRM_TRUE
USE_VC4_SIMULATOR_FALSE
USE_VC4_SIMULATOR_TRUE
-HAVE_MESA_LLVM_FALSE
-HAVE_MESA_LLVM_TRUE
+HAVE_GALLIUM_LLVM_FALSE
+HAVE_GALLIUM_LLVM_TRUE
HAVE_GALLIUM_COMPUTE_FALSE
HAVE_GALLIUM_COMPUTE_TRUE
NEED_RADEON_LLVM_FALSE
@@ -681,8 +682,12 @@
NEED_RADEON_DRM_WINSYS_TRUE
HAVE_INTEL_DRIVERS_FALSE
HAVE_INTEL_DRIVERS_TRUE
+HAVE_AMD_DRIVERS_FALSE
+HAVE_AMD_DRIVERS_TRUE
HAVE_INTEL_VULKAN_FALSE
HAVE_INTEL_VULKAN_TRUE
+HAVE_RADEON_VULKAN_FALSE
+HAVE_RADEON_VULKAN_TRUE
HAVE_SWRAST_DRI_FALSE
HAVE_SWRAST_DRI_TRUE
HAVE_RADEON_DRI_FALSE
@@ -710,6 +715,10 @@
HAVE_GALLIUM_LLVMPIPE_TRUE
HAVE_GALLIUM_SOFTPIPE_FALSE
HAVE_GALLIUM_SOFTPIPE_TRUE
+HAVE_GALLIUM_IMX_FALSE
+HAVE_GALLIUM_IMX_TRUE
+HAVE_GALLIUM_ETNAVIV_FALSE
+HAVE_GALLIUM_ETNAVIV_TRUE
HAVE_GALLIUM_FREEDRENO_FALSE
HAVE_GALLIUM_FREEDRENO_TRUE
HAVE_GALLIUM_NOUVEAU_FALSE
@@ -730,15 +739,17 @@
HAVE_GALLIUM_SVGA_TRUE
SIMPENROSE_LIBS
SIMPENROSE_CFLAGS
+VC4_LIBS
+VC4_CFLAGS
SWR_AVX2_CXXFLAGS
SWR_AVX_CXXFLAGS
SWR_CXX11_CXXFLAGS
+ETNAVIV_LIBS
+ETNAVIV_CFLAGS
FREEDRENO_LIBS
FREEDRENO_CFLAGS
NOUVEAU_LIBS
NOUVEAU_CFLAGS
-AMDGPU_LIBS
-AMDGPU_CFLAGS
D3D_DRIVER_INSTALL_DIR
VA_LIB_INSTALL_DIR
OMX_LIB_INSTALL_DIR
@@ -746,11 +757,8 @@
HAVE_GALLIUM_TESTS_FALSE
HAVE_GALLIUM_TESTS_TRUE
XVMC_LIB_INSTALL_DIR
-LLVM_CONFIG
EGL_CFLAGS
EGL_NATIVE_PLATFORM
-HAVE_EGL_DRIVER_DRI2_FALSE
-HAVE_EGL_DRIVER_DRI2_TRUE
HAVE_EGL_PLATFORM_ANDROID_FALSE
HAVE_EGL_PLATFORM_ANDROID_TRUE
HAVE_EGL_PLATFORM_SURFACELESS_FALSE
@@ -761,6 +769,8 @@
HAVE_PLATFORM_WAYLAND_TRUE
HAVE_PLATFORM_X11_FALSE
HAVE_PLATFORM_X11_TRUE
+ANDROID_LIBS
+ANDROID_CFLAGS
XCB_DRI2_LIBS
XCB_DRI2_CFLAGS
WAYLAND_LIBS
@@ -768,29 +778,17 @@
WAYLAND_SCANNER
WAYLAND_SCANNER_LIBS
WAYLAND_SCANNER_CFLAGS
-EGL_CLIENT_APIS
-VG_LIB_DEPS
-CLANG_RESOURCE_DIR
-LLVM_VERSION
-LLVM_INCLUDEDIR
-LLVM_LDFLAGS
-LLVM_LIBS
-LLVM_LIBDIR
-LLVM_CXXFLAGS
-LLVM_CPPFLAGS
-LLVM_CFLAGS
-LLVM_BINDIR
HAVE_GALLIUM_FALSE
HAVE_GALLIUM_TRUE
+CLANG_RESOURCE_DIR
OPENCL_LIBNAME
HAVE_CLOVER_ICD_FALSE
HAVE_CLOVER_ICD_TRUE
HAVE_CLOVER_FALSE
HAVE_CLOVER_TRUE
+CLOVER_STD_OVERRIDE
LIBCLC_LIBEXECDIR
LIBCLC_INCLUDEDIR
-LIBELF_LIBS
-LIBELF_CFLAGS
HAVE_ST_NINE_FALSE
HAVE_ST_NINE_TRUE
HAVE_ST_VA_FALSE
@@ -831,6 +829,8 @@
NEED_LIBMESA_TRUE
NEED_MEGADRIVER_FALSE
NEED_MEGADRIVER_TRUE
+AMDGPU_LIBS
+AMDGPU_CFLAGS
VULKAN_ICD_INSTALL_DIR
RADEON_LIBS
RADEON_CFLAGS
@@ -869,23 +869,16 @@
DRI3PROTO_CFLAGS
DRI2PROTO_LIBS
DRI2PROTO_CFLAGS
-GLPROTO_LIBS
-GLPROTO_CFLAGS
XLIBGL_LIBS
XLIBGL_CFLAGS
-LIBUDEV_LIBS
-LIBUDEV_CFLAGS
-ENABLE_SHADER_CACHE_FALSE
-ENABLE_SHADER_CACHE_TRUE
-SHA1_CFLAGS
-SHA1_LIBS
-OPENSSL_LIBS
-OPENSSL_CFLAGS
-LIBSHA1_LIBS
-LIBSHA1_CFLAGS
-MESA_LLVM
+GLPROTO_LIBS
+GLPROTO_CFLAGS
HAVE_SHARED_GLAPI_FALSE
HAVE_SHARED_GLAPI_TRUE
+HAVE_WINDOWSDRI_FALSE
+HAVE_WINDOWSDRI_TRUE
+HAVE_LMSENSORS_FALSE
+HAVE_LMSENSORS_TRUE
HAVE_APPLEDRI_FALSE
HAVE_APPLEDRI_TRUE
HAVE_DRI3_FALSE
@@ -918,6 +911,24 @@
HAVE_OPENGL_ES1_TRUE
HAVE_OPENGL_FALSE
HAVE_OPENGL_TRUE
+LIBSENSORS_LIBS
+HAVE_LIBSENSORS_FALSE
+HAVE_LIBSENSORS_TRUE
+HAVE_GALLIUM_EXTRA_HUD_FALSE
+HAVE_GALLIUM_EXTRA_HUD_TRUE
+LLVM_VERSION
+LLVM_INCLUDEDIR
+LLVM_LDFLAGS
+LLVM_LIBS
+LLVM_LIBDIR
+LLVM_CXXFLAGS
+LLVM_CPPFLAGS
+LLVM_CFLAGS
+LLVM_BINDIR
+MESA_LLVM
+LLVM_CONFIG
+LIBELF_LIBS
+LIBELF_CFLAGS
SELINUX_LIBS
SELINUX_CFLAGS
PTHREADSTUBS_LIBS
@@ -945,6 +956,8 @@
BUILD_SHARED_FALSE
BUILD_SHARED_TRUE
PWR8_CFLAGS
+GCC_ATOMIC_BUILTINS_SUPPORTED_FALSE
+GCC_ATOMIC_BUILTINS_SUPPORTED_TRUE
SSE41_CFLAGS
SSE41_SUPPORTED_FALSE
SSE41_SUPPORTED_TRUE
@@ -970,6 +983,7 @@
LEX
YFLAGS
YACC
+XXD
RM
CXXCPP
LT_SYS_LIBRARY_PATH
@@ -1128,10 +1142,14 @@
enable_texture_float
enable_asm
enable_selinux
+enable_llvm_shared_libs
+with_llvm_prefix
enable_opengl
enable_gles1
enable_gles2
enable_dri
+enable_gallium_extra_hud
+enable_lmsensors
enable_dri3
enable_glx
enable_osmesa
@@ -1149,23 +1167,18 @@
enable_gallium_tests
with_gallium_drivers
enable_shared_glapi
-with_sha1
-enable_shader_cache
-enable_sysfs
enable_driglx_direct
enable_glx_tls
enable_glx_read_only_text
with_dri_driverdir
with_dri_searchpath
with_dri_drivers
+enable_gallium_llvm
with_vulkan_drivers
with_vulkan_icddir
with_osmesa_bits
with_clang_libdir
with_egl_platforms
-enable_gallium_llvm
-enable_llvm_shared_libs
-with_llvm_prefix
with_xvmc_libdir
with_vdpau_libdir
with_omx_libdir
@@ -1198,20 +1211,16 @@
PTHREADSTUBS_LIBS
SELINUX_CFLAGS
SELINUX_LIBS
+LIBELF_CFLAGS
+LIBELF_LIBS
GLVND_CFLAGS
GLVND_LIBS
LIBDRM_CFLAGS
LIBDRM_LIBS
-LIBSHA1_CFLAGS
-LIBSHA1_LIBS
-OPENSSL_CFLAGS
-OPENSSL_LIBS
-LIBUDEV_CFLAGS
-LIBUDEV_LIBS
-XLIBGL_CFLAGS
-XLIBGL_LIBS
GLPROTO_CFLAGS
GLPROTO_LIBS
+XLIBGL_CFLAGS
+XLIBGL_LIBS
DRI2PROTO_CFLAGS
DRI2PROTO_LIBS
DRI3PROTO_CFLAGS
@@ -1232,6 +1241,8 @@
NVVIEUX_LIBS
RADEON_CFLAGS
RADEON_LIBS
+AMDGPU_CFLAGS
+AMDGPU_LIBS
VL_CFLAGS
VL_LIBS
XVMC_CFLAGS
@@ -1242,20 +1253,22 @@
OMX_LIBS
VA_CFLAGS
VA_LIBS
-LIBELF_CFLAGS
-LIBELF_LIBS
WAYLAND_SCANNER_CFLAGS
WAYLAND_SCANNER_LIBS
WAYLAND_CFLAGS
WAYLAND_LIBS
XCB_DRI2_CFLAGS
XCB_DRI2_LIBS
-AMDGPU_CFLAGS
-AMDGPU_LIBS
+ANDROID_CFLAGS
+ANDROID_LIBS
NOUVEAU_CFLAGS
NOUVEAU_LIBS
FREEDRENO_CFLAGS
FREEDRENO_LIBS
+ETNAVIV_CFLAGS
+ETNAVIV_LIBS
+VC4_CFLAGS
+VC4_LIBS
SIMPENROSE_CFLAGS
SIMPENROSE_LIBS
VALGRIND_CFLAGS
@@ -1800,7 +1813,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Mesa 12.0.6 to adapt to many kinds of systems.
+\`configure' configures Mesa 17.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1871,7 +1884,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Mesa 12.0.6:";;
+ short | recursive ) echo "Configuration of Mesa 17.0.7:";;
esac
cat <<\_ACEOF
@@ -1903,6 +1916,8 @@
--disable-asm disable assembly usage [default=enabled on supported
plaforms]
--enable-selinux Build SELinux-aware Mesa [default=disabled]
+ --enable-llvm-shared-libs
+ link with LLVM shared libraries [default=enabled]
--disable-opengl disable support for standard OpenGL API
[default=enabled]
--disable-gles1 disable support for OpenGL ES 1.x API
@@ -1910,6 +1925,10 @@
--disable-gles2 disable support for OpenGL ES 2.x API
[default=enabled]
--enable-dri enable DRI modules [default=enabled]
+ --enable-gallium-extra-hud
+ enable HUD block/NIC I/O HUD stats support
+ [default=disabled]
+ --enable-lmsensors enable HUD lmsensor support [default=disabled]
--enable-dri3 enable DRI3 [default=auto]
--enable-glx[=dri|xlib|gallium-xlib]
enable the GLX library and choose an implementation
@@ -1920,7 +1939,7 @@
--disable-egl disable EGL library [default=enabled]
--enable-xa enable build of the XA X Acceleration API
[default=disabled]
- --enable-gbm enable gbm library [default=auto]
+ --enable-gbm enable gbm library [default=yes except cygwin]
--enable-nine enable build of the nine Direct3D9 API [default=no]
--enable-xvmc enable xvmc library [default=auto]
--enable-vdpau enable vdpau library [default=auto]
@@ -1931,18 +1950,14 @@
implementation [default=disabled]
--enable-gallium-tests Enable optional Gallium tests) [default=disabled]
--enable-shared-glapi Enable shared glapi for OpenGL [default=enabled]
- --disable-shader-cache Disable binary shader cache
- --enable-sysfs enable /sys PCI identification [default=disabled]
--disable-driglx-direct disable direct rendering in GLX and EGL for DRI
[default=auto]
- --enable-glx-tls enable TLS support in GLX [default=disabled]
+ --enable-glx-tls enable TLS support in GLX [default=enabled]
--enable-glx-read-only-text
Disable writable .text section on x86 (decreases
performance) [default=disabled]
--enable-gallium-llvm build gallium LLVM support [default=enabled on
x86/x86_64]
- --enable-llvm-shared-libs
- link with LLVM shared libraries [default=enabled]
--enable-valgrind Build mesa with valgrind support (default: auto)
Optional Packages:
@@ -1960,12 +1975,12 @@
specify GL library name [default=GL]
--with-osmesa-lib-name[=NAME]
specify OSMesa library name [default=OSMesa]
+ --with-llvm-prefix Prefix for LLVM installations in non-standard
+ locations
--with-gallium-drivers[=DIRS...]
comma delimited Gallium drivers list, e.g.
- "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl"
+ "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
[default=r300,r600,svga,swrast]
- --with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI
- choose SHA1 implementation
--with-dri-driverdir=DIR
directory for the DRI drivers [${libdir}/dri]
--with-dri-searchpath=DIRS...
@@ -1975,8 +1990,8 @@
comma delimited classic DRI drivers list, e.g.
"swrast,i965,radeon" [default=auto]
--with-vulkan-drivers[=DIRS...]
- comma delimited Vulkan drivers list, e.g. "intel"
- [default=no]
+ comma delimited Vulkan drivers list, e.g.
+ "intel,radeon" [default=no]
--with-vulkan-icddir=DIR
directory for the Vulkan driver icd files
[${datarootdir}/vulkan/icd.d]
@@ -1987,8 +2002,6 @@
--with-egl-platforms[=DIRS...]
comma delimited native platforms libEGL supports,
e.g. "x11,drm" [default=auto]
- --with-llvm-prefix Prefix for LLVM installations in non-standard
- locations
--with-xvmc-libdir=DIR directory for the XVMC libraries [default=${libdir}]
--with-vdpau-libdir=DIR directory for the VDPAU libraries
[default=${libdir}/vdpau]
@@ -2031,31 +2044,22 @@
C compiler flags for SELINUX, overriding pkg-config
SELINUX_LIBS
linker flags for SELINUX, overriding pkg-config
+ LIBELF_CFLAGS
+ C compiler flags for LIBELF, overriding pkg-config
+ LIBELF_LIBS linker flags for LIBELF, overriding pkg-config
GLVND_CFLAGS
C compiler flags for GLVND, overriding pkg-config
GLVND_LIBS linker flags for GLVND, overriding pkg-config
LIBDRM_CFLAGS
C compiler flags for LIBDRM, overriding pkg-config
LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
- LIBSHA1_CFLAGS
- C compiler flags for LIBSHA1, overriding pkg-config
- LIBSHA1_LIBS
- linker flags for LIBSHA1, overriding pkg-config
- OPENSSL_CFLAGS
- C compiler flags for OPENSSL, overriding pkg-config
- OPENSSL_LIBS
- linker flags for OPENSSL, overriding pkg-config
- LIBUDEV_CFLAGS
- C compiler flags for LIBUDEV, overriding pkg-config
- LIBUDEV_LIBS
- linker flags for LIBUDEV, overriding pkg-config
- XLIBGL_CFLAGS
- C compiler flags for XLIBGL, overriding pkg-config
- XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config
GLPROTO_CFLAGS
C compiler flags for GLPROTO, overriding pkg-config
GLPROTO_LIBS
linker flags for GLPROTO, overriding pkg-config
+ XLIBGL_CFLAGS
+ C compiler flags for XLIBGL, overriding pkg-config
+ XLIBGL_LIBS linker flags for XLIBGL, overriding pkg-config
DRI2PROTO_CFLAGS
C compiler flags for DRI2PROTO, overriding pkg-config
DRI2PROTO_LIBS
@@ -2092,6 +2096,9 @@
RADEON_CFLAGS
C compiler flags for RADEON, overriding pkg-config
RADEON_LIBS linker flags for RADEON, overriding pkg-config
+ AMDGPU_CFLAGS
+ C compiler flags for AMDGPU, overriding pkg-config
+ AMDGPU_LIBS linker flags for AMDGPU, overriding pkg-config
VL_CFLAGS C compiler flags for VL, overriding pkg-config
VL_LIBS linker flags for VL, overriding pkg-config
XVMC_CFLAGS C compiler flags for XVMC, overriding pkg-config
@@ -2103,9 +2110,6 @@
OMX_LIBS linker flags for OMX, overriding pkg-config
VA_CFLAGS C compiler flags for VA, overriding pkg-config
VA_LIBS linker flags for VA, overriding pkg-config
- LIBELF_CFLAGS
- C compiler flags for LIBELF, overriding pkg-config
- LIBELF_LIBS linker flags for LIBELF, overriding pkg-config
WAYLAND_SCANNER_CFLAGS
C compiler flags for WAYLAND_SCANNER, overriding pkg-config
WAYLAND_SCANNER_LIBS
@@ -2118,9 +2122,10 @@
C compiler flags for XCB_DRI2, overriding pkg-config
XCB_DRI2_LIBS
linker flags for XCB_DRI2, overriding pkg-config
- AMDGPU_CFLAGS
- C compiler flags for AMDGPU, overriding pkg-config
- AMDGPU_LIBS linker flags for AMDGPU, overriding pkg-config
+ ANDROID_CFLAGS
+ C compiler flags for ANDROID, overriding pkg-config
+ ANDROID_LIBS
+ linker flags for ANDROID, overriding pkg-config
NOUVEAU_CFLAGS
C compiler flags for NOUVEAU, overriding pkg-config
NOUVEAU_LIBS
@@ -2129,6 +2134,12 @@
C compiler flags for FREEDRENO, overriding pkg-config
FREEDRENO_LIBS
linker flags for FREEDRENO, overriding pkg-config
+ ETNAVIV_CFLAGS
+ C compiler flags for ETNAVIV, overriding pkg-config
+ ETNAVIV_LIBS
+ linker flags for ETNAVIV, overriding pkg-config
+ VC4_CFLAGS C compiler flags for VC4, overriding pkg-config
+ VC4_LIBS linker flags for VC4, overriding pkg-config
SIMPENROSE_CFLAGS
C compiler flags for SIMPENROSE, overriding pkg-config
SIMPENROSE_LIBS
@@ -2206,7 +2217,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Mesa configure 12.0.6
+Mesa configure 17.0.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2925,7 +2936,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Mesa $as_me 12.0.6, which was
+It was created by Mesa $as_me 17.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3900,7 +3911,7 @@
# Define the identity of the package.
PACKAGE='mesa'
- VERSION='12.0.6'
+ VERSION='17.0.7'
cat >>confdefs.h <<_ACEOF
@@ -5382,22 +5393,31 @@
LIBDRM_INTEL_REQUIRED=2.4.61
LIBDRM_NVVIEUX_REQUIRED=2.4.66
LIBDRM_NOUVEAU_REQUIRED=2.4.66
-LIBDRM_FREEDRENO_REQUIRED=2.4.67
+LIBDRM_FREEDRENO_REQUIRED=2.4.74
+LIBDRM_VC4_REQUIRED=2.4.69
+LIBDRM_ETNAVIV_REQUIRED=2.4.74
DRI2PROTO_REQUIRED=2.6
DRI3PROTO_REQUIRED=1.0
PRESENTPROTO_REQUIRED=1.0
-LIBUDEV_REQUIRED=151
GLPROTO_REQUIRED=1.4.14
LIBOMXIL_BELLAGIO_REQUIRED=0.0
LIBVA_REQUIRED=0.38.0
VDPAU_REQUIRED=1.1
-WAYLAND_REQUIRED=1.2.0
+WAYLAND_REQUIRED=1.11
XCB_REQUIRED=1.9.3
XCBDRI2_REQUIRED=1.8
XCBGLX_REQUIRED=1.8.1
XSHMFENCE_REQUIRED=1.1
XVMC_REQUIRED=1.0.6
-PYTHON_MAKO_REQUIRED=0.3.4
+PYTHON_MAKO_REQUIRED=0.8.0
+LIBSENSORS_REQUIRED=4.0.0
+
+LLVM_REQUIRED_GALLIUM=3.3.0
+LLVM_REQUIRED_OPENCL=3.6.0
+LLVM_REQUIRED_R600=3.6.0
+LLVM_REQUIRED_RADEONSI=3.6.0
+LLVM_REQUIRED_RADV=3.9.0
+LLVM_REQUIRED_SWR=3.6.0
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -18334,6 +18354,43 @@
fi
+# Extract the first word of "xxd", so it can be a program name with args.
+set dummy xxd; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_XXD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$XXD"; then
+ ac_cv_prog_XXD="$XXD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_XXD="xxd"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+XXD=$ac_cv_prog_XXD
+if test -n "$XXD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XXD" >&5
+$as_echo "$XXD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
for ac_prog in 'bison -y' byacc
do
@@ -19850,6 +19907,57 @@
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((alias))" >&5
+$as_echo_n "checking for __attribute__((alias))... " >&6; }
+if ${ax_cv_have_func_attribute_alias+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ int foo( void ) { return 0; }
+ int bar( void ) __attribute__((alias("foo")));
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest.err; then :
+ ax_cv_have_func_attribute_alias=no
+else
+ ax_cv_have_func_attribute_alias=yes
+fi
+else
+ ax_cv_have_func_attribute_alias=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_alias" >&5
+$as_echo "$ax_cv_have_func_attribute_alias" >&6; }
+
+ if test yes = $ax_cv_have_func_attribute_alias; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FUNC_ATTRIBUTE_ALIAS 1
+_ACEOF
+
+fi
+
+
+
+
if test "x$GEN_ASM_OFFSETS" = xyes; then
GEN_ASM_OFFSETS_TRUE=
GEN_ASM_OFFSETS_FALSE='#'
@@ -19994,15 +20102,12 @@
*-android)
android=yes
;;
-linux*|*-gnu*|gnu*)
+linux*|*-gnu*|gnu*|cygwin*)
DEFINES="$DEFINES -D_GNU_SOURCE"
;;
solaris*)
DEFINES="$DEFINES -DSVR4"
;;
-cygwin*)
- DEFINES="$DEFINES -D_XOPEN_SOURCE=700"
- ;;
esac
if test "x$android" = xyes; then
@@ -20084,16 +20189,9 @@
# Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
CFLAGS=$save_CFLAGS
- # Work around aliasing bugs - developers should comment this out
- CFLAGS="$CFLAGS -fno-strict-aliasing"
-
# We don't want floating-point math functions to set errno or trap
CFLAGS="$CFLAGS -fno-math-errno -fno-trapping-math"
- # gcc's builtin memcmp is slower than glibc's
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
- CFLAGS="$CFLAGS -fno-builtin-memcmp"
-
# Flags to help ensure that certain portions of the code -- and only those
# portions -- can be built with MSVC:
# - src/util, src/gallium/auxiliary, rc/gallium/drivers/llvmpipe, and
@@ -20177,12 +20275,8 @@
# Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
CXXFLAGS=$save_CXXFLAGS
- # Work around aliasing bugs - developers should comment this out
- CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
-
- # gcc's builtin memcmp is slower than glibc's
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
- CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
+ # We don't want floating-point math functions to set errno or trap
+ CXXFLAGS="$CXXFLAGS -fno-math-errno -fno-trapping-math"
fi
@@ -20236,6 +20330,30 @@
SSE41_CFLAGS=$SSE41_CFLAGS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int main() {
+ int n;
+ return __atomic_load_n(&n, __ATOMIC_ACQUIRE);
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ GCC_ATOMIC_BUILTINS_SUPPORTED=1
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = x1; then
+ DEFINES="$DEFINES -DUSE_GCC_ATOMIC_BUILTINS"
+fi
+ if test x$GCC_ATOMIC_BUILTINS_SUPPORTED = x1; then
+ GCC_ATOMIC_BUILTINS_SUPPORTED_TRUE=
+ GCC_ATOMIC_BUILTINS_SUPPORTED_FALSE='#'
+else
+ GCC_ATOMIC_BUILTINS_SUPPORTED_TRUE='#'
+ GCC_ATOMIC_BUILTINS_SUPPORTED_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if ${ac_cv_c_bigendian+:} false; then :
@@ -20520,14 +20638,10 @@
case "x$enable_static$enable_shared" in
xyesyes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build static and shared libraries, disabling shared" >&5
-$as_echo "$as_me: WARNING: Cannot build static and shared libraries, disabling shared" >&2;}
- enable_shared=no
+ as_fn_error $? "Cannot enable both static and shared. Building using --enable-shared is strongly recommended" "$LINENO" 5
;;
xnono)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot disable both static and shared libraries, enabling shared" >&5
-$as_echo "$as_me: WARNING: Cannot disable both static and shared libraries, enabling shared" >&2;}
- enable_shared=yes
+ as_fn_error $? "Cannot disable both static and shared. Building using --enable-shared is strongly recommended" "$LINENO" 5
;;
esac
@@ -21511,8 +21625,20 @@
if test "x$ax_pthread_ok" = xno; then
as_fn_error $? "Building mesa on this platform requires pthreads" "$LINENO" 5
fi
-test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
+if test "x$android" = xno; then
+ test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
+fi
+case "$host_os" in
+cygwin* )
+ pthread_stubs_possible="no"
+ ;;
+* )
+ pthread_stubs_possible="yes"
+ ;;
+esac
+
+if test "x$pthread_stubs_possible" = xyes; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREADSTUBS" >&5
@@ -21606,6 +21732,7 @@
fi
+fi
# Check whether --enable-selinux was given.
if test "${enable_selinux+set}" = set; then :
@@ -21801,983 +21928,924 @@
-# Check whether --enable-opengl was given.
-if test "${enable_opengl+set}" = set; then :
- enableval=$enable_opengl; enable_opengl="$enableval"
-else
- enable_opengl=yes
-fi
-
-# Check whether --enable-gles1 was given.
-if test "${enable_gles1+set}" = set; then :
- enableval=$enable_gles1; enable_gles1="$enableval"
+# Check whether --enable-llvm-shared-libs was given.
+if test "${enable_llvm_shared_libs+set}" = set; then :
+ enableval=$enable_llvm_shared_libs; enable_llvm_shared_libs="$enableval"
else
- enable_gles1=yes
+ enable_llvm_shared_libs=yes
fi
-# Check whether --enable-gles2 was given.
-if test "${enable_gles2+set}" = set; then :
- enableval=$enable_gles2; enable_gles2="$enableval"
-else
- enable_gles2=yes
-fi
-# Check whether --enable-dri was given.
-if test "${enable_dri+set}" = set; then :
- enableval=$enable_dri; enable_dri="$enableval"
+# Check whether --with-llvm-prefix was given.
+if test "${with_llvm_prefix+set}" = set; then :
+ withval=$with_llvm_prefix; llvm_prefix="$withval"
else
- enable_dri=yes
+ llvm_prefix=''
fi
-case "$host_os" in
-linux*)
- dri3_default=yes
- ;;
-*)
- dri3_default=no
- ;;
-esac
-if test "x$enable_dri" = xno; then
- dri3_default=no
-fi
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBELF" >&5
+$as_echo_n "checking for LIBELF... " >&6; }
-# Check whether --enable-dri3 was given.
-if test "${enable_dri3+set}" = set; then :
- enableval=$enable_dri3; enable_dri3="$enableval"
+if test -n "$LIBELF_CFLAGS"; then
+ pkg_cv_LIBELF_CFLAGS="$LIBELF_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- enable_dri3="$dri3_default"
+ pkg_failed=yes
fi
-
-# Check whether --enable-glx was given.
-if test "${enable_glx+set}" = set; then :
- enableval=$enable_glx; enable_glx="$enableval"
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBELF_LIBS"; then
+ pkg_cv_LIBELF_LIBS="$LIBELF_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- enable_glx=yes
+ pkg_failed=yes
fi
-
-# Check whether --enable-osmesa was given.
-if test "${enable_osmesa+set}" = set; then :
- enableval=$enable_osmesa; enable_osmesa="$enableval"
-else
- enable_osmesa=no
+ else
+ pkg_failed=untried
fi
-# Check whether --enable-gallium-osmesa was given.
-if test "${enable_gallium_osmesa+set}" = set; then :
- enableval=$enable_gallium_osmesa; enable_gallium_osmesa="$enableval"
-else
- enable_gallium_osmesa=no
-fi
-# Check whether --enable-egl was given.
-if test "${enable_egl+set}" = set; then :
- enableval=$enable_egl; enable_egl="$enableval"
-else
- enable_egl=yes
-fi
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
-# Check whether --enable-xa was given.
-if test "${enable_xa+set}" = set; then :
- enableval=$enable_xa; enable_xa="$enableval"
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- enable_xa=no
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libelf" 2>&1`
+ else
+ LIBELF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libelf" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBELF_PKG_ERRORS" >&5
-# Check whether --enable-gbm was given.
-if test "${enable_gbm+set}" = set; then :
- enableval=$enable_gbm; enable_gbm="$enableval"
+ have_libelf=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_libelf=no
else
- enable_gbm=auto
+ LIBELF_CFLAGS=$pkg_cv_LIBELF_CFLAGS
+ LIBELF_LIBS=$pkg_cv_LIBELF_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_libelf=yes
fi
-
-# Check whether --enable-nine was given.
-if test "${enable_nine+set}" = set; then :
- enableval=$enable_nine; enable_nine="$enableval"
+if test "x$have_libelf" = xno; then
+ LIBELF_LIBS=''
+ LIBELF_CFLAGS=''
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_memory in -lelf" >&5
+$as_echo_n "checking for elf_memory in -lelf... " >&6; }
+if ${ac_cv_lib_elf_elf_memory+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- enable_nine=no
-fi
-
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lelf $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
-# Check whether --enable-xvmc was given.
-if test "${enable_xvmc+set}" = set; then :
- enableval=$enable_xvmc; enable_xvmc="$enableval"
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char elf_memory ();
+int
+main ()
+{
+return elf_memory ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_elf_elf_memory=yes
else
- enable_xvmc=auto
+ ac_cv_lib_elf_elf_memory=no
fi
-
-# Check whether --enable-vdpau was given.
-if test "${enable_vdpau+set}" = set; then :
- enableval=$enable_vdpau; enable_vdpau="$enableval"
-else
- enable_vdpau=auto
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-
-# Check whether --enable-omx was given.
-if test "${enable_omx+set}" = set; then :
- enableval=$enable_omx; enable_omx="$enableval"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_memory" >&5
+$as_echo "$ac_cv_lib_elf_elf_memory" >&6; }
+if test "x$ac_cv_lib_elf_elf_memory" = xyes; then :
+ have_libelf=yes;LIBELF_LIBS=-lelf
else
- enable_omx=no
+ have_libelf=no
fi
-# Check whether --enable-va was given.
-if test "${enable_va+set}" = set; then :
- enableval=$enable_va; enable_va="$enableval"
-else
- enable_va=auto
-fi
-# Check whether --enable-opencl was given.
-if test "${enable_opencl+set}" = set; then :
- enableval=$enable_opencl; enable_opencl="$enableval"
-else
- enable_opencl=no
-fi
-# Check whether --enable-opencl_icd was given.
-if test "${enable_opencl_icd+set}" = set; then :
- enableval=$enable_opencl_icd; enable_opencl_icd="$enableval"
-else
- enable_opencl_icd=no
fi
+if test -z "$LLVM_CONFIG"; then
+ if test -n "$llvm_prefix"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $LLVM_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "$llvm_prefix/bin"
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --enable-gallium-tests was given.
-if test "${enable_gallium_tests+set}" = set; then :
- enableval=$enable_gallium_tests; enable_gallium_tests="$enableval"
+ ;;
+esac
+fi
+LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
else
- enable_gallium_tests=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Option for Gallium drivers
-
-# Keep this in sync with the --with-gallium-drivers help string default value
-GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
-
-
-# Check whether --with-gallium-drivers was given.
-if test "${with_gallium_drivers+set}" = set; then :
- withval=$with_gallium_drivers; with_gallium_drivers="$withval"
-else
- with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"
fi
+if test -z "$ac_cv_path_LLVM_CONFIG"; then
+ ac_pt_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_LLVM_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_LLVM_CONFIG="$ac_pt_LLVM_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in "$llvm_prefix/bin"
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-
-# Doing '--without-gallium-drivers' will set this variable to 'no'. Clear it
-# here so that the script doesn't choke on an unknown driver name later.
-case "$with_gallium_drivers" in
- yes) with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT" ;;
- no) with_gallium_drivers='' ;;
+ ;;
esac
-
-if test "x$enable_opengl" = xno -a \
- "x$enable_gles1" = xno -a \
- "x$enable_gles2" = xno -a \
- "x$enable_nine" = xno -a \
- "x$enable_xa" = 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
- as_fn_error $? "at least one API should be enabled" "$LINENO" 5
fi
-
-# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
-if test "x$enable_opengl" = xno -a \
- "x$enable_gles1" = xyes; then
- as_fn_error $? "Building OpenGL ES1 without OpenGL is not supported" "$LINENO" 5
+ac_pt_LLVM_CONFIG=$ac_cv_path_ac_pt_LLVM_CONFIG
+if test -n "$ac_pt_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_CONFIG" >&5
+$as_echo "$ac_pt_LLVM_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-if test "x$enable_opengl" = xno -a \
- "x$enable_gles2" = xyes; then
- as_fn_error $? "Building OpenGL ES2 without OpenGL is not supported" "$LINENO" 5
+ if test "x$ac_pt_LLVM_CONFIG" = x; then
+ LLVM_CONFIG="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_pt_LLVM_CONFIG
+ fi
+else
+ LLVM_CONFIG="$ac_cv_path_LLVM_CONFIG"
fi
- if test "x$enable_opengl" = xyes; then
- HAVE_OPENGL_TRUE=
- HAVE_OPENGL_FALSE='#'
-else
- HAVE_OPENGL_TRUE='#'
- HAVE_OPENGL_FALSE=
-fi
-
- if test "x$enable_gles1" = xyes; then
- HAVE_OPENGL_ES1_TRUE=
- HAVE_OPENGL_ES1_FALSE='#'
+ else
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- HAVE_OPENGL_ES1_TRUE='#'
- HAVE_OPENGL_ES1_FALSE=
-fi
+ case $LLVM_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
- if test "x$enable_gles2" = xyes; then
- HAVE_OPENGL_ES2_TRUE=
- HAVE_OPENGL_ES2_FALSE='#'
-else
- HAVE_OPENGL_ES2_TRUE='#'
- HAVE_OPENGL_ES2_FALSE=
+ ;;
+esac
fi
-
- if test "x$enable_opengl" = xyes -o \
- "x$enable_gles1" = xyes -o \
- "x$enable_gles2" = xyes; then
- NEED_OPENGL_COMMON_TRUE=
- NEED_OPENGL_COMMON_FALSE='#'
+LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
+if test -n "$LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
+$as_echo "$LLVM_CONFIG" >&6; }
else
- NEED_OPENGL_COMMON_TRUE='#'
- NEED_OPENGL_COMMON_FALSE=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# Validate GLX options
-if test "x$enable_glx" = xyes; then
- if test "x$enable_dri" = xyes; then
- enable_glx=dri
- elif test -n "$with_gallium_drivers"; then
- enable_glx=gallium-xlib
- else
- enable_glx=xlib
- fi
fi
-case "x$enable_glx" in
-xdri | xxlib | xgallium-xlib)
- # GLX requires OpenGL
- if test "x$enable_opengl" = xno; then
- as_fn_error $? "GLX cannot be built without OpenGL" "$LINENO" 5
- fi
+if test -z "$ac_cv_path_LLVM_CONFIG"; then
+ ac_pt_LLVM_CONFIG=$LLVM_CONFIG
+ # Extract the first word of "llvm-config", so it can be a program name with args.
+set dummy llvm-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_LLVM_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_LLVM_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_LLVM_CONFIG="$ac_pt_LLVM_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
- # Check individual dependencies
- case "x$enable_glx" in
- xdri)
- if test "x$enable_dri" = xno; then
- as_fn_error $? "DRI-based GLX requires DRI to be enabled" "$LINENO" 5
- fi
- ;;
- xxlib)
- if test "x$enable_dri" = xyes; then
- as_fn_error $? "Xlib-based GLX cannot be built with DRI enabled" "$LINENO" 5
- fi
- ;;
- xgallium-xlib )
- if test "x$enable_dri" = xyes; then
- as_fn_error $? "Xlib-based (Gallium) GLX cannot be built with DRI enabled" "$LINENO" 5
- fi
- if test -z "$with_gallium_drivers"; then
- as_fn_error $? "Xlib-based (Gallium) GLX cannot be built without Gallium enabled" "$LINENO" 5
- fi
- ;;
- esac
- ;;
-xno)
- ;;
-*)
- as_fn_error $? "Illegal value for --enable-glx: $enable_glx" "$LINENO" 5
- ;;
+ ;;
esac
-
- if test "x$enable_glx" != xno; then
- HAVE_GLX_TRUE=
- HAVE_GLX_FALSE='#'
-else
- HAVE_GLX_TRUE='#'
- HAVE_GLX_FALSE=
fi
-
- if test "x$enable_glx" = xdri; then
- HAVE_DRI_GLX_TRUE=
- HAVE_DRI_GLX_FALSE='#'
+ac_pt_LLVM_CONFIG=$ac_cv_path_ac_pt_LLVM_CONFIG
+if test -n "$ac_pt_LLVM_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_CONFIG" >&5
+$as_echo "$ac_pt_LLVM_CONFIG" >&6; }
else
- HAVE_DRI_GLX_TRUE='#'
- HAVE_DRI_GLX_FALSE=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- if test "x$enable_glx" = xxlib; then
- HAVE_XLIB_GLX_TRUE=
- HAVE_XLIB_GLX_FALSE='#'
+ if test "x$ac_pt_LLVM_CONFIG" = x; then
+ LLVM_CONFIG="no"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LLVM_CONFIG=$ac_pt_LLVM_CONFIG
+ fi
else
- HAVE_XLIB_GLX_TRUE='#'
- HAVE_XLIB_GLX_FALSE=
+ LLVM_CONFIG="$ac_cv_path_LLVM_CONFIG"
fi
- if test "x$enable_glx" = xgallium-xlib; then
- HAVE_GALLIUM_XLIB_GLX_TRUE=
- HAVE_GALLIUM_XLIB_GLX_FALSE='#'
-else
- HAVE_GALLIUM_XLIB_GLX_TRUE='#'
- HAVE_GALLIUM_XLIB_GLX_FALSE=
+ fi
fi
+llvm_add_component() {
+ new_llvm_component=$1
+ driver_name=$2
-# Check whether --enable-libglvnd was given.
-if test "${enable_libglvnd+set}" = set; then :
- enableval=$enable_libglvnd; enable_libglvnd="$enableval"
-else
- enable_libglvnd=no
-fi
+ if $LLVM_CONFIG --components | grep -iqw $new_llvm_component ; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ${new_llvm_component}"
+ else
+ as_fn_error $? "LLVM component '$new_llvm_component' not enabled in your LLVM build. Required by $driver_name." "$LINENO" 5
+ fi
+}
- if test "x$enable_libglvnd" = xyes; then
- USE_LIBGLVND_GLX_TRUE=
- USE_LIBGLVND_GLX_FALSE='#'
-else
- USE_LIBGLVND_GLX_TRUE='#'
- USE_LIBGLVND_GLX_FALSE=
-fi
+llvm_add_default_components() {
+ driver_name=$1
-if test "x$enable_libglvnd" = xyes ; then
- case "x$enable_glx" in
- xno)
- as_fn_error $? "cannot build libglvnd without GLX" "$LINENO" 5
- ;;
- xxlib | xgallium-xlib )
- as_fn_error $? "cannot build libgvnd when Xlib-GLX or Gallium-Xlib-GLX is enabled" "$LINENO" 5
- ;;
- xdri)
- ;;
- esac
+ # Required default components
+ llvm_add_component "bitwriter" $driver_name
+ llvm_add_component "engine" $driver_name
+ llvm_add_component "mcdisassembler" $driver_name
+ llvm_add_component "mcjit" $driver_name
+ # Optional default components
+ if $LLVM_CONFIG --components | grep -iqw inteljitevents ; then
+ LLVM_COMPONENTS="$LLVM_COMPONENTS inteljitevents"
+ fi
+}
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLVND" >&5
-$as_echo_n "checking for GLVND... " >&6; }
+llvm_add_target() {
+ new_llvm_target=$1
+ driver_name=$2
+
+ if $LLVM_CONFIG --targets-built | grep -iqw $new_llvm_target ; then
+ llvm_add_component $new_llvm_target $driver_name
+ else
+ as_fn_error $? "LLVM target '$new_llvm_target' not enabled in your LLVM build. Required by $driver_name." "$LINENO" 5
+ fi
+}
+
+# Call this inside ` ` to get the return value.
+# $1 is the llvm-config command with arguments.
+strip_unwanted_llvm_flags() {
+ # Use \> (marks the end of the word)
+ echo " `$1`" | sed \
+ -e 's/\s\+-m\S*//g' \
+ -e 's/\s\+-DNDEBUG\>//g' \
+ -e 's/\s\+-D_GNU_SOURCE\>//g' \
+ -e 's/\s\+-pedantic\>//g' \
+ -e 's/\s\+-W\S*//g' \
+ -e 's/\s\+-O\S*//g' \
+ -e 's/\s\+-g\S*//g' \
+ -e 's/-fno-rtti\>/-Fno-rtti/g' \
+ -e 's/\s\+-f\S*//g' \
+ -e 's/-Fno-rtti\>/-fno-rtti/g' \
+ -e 's/^ //'
+}
+
+llvm_set_environment_variables() {
+ if test "x$LLVM_CONFIG" != xno; then
+ LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[0-9.]+'`
+ LLVM_BINDIR=`$LLVM_CONFIG --bindir`
+ LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
+ LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
+ LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
+
+ # We need to respect LLVM_CPPFLAGS when compiling LLVM headers.
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $LLVM_CPPFLAGS"
+
+ if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_MAJOR" "LLVM_VERSION_MAJOR" "#include \"${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h\""; then :
-if test -n "$GLVND_CFLAGS"; then
- pkg_cv_GLVND_CFLAGS="$GLVND_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglvnd >= 0.1.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libglvnd >= 0.1.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_GLVND_CFLAGS=`$PKG_CONFIG --cflags "libglvnd >= 0.1.0" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$GLVND_LIBS"; then
- pkg_cv_GLVND_LIBS="$GLVND_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglvnd >= 0.1.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libglvnd >= 0.1.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_GLVND_LIBS=`$PKG_CONFIG --libs "libglvnd >= 0.1.0" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
fi
+ if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_MINOR" "LLVM_VERSION_MINOR" "#include \"${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h\""; then :
+fi
-if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_PATCH" "LLVM_VERSION_PATCH" "#include \"${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h\""; then :
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
fi
- if test $_pkg_short_errors_supported = yes; then
- GLVND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libglvnd >= 0.1.0" 2>&1`
- else
- GLVND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libglvnd >= 0.1.0" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$GLVND_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libglvnd >= 0.1.0) were not met:
-$GLVND_PKG_ERRORS
+ CFLAGS="$save_CFLAGS"
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
+ # Only needed for LLVM < 3.6.0
+ if test -z "$LLVM_VERSION_PATCH"; then
+ LLVM_VERSION_PATCH=0
+ fi
-Alternatively, you may set the environment variables GLVND_CFLAGS
-and GLVND_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
+ if test "$LLVM_VERSION_MINOR" -lt 10; then
+ LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
+ else
+ LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}"
+ fi
-Alternatively, you may set the environment variables GLVND_CFLAGS
-and GLVND_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
+ FOUND_LLVM=yes
+ else
+ FOUND_LLVM=no
+ LLVM_VERSION_INT=0
+ fi
+}
-To get pkg-config, see .
-See \`config.log' for more details" "$LINENO" 5; }
-else
- GLVND_CFLAGS=$pkg_cv_GLVND_CFLAGS
- GLVND_LIBS=$pkg_cv_GLVND_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+require_llvm() {
+ if test "x$enable_gallium_llvm" != "xyes"; then
+ as_fn_error $? "--enable-gallium-llvm is required when building $1" "$LINENO" 5
+ fi
+}
-fi
- DEFINES="${DEFINES} -DUSE_LIBGLVND_GLX=1"
- DEFAULT_GL_LIB_NAME=GLX_mesa
-fi
+llvm_require_version() {
+ require_llvm $2
-# Check for libdrm
+ llvm_target_version_major=`echo $1 | cut -d. -f1 | egrep -o '^[0-9]+'`
+ llvm_target_version_minor=`echo $1 | cut -d. -f2 | egrep -o '^[0-9]+'`
+ llvm_target_version_patch=`echo $1 | cut -d. -f3 | egrep -o '^[0-9]+'`
+
+ if test "$LLVM_VERSION_MAJOR" -gt "$llvm_target_version_major"; then
+ # major > required major
+ # --> OK
+ return
+ fi
+
+ if test "$LLVM_VERSION_MAJOR" -eq "$llvm_target_version_major"; then
+ if test "$LLVM_VERSION_MINOR" -gt "$llvm_target_version_minor"; then
+ # major = required major and
+ # minor > required minor
+ # --> OK
+ return
+ else
+ if test "$LLVM_VERSION_MINOR" -eq "$llvm_target_version_minor"; then
+ if test "$LLVM_VERSION_PATCH" -ge "$llvm_target_version_patch"; then
+ # major = required major and
+ # minor = required minor and
+ # patch >= required patch
+ # --> OK
+ return
+ fi
+ fi
+ fi
+ fi
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
-$as_echo_n "checking for LIBDRM... " >&6; }
+ as_fn_error $? "LLVM $1 or newer is required for $2" "$LINENO" 5
+}
-if test -n "$LIBDRM_CFLAGS"; then
- pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$LIBDRM_LIBS"; then
- pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
+radeon_llvm_check() {
+ if test ${LLVM_VERSION_INT} -lt 307; then
+ amdgpu_llvm_target_name='r600'
+ else
+ amdgpu_llvm_target_name='amdgpu'
+ fi
+
+ llvm_require_version $*
+ llvm_add_target $amdgpu_llvm_target_name $2
+ llvm_add_default_components $2
+ llvm_add_component "bitreader" $2
+ llvm_add_component "ipo" $2
-if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ NEED_RADEON_LLVM=yes
+ if test "x$have_libelf" != xyes; then
+ as_fn_error $? "$1 requires libelf when using llvm" "$LINENO" 5
+ fi
+}
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm >= $LIBDRM_REQUIRED" 2>&1`
- else
- LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= $LIBDRM_REQUIRED" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBDRM_PKG_ERRORS" >&5
+llvm_set_environment_variables
- have_libdrm=no
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- have_libdrm=no
-else
- LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
- LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_libdrm=yes
-fi
-if test "x$have_libdrm" = xyes; then
- DEFINES="$DEFINES -DHAVE_LIBDRM"
-fi
-# Select which platform-dependent DRI code gets built
-case "$host_os" in
-darwin*)
- dri_platform='apple' ;;
-gnu*|cygwin*)
- dri_platform='none' ;;
-*)
- dri_platform='drm' ;;
-esac
-if test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes; then
- have_drisw_kms='yes'
-fi
- if test "x$enable_dri" = xyes ; then
- HAVE_DRICOMMON_TRUE=
- HAVE_DRICOMMON_FALSE='#'
+
+
+
+
+
+
+
+
+# Check whether --enable-opengl was given.
+if test "${enable_opengl+set}" = set; then :
+ enableval=$enable_opengl; enable_opengl="$enableval"
else
- HAVE_DRICOMMON_TRUE='#'
- HAVE_DRICOMMON_FALSE=
+ enable_opengl=yes
fi
- if test "x$enable_dri" = xyes ; then
- HAVE_DRISW_TRUE=
- HAVE_DRISW_FALSE='#'
+# Check whether --enable-gles1 was given.
+if test "${enable_gles1+set}" = set; then :
+ enableval=$enable_gles1; enable_gles1="$enableval"
else
- HAVE_DRISW_TRUE='#'
- HAVE_DRISW_FALSE=
+ enable_gles1=yes
fi
- if test "x$have_drisw_kms" = xyes ; then
- HAVE_DRISW_KMS_TRUE=
- HAVE_DRISW_KMS_FALSE='#'
+# Check whether --enable-gles2 was given.
+if test "${enable_gles2+set}" = set; then :
+ enableval=$enable_gles2; enable_gles2="$enableval"
else
- HAVE_DRISW_KMS_TRUE='#'
- HAVE_DRISW_KMS_FALSE=
+ enable_gles2=yes
fi
- if test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes ; then
- HAVE_DRI2_TRUE=
- HAVE_DRI2_FALSE='#'
+
+# Check whether --enable-dri was given.
+if test "${enable_dri+set}" = set; then :
+ enableval=$enable_dri; enable_dri="$enableval"
else
- HAVE_DRI2_TRUE='#'
- HAVE_DRI2_FALSE=
+ enable_dri=yes
fi
- if test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes ; then
- HAVE_DRI3_TRUE=
- HAVE_DRI3_FALSE='#'
+
+# Check whether --enable-gallium-extra-hud was given.
+if test "${enable_gallium_extra_hud+set}" = set; then :
+ enableval=$enable_gallium_extra_hud; enable_gallium_extra_hud="$enableval"
else
- HAVE_DRI3_TRUE='#'
- HAVE_DRI3_FALSE=
+ enable_gallium_extra_hud=no
fi
- if test "x$enable_dri" = xyes -a "x$dri_platform" = xapple ; then
- HAVE_APPLEDRI_TRUE=
- HAVE_APPLEDRI_FALSE='#'
+ if test "x$enable_gallium_extra_hud" = xyes; then
+ HAVE_GALLIUM_EXTRA_HUD_TRUE=
+ HAVE_GALLIUM_EXTRA_HUD_FALSE='#'
else
- HAVE_APPLEDRI_TRUE='#'
- HAVE_APPLEDRI_FALSE=
+ HAVE_GALLIUM_EXTRA_HUD_TRUE='#'
+ HAVE_GALLIUM_EXTRA_HUD_FALSE=
fi
+if test "x$enable_gallium_extra_hud" = xyes ; then
+ DEFINES="${DEFINES} -DHAVE_GALLIUM_EXTRA_HUD=1"
+fi
-# Check whether --enable-shared-glapi was given.
-if test "${enable_shared_glapi+set}" = set; then :
- enableval=$enable_shared_glapi; enable_shared_glapi="$enableval"
+#TODO: no pkgconfig .pc available for libsensors.
+#PKG_CHECK_MODULES([LIBSENSORS], [libsensors >= $LIBSENSORS_REQUIRED], [enable_lmsensors=yes], [enable_lmsensors=no])
+# Check whether --enable-lmsensors was given.
+if test "${enable_lmsensors+set}" = set; then :
+ enableval=$enable_lmsensors; enable_lmsensors="$enableval"
else
- enable_shared_glapi=yes
+ enable_lmsensors=no
fi
-
-case "x$enable_opengl$enable_gles1$enable_gles2" in
-x*yes*yes*)
- if test "x$enable_shared_glapi" = xno; then
- as_fn_error $? "shared GLAPI required when building two or more of
- the following APIs - opengl, gles1 gles2" "$LINENO" 5
- fi
- ;;
-esac
-
- if test "x$enable_shared_glapi" = xyes; then
- HAVE_SHARED_GLAPI_TRUE=
- HAVE_SHARED_GLAPI_FALSE='#'
+ if test "x$enable_lmsensors" = xyes; then
+ HAVE_LIBSENSORS_TRUE=
+ HAVE_LIBSENSORS_FALSE='#'
else
- HAVE_SHARED_GLAPI_TRUE='#'
- HAVE_SHARED_GLAPI_FALSE=
+ HAVE_LIBSENSORS_TRUE='#'
+ HAVE_LIBSENSORS_FALSE=
fi
-
-# Build the pipe-drivers as separate libraries/modules.
-# Do not touch this unless you know what you are doing.
-# XXX: Expose via configure option ?
-enable_shared_pipe_drivers=no
-
-
-if test "x$enable_gallium_osmesa" = xyes; then
- if ! echo "$with_gallium_drivers" | grep -q 'swrast'; then
- as_fn_error $? "gallium_osmesa requires the gallium swrast driver" "$LINENO" 5
- fi
- if test "x$enable_osmesa" = xyes; then
- as_fn_error $? "Cannot enable both classic and Gallium OSMesa implementations" "$LINENO" 5
- fi
+if test "x$enable_lmsensors" = xyes ; then
+ DEFINES="${DEFINES} -DHAVE_LIBSENSORS=1"
+ LIBSENSORS_LIBS="-lsensors"
+else
+ LIBSENSORS_LIBS=""
fi
-
-# SHA1 hashing
-
-# Check whether --with-sha1 was given.
-if test "${with_sha1+set}" = set; then :
- withval=$with_sha1;
-fi
-
-case "x$with_sha1" in
-x | xlibc | xlibmd | xlibnettle | xlibgcrypt | xlibcrypto | xlibsha1 | xCommonCrypto | xCryptoAPI)
- ;;
+case "$host_os" in
+linux*)
+ dri3_default=yes
+ ;;
*)
- as_fn_error $? "Illegal value for --with-sha1: $with_sha1" "$LINENO" 5
+ dri3_default=no
+ ;;
esac
-ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init"
-if test "x$ac_cv_func_SHA1Init" = xyes; then :
- HAVE_SHA1_IN_LIBC=yes
+if test "x$enable_dri" = xno; then
+ dri3_default=no
fi
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
- with_sha1=libc
-fi
-if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
- as_fn_error $? "sha1 in libc requested but not found" "$LINENO" 5
+# Check whether --enable-dri3 was given.
+if test "${enable_dri3+set}" = set; then :
+ enableval=$enable_dri3; enable_dri3="$enableval"
+else
+ enable_dri3="$dri3_default"
fi
-if test "x$with_sha1" = xlibc; then
-$as_echo "#define HAVE_SHA1_IN_LIBC 1" >>confdefs.h
-
- SHA1_LIBS=""
+# Check whether --enable-glx was given.
+if test "${enable_glx+set}" = set; then :
+ enableval=$enable_glx; enable_glx="$enableval"
+else
+ enable_glx=yes
fi
-ac_fn_c_check_func "$LINENO" "CC_SHA1_Init" "ac_cv_func_CC_SHA1_Init"
-if test "x$ac_cv_func_CC_SHA1_Init" = xyes; then :
- HAVE_SHA1_IN_COMMONCRYPTO=yes
+
+# Check whether --enable-osmesa was given.
+if test "${enable_osmesa+set}" = set; then :
+ enableval=$enable_osmesa; enable_osmesa="$enableval"
+else
+ enable_osmesa=no
fi
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
- with_sha1=CommonCrypto
+# Check whether --enable-gallium-osmesa was given.
+if test "${enable_gallium_osmesa+set}" = set; then :
+ enableval=$enable_gallium_osmesa; enable_gallium_osmesa="$enableval"
+else
+ enable_gallium_osmesa=no
fi
-if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
- as_fn_error $? "CommonCrypto requested but not found" "$LINENO" 5
+
+# Check whether --enable-egl was given.
+if test "${enable_egl+set}" = set; then :
+ enableval=$enable_egl; enable_egl="$enableval"
+else
+ enable_egl=yes
fi
-if test "x$with_sha1" = xCommonCrypto; then
-$as_echo "#define HAVE_SHA1_IN_COMMONCRYPTO 1" >>confdefs.h
- SHA1_LIBS=""
-fi
-ac_fn_c_check_header_compile "$LINENO" "wincrypt.h" "ac_cv_header_wincrypt_h" "#include
-"
-if test "x$ac_cv_header_wincrypt_h" = xyes; then :
- HAVE_SHA1_IN_CRYPTOAPI=yes
+# Check whether --enable-xa was given.
+if test "${enable_xa+set}" = set; then :
+ enableval=$enable_xa; enable_xa="$enableval"
+else
+ enable_xa=no
fi
-
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
- with_sha1=CryptoAPI
+# Check whether --enable-gbm was given.
+if test "${enable_gbm+set}" = set; then :
+ enableval=$enable_gbm; enable_gbm="$enableval"
+else
+ case "$host_os" in
+ cygwin*)
+ enable_gbm=no
+ ;;
+ *)
+ enable_gbm=yes
+ ;;
+ esac
fi
-if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
- as_fn_error $? "CryptoAPI requested but not found" "$LINENO" 5
+
+# Check whether --enable-nine was given.
+if test "${enable_nine+set}" = set; then :
+ enableval=$enable_nine; enable_nine="$enableval"
+else
+ enable_nine=no
fi
-if test "x$with_sha1" = xCryptoAPI; then
-$as_echo "#define HAVE_SHA1_IN_CRYPTOAPI 1" >>confdefs.h
- SHA1_LIBS=""
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5
-$as_echo_n "checking for SHA1Init in -lmd... " >&6; }
-if ${ac_cv_lib_md_SHA1Init+:} false; then :
- $as_echo_n "(cached) " >&6
+# Check whether --enable-xvmc was given.
+if test "${enable_xvmc+set}" = set; then :
+ enableval=$enable_xvmc; enable_xvmc="$enableval"
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmd $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ enable_xvmc=auto
+fi
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SHA1Init ();
-int
-main ()
-{
-return SHA1Init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_md_SHA1Init=yes
+# Check whether --enable-vdpau was given.
+if test "${enable_vdpau+set}" = set; then :
+ enableval=$enable_vdpau; enable_vdpau="$enableval"
else
- ac_cv_lib_md_SHA1Init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5
-$as_echo "$ac_cv_lib_md_SHA1Init" >&6; }
-if test "x$ac_cv_lib_md_SHA1Init" = xyes; then :
- HAVE_LIBMD=yes
+ enable_vdpau=auto
fi
-if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
- with_sha1=libmd
-fi
-if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
- as_fn_error $? "libmd requested but not found" "$LINENO" 5
+# Check whether --enable-omx was given.
+if test "${enable_omx+set}" = set; then :
+ enableval=$enable_omx; enable_omx="$enableval"
+else
+ enable_omx=no
fi
-if test "x$with_sha1" = xlibmd; then
-
-$as_echo "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h
- SHA1_LIBS=-lmd
+# Check whether --enable-va was given.
+if test "${enable_va+set}" = set; then :
+ enableval=$enable_va; enable_va="$enableval"
+else
+ enable_va=auto
fi
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSHA1" >&5
-$as_echo_n "checking for LIBSHA1... " >&6; }
-
-if test -n "$LIBSHA1_CFLAGS"; then
- pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
+# Check whether --enable-opencl was given.
+if test "${enable_opencl+set}" = set; then :
+ enableval=$enable_opencl; enable_opencl="$enableval"
else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
+ enable_opencl=no
fi
-if test -n "$LIBSHA1_LIBS"; then
- pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
+
+# Check whether --enable-opencl_icd was given.
+if test "${enable_opencl_icd+set}" = set; then :
+ enableval=$enable_opencl_icd; enable_opencl_icd="$enableval"
else
- pkg_failed=yes
+ enable_opencl_icd=no
fi
- else
- pkg_failed=untried
+
+
+# Check whether --enable-gallium-tests was given.
+if test "${enable_gallium_tests+set}" = set; then :
+ enableval=$enable_gallium_tests; enable_gallium_tests="$enableval"
+else
+ enable_gallium_tests=no
fi
+# Option for Gallium drivers
-if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+# Keep this in sync with the --with-gallium-drivers help string default value
+GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsha1" 2>&1`
- else
- LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsha1" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBSHA1_PKG_ERRORS" >&5
- HAVE_LIBSHA1=no
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- HAVE_LIBSHA1=no
+# Check whether --with-gallium-drivers was given.
+if test "${with_gallium_drivers+set}" = set; then :
+ withval=$with_gallium_drivers; with_gallium_drivers="$withval"
else
- LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS
- LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_LIBSHA1=yes
-fi
-if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
- with_sha1=libsha1
+ with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"
fi
-if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
- as_fn_error $? "libsha1 requested but not found" "$LINENO" 5
+
+
+# Doing '--without-gallium-drivers' will set this variable to 'no'. Clear it
+# here so that the script doesn't choke on an unknown driver name later.
+case "$with_gallium_drivers" in
+ yes) with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT" ;;
+ no) with_gallium_drivers='' ;;
+esac
+
+if test "x$enable_opengl" = xno -a \
+ "x$enable_gles1" = xno -a \
+ "x$enable_gles2" = xno -a \
+ "x$enable_nine" = xno -a \
+ "x$enable_xa" = 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
+ as_fn_error $? "at least one API should be enabled" "$LINENO" 5
fi
-if test "x$with_sha1" = xlibsha1; then
-$as_echo "#define HAVE_SHA1_IN_LIBSHA1 1" >>confdefs.h
+# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
+if test "x$enable_opengl" = xno -a \
+ "x$enable_gles1" = xyes; then
+ as_fn_error $? "Building OpenGL ES1 without OpenGL is not supported" "$LINENO" 5
+fi
- SHA1_LIBS=-lsha1
+if test "x$enable_opengl" = xno -a \
+ "x$enable_gles2" = xyes; then
+ as_fn_error $? "Building OpenGL ES2 without OpenGL is not supported" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5
-$as_echo_n "checking for nettle_sha1_init in -lnettle... " >&6; }
-if ${ac_cv_lib_nettle_nettle_sha1_init+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lnettle $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char nettle_sha1_init ();
-int
-main ()
-{
-return nettle_sha1_init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nettle_nettle_sha1_init=yes
+ if test "x$enable_opengl" = xyes; then
+ HAVE_OPENGL_TRUE=
+ HAVE_OPENGL_FALSE='#'
else
- ac_cv_lib_nettle_nettle_sha1_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ HAVE_OPENGL_TRUE='#'
+ HAVE_OPENGL_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_sha1_init" >&5
-$as_echo "$ac_cv_lib_nettle_nettle_sha1_init" >&6; }
-if test "x$ac_cv_lib_nettle_nettle_sha1_init" = xyes; then :
- HAVE_LIBNETTLE=yes
+
+ if test "x$enable_gles1" = xyes; then
+ HAVE_OPENGL_ES1_TRUE=
+ HAVE_OPENGL_ES1_FALSE='#'
+else
+ HAVE_OPENGL_ES1_TRUE='#'
+ HAVE_OPENGL_ES1_FALSE=
fi
-if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
- with_sha1=libnettle
+ if test "x$enable_gles2" = xyes; then
+ HAVE_OPENGL_ES2_TRUE=
+ HAVE_OPENGL_ES2_FALSE='#'
+else
+ HAVE_OPENGL_ES2_TRUE='#'
+ HAVE_OPENGL_ES2_FALSE=
fi
-if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
- as_fn_error $? "libnettle requested but not found" "$LINENO" 5
+
+ if test "x$enable_opengl" = xyes -o \
+ "x$enable_gles1" = xyes -o \
+ "x$enable_gles2" = xyes; then
+ NEED_OPENGL_COMMON_TRUE=
+ NEED_OPENGL_COMMON_FALSE='#'
+else
+ NEED_OPENGL_COMMON_TRUE='#'
+ NEED_OPENGL_COMMON_FALSE=
fi
-if test "x$with_sha1" = xlibnettle; then
-$as_echo "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h
- SHA1_LIBS=-lnettle
+# Validate GLX options
+if test "x$enable_glx" = xyes; then
+ if test "x$enable_dri" = xyes; then
+ enable_glx=dri
+ elif test -n "$with_gallium_drivers"; then
+ enable_glx=gallium-xlib
+ else
+ enable_glx=xlib
+ fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5
-$as_echo_n "checking for gcry_md_open in -lgcrypt... " >&6; }
-if ${ac_cv_lib_gcrypt_gcry_md_open+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgcrypt $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+case "x$enable_glx" in
+xdri | xxlib | xgallium-xlib)
+ # GLX requires OpenGL
+ if test "x$enable_opengl" = xno; then
+ as_fn_error $? "GLX cannot be built without OpenGL" "$LINENO" 5
+ fi
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gcry_md_open ();
-int
-main ()
-{
-return gcry_md_open ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gcrypt_gcry_md_open=yes
+ # Check individual dependencies
+ case "x$enable_glx" in
+ xdri)
+ if test "x$enable_dri" = xno; then
+ as_fn_error $? "DRI-based GLX requires DRI to be enabled" "$LINENO" 5
+ fi
+ ;;
+ xxlib)
+ if test "x$enable_dri" = xyes; then
+ as_fn_error $? "Xlib-based GLX cannot be built with DRI enabled" "$LINENO" 5
+ fi
+ ;;
+ xgallium-xlib )
+ if test "x$enable_dri" = xyes; then
+ as_fn_error $? "Xlib-based (Gallium) GLX cannot be built with DRI enabled" "$LINENO" 5
+ fi
+ if test -z "$with_gallium_drivers"; then
+ as_fn_error $? "Xlib-based (Gallium) GLX cannot be built without Gallium enabled" "$LINENO" 5
+ fi
+ ;;
+ esac
+ ;;
+xno)
+ ;;
+*)
+ as_fn_error $? "Illegal value for --enable-glx: $enable_glx" "$LINENO" 5
+ ;;
+esac
+
+ if test "x$enable_glx" != xno; then
+ HAVE_GLX_TRUE=
+ HAVE_GLX_FALSE='#'
else
- ac_cv_lib_gcrypt_gcry_md_open=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ HAVE_GLX_TRUE='#'
+ HAVE_GLX_FALSE=
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5
-$as_echo "$ac_cv_lib_gcrypt_gcry_md_open" >&6; }
-if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes; then :
- HAVE_LIBGCRYPT=yes
+
+ if test "x$enable_glx" = xdri; then
+ HAVE_DRI_GLX_TRUE=
+ HAVE_DRI_GLX_FALSE='#'
+else
+ HAVE_DRI_GLX_TRUE='#'
+ HAVE_DRI_GLX_FALSE=
fi
-if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
- with_sha1=libgcrypt
+ if test "x$enable_glx" = xxlib; then
+ HAVE_XLIB_GLX_TRUE=
+ HAVE_XLIB_GLX_FALSE='#'
+else
+ HAVE_XLIB_GLX_TRUE='#'
+ HAVE_XLIB_GLX_FALSE=
fi
-if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
- as_fn_error $? "libgcrypt requested but not found" "$LINENO" 5
+
+ if test "x$enable_glx" = xgallium-xlib; then
+ HAVE_GALLIUM_XLIB_GLX_TRUE=
+ HAVE_GALLIUM_XLIB_GLX_FALSE='#'
+else
+ HAVE_GALLIUM_XLIB_GLX_TRUE='#'
+ HAVE_GALLIUM_XLIB_GLX_FALSE=
fi
-if test "x$with_sha1" = xlibgcrypt; then
-$as_echo "#define HAVE_SHA1_IN_LIBGCRYPT 1" >>confdefs.h
- SHA1_LIBS=-lgcrypt
-fi
-# We don't need all of the OpenSSL libraries, just libcrypto
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5
-$as_echo_n "checking for SHA1_Init in -lcrypto... " >&6; }
-if ${ac_cv_lib_crypto_SHA1_Init+:} false; then :
- $as_echo_n "(cached) " >&6
+# Check whether --enable-libglvnd was given.
+if test "${enable_libglvnd+set}" = set; then :
+ enableval=$enable_libglvnd; enable_libglvnd="$enableval"
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
+ enable_libglvnd=no
+fi
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SHA1_Init ();
-int
-main ()
-{
-return SHA1_Init ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_crypto_SHA1_Init=yes
+ if test "x$enable_libglvnd" = xyes; then
+ USE_LIBGLVND_GLX_TRUE=
+ USE_LIBGLVND_GLX_FALSE='#'
else
- ac_cv_lib_crypto_SHA1_Init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5
-$as_echo "$ac_cv_lib_crypto_SHA1_Init" >&6; }
-if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes; then :
- HAVE_LIBCRYPTO=yes
+ USE_LIBGLVND_GLX_TRUE='#'
+ USE_LIBGLVND_GLX_FALSE=
fi
+if test "x$enable_libglvnd" = xyes ; then
+ case "x$enable_glx" in
+ xno)
+ as_fn_error $? "cannot build libglvnd without GLX" "$LINENO" 5
+ ;;
+ xxlib | xgallium-xlib )
+ as_fn_error $? "cannot build libgvnd when Xlib-GLX or Gallium-Xlib-GLX is enabled" "$LINENO" 5
+ ;;
+ xdri)
+ ;;
+ esac
+
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
-$as_echo_n "checking for OPENSSL... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLVND" >&5
+$as_echo_n "checking for GLVND... " >&6; }
-if test -n "$OPENSSL_CFLAGS"; then
- pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+if test -n "$GLVND_CFLAGS"; then
+ pkg_cv_GLVND_CFLAGS="$GLVND_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
- ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglvnd >= 0.1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libglvnd >= 0.1.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
+ pkg_cv_GLVND_CFLAGS=`$PKG_CONFIG --cflags "libglvnd >= 0.1.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -22785,16 +22853,16 @@
else
pkg_failed=untried
fi
-if test -n "$OPENSSL_LIBS"; then
- pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+if test -n "$GLVND_LIBS"; then
+ pkg_cv_GLVND_LIBS="$GLVND_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
- ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libglvnd >= 0.1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libglvnd >= 0.1.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
+ pkg_cv_GLVND_LIBS=`$PKG_CONFIG --libs "libglvnd >= 0.1.0" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -22815,102 +22883,65 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
+ GLVND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libglvnd >= 0.1.0" 2>&1`
else
- OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
+ GLVND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libglvnd >= 0.1.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$OPENSSL_PKG_ERRORS" >&5
+ echo "$GLVND_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libglvnd >= 0.1.0) were not met:
+
+$GLVND_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
- HAVE_OPENSSL_PKC=no
+Alternatively, you may set the environment variables GLVND_CFLAGS
+and GLVND_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- HAVE_OPENSSL_PKC=no
-else
- OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
- OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_OPENSSL_PKC=yes
-fi
-if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
- if test "x$with_sha1" = x; then
- with_sha1=libcrypto
- fi
-else
- if test "x$with_sha1" = xlibcrypto; then
- as_fn_error $? "OpenSSL libcrypto requested but not found" "$LINENO" 5
- fi
-fi
-if test "x$with_sha1" = xlibcrypto; then
- if test "x$HAVE_LIBCRYPTO" = xyes; then
- SHA1_LIBS=-lcrypto
- else
- SHA1_LIBS="$OPENSSL_LIBS"
- SHA1_CFLAGS="$OPENSSL_CFLAGS"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1 implementation" >&5
-$as_echo_n "checking for SHA1 implementation... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sha1" >&5
-$as_echo "$with_sha1" >&6; }
-
-
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
-# Enable a define for SHA1
-if test "x$with_sha1" != "x"; then
- DEFINES="$DEFINES -DHAVE_SHA1"
-fi
+Alternatively, you may set the environment variables GLVND_CFLAGS
+and GLVND_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
-# Allow user to configure out the shader-cache feature
-# Check whether --enable-shader-cache was given.
-if test "${enable_shader_cache+set}" = set; then :
- enableval=$enable_shader_cache; enable_shader_cache="$enableval"
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
else
- if test "x$with_sha1" != "x"; then
- enable_shader_cache=yes
- else
- enable_shader_cache=no
- fi
-fi
+ GLVND_CFLAGS=$pkg_cv_GLVND_CFLAGS
+ GLVND_LIBS=$pkg_cv_GLVND_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
-if test "x$with_sha1" = "x"; then
- if test "x$enable_shader_cache" = "xyes"; then
- as_fn_error $? "Cannot enable shader cache (no SHA-1 implementation found)" "$LINENO" 5
- fi
fi
- if test x$enable_shader_cache = xyes; then
- ENABLE_SHADER_CACHE_TRUE=
- ENABLE_SHADER_CACHE_FALSE='#'
-else
- ENABLE_SHADER_CACHE_TRUE='#'
- ENABLE_SHADER_CACHE_FALSE=
+ DEFINES="${DEFINES} -DUSE_LIBGLVND_GLX=1"
+ DEFAULT_GL_LIB_NAME=GLX_mesa
fi
-
-case "$host_os" in
-linux*)
- need_pci_id=yes ;;
-*)
- need_pci_id=no ;;
-esac
-
+# Check for libdrm
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5
-$as_echo_n "checking for LIBUDEV... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
+$as_echo_n "checking for LIBDRM... " >&6; }
-if test -n "$LIBUDEV_CFLAGS"; then
- pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS"
+if test -n "$LIBDRM_CFLAGS"; then
+ pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= \$LIBUDEV_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libudev >= $LIBUDEV_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBUDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev >= $LIBUDEV_REQUIRED" 2>/dev/null`
+ pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -22918,16 +22949,16 @@
else
pkg_failed=untried
fi
-if test -n "$LIBUDEV_LIBS"; then
- pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS"
+if test -n "$LIBDRM_LIBS"; then
+ pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev >= \$LIBUDEV_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libudev >= $LIBUDEV_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBUDEV_LIBS=`$PKG_CONFIG --libs "libudev >= $LIBUDEV_REQUIRED" 2>/dev/null`
+ pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -22948,40 +22979,185 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libudev >= $LIBUDEV_REQUIRED" 2>&1`
+ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm >= $LIBDRM_REQUIRED" 2>&1`
else
- LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libudev >= $LIBUDEV_REQUIRED" 2>&1`
+ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= $LIBDRM_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$LIBUDEV_PKG_ERRORS" >&5
+ echo "$LIBDRM_PKG_ERRORS" >&5
- have_libudev=no
+ have_libdrm=no
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- have_libudev=no
+ have_libdrm=no
else
- LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS
- LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS
+ LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
+ LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_libudev=yes
+ have_libdrm=yes
+fi
+if test "x$have_libdrm" = xyes; then
+ DEFINES="$DEFINES -DHAVE_LIBDRM"
+fi
+
+require_libdrm() {
+ if test "x$have_libdrm" != xyes; then
+ as_fn_error $? "$1 requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
+ fi
+}
+
+
+# Select which platform-dependent DRI code gets built
+case "$host_os" in
+darwin*)
+ dri_platform='apple' ;;
+cygwin*)
+ dri_platform='windows' ;;
+gnu*)
+ dri_platform='none' ;;
+*)
+ dri_platform='drm' ;;
+esac
+
+if test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes; then
+ have_drisw_kms='yes'
+fi
+
+ if test "x$enable_dri" = xyes ; then
+ HAVE_DRICOMMON_TRUE=
+ HAVE_DRICOMMON_FALSE='#'
+else
+ HAVE_DRICOMMON_TRUE='#'
+ HAVE_DRICOMMON_FALSE=
+fi
+
+ if test "x$enable_dri" = xyes ; then
+ HAVE_DRISW_TRUE=
+ HAVE_DRISW_FALSE='#'
+else
+ HAVE_DRISW_TRUE='#'
+ HAVE_DRISW_FALSE=
fi
-# Check whether --enable-sysfs was given.
-if test "${enable_sysfs+set}" = set; then :
- enableval=$enable_sysfs; have_sysfs="$enableval"
+ if test "x$have_drisw_kms" = xyes ; then
+ HAVE_DRISW_KMS_TRUE=
+ HAVE_DRISW_KMS_FALSE='#'
else
- have_sysfs=no
+ HAVE_DRISW_KMS_TRUE='#'
+ HAVE_DRISW_KMS_FALSE=
+fi
+ if test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes ; then
+ HAVE_DRI2_TRUE=
+ HAVE_DRI2_FALSE='#'
+else
+ HAVE_DRI2_TRUE='#'
+ HAVE_DRI2_FALSE=
fi
+ if test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes ; then
+ HAVE_DRI3_TRUE=
+ HAVE_DRI3_FALSE='#'
+else
+ HAVE_DRI3_TRUE='#'
+ HAVE_DRI3_FALSE=
+fi
-if test "x$enable_dri" = xyes; then
- if test "$enable_static" = yes; then
- as_fn_error $? "Cannot use static libraries for DRI drivers" "$LINENO" 5
+ if test "x$enable_dri" = xyes -a "x$dri_platform" = xapple ; then
+ HAVE_APPLEDRI_TRUE=
+ HAVE_APPLEDRI_FALSE='#'
+else
+ HAVE_APPLEDRI_TRUE='#'
+ HAVE_APPLEDRI_FALSE=
+fi
+
+ if test "x$enable_lmsensors" = xyes ; then
+ HAVE_LMSENSORS_TRUE=
+ HAVE_LMSENSORS_FALSE='#'
+else
+ HAVE_LMSENSORS_TRUE='#'
+ HAVE_LMSENSORS_FALSE=
+fi
+
+ if test "x$enable_gallium_extra_hud" = xyes ; then
+ HAVE_GALLIUM_EXTRA_HUD_TRUE=
+ HAVE_GALLIUM_EXTRA_HUD_FALSE='#'
+else
+ HAVE_GALLIUM_EXTRA_HUD_TRUE='#'
+ HAVE_GALLIUM_EXTRA_HUD_FALSE=
+fi
+
+ if test "x$enable_dri" = xyes -a "x$dri_platform" = xwindows ; then
+ HAVE_WINDOWSDRI_TRUE=
+ HAVE_WINDOWSDRI_FALSE='#'
+else
+ HAVE_WINDOWSDRI_TRUE='#'
+ HAVE_WINDOWSDRI_FALSE=
+fi
+
+
+# Check whether --enable-shared-glapi was given.
+if test "${enable_shared_glapi+set}" = set; then :
+ enableval=$enable_shared_glapi; enable_shared_glapi="$enableval"
+else
+ enable_shared_glapi=yes
+fi
+
+
+case "x$enable_opengl$enable_gles1$enable_gles2" in
+x*yes*yes*)
+ if test "x$enable_shared_glapi" = xno; then
+ as_fn_error $? "shared GLAPI required when building two or more of
+ the following APIs - opengl, gles1 gles2" "$LINENO" 5
+ fi
+ ;;
+esac
+
+ if test "x$enable_shared_glapi" = xyes; then
+ HAVE_SHARED_GLAPI_TRUE=
+ HAVE_SHARED_GLAPI_FALSE='#'
+else
+ HAVE_SHARED_GLAPI_TRUE='#'
+ HAVE_SHARED_GLAPI_FALSE=
+fi
+
+
+# Build the pipe-drivers as separate libraries/modules.
+# Do not touch this unless you know what you are doing.
+# XXX: Expose via configure option ?
+enable_shared_pipe_drivers=no
+
+
+if test "x$enable_gallium_osmesa" = xyes; then
+ if ! echo "$with_gallium_drivers" | grep -q 'swrast'; then
+ as_fn_error $? "gallium_osmesa requires the gallium swrast driver" "$LINENO" 5
+ fi
+ if test "x$enable_osmesa" = xyes; then
+ as_fn_error $? "Cannot enable both classic and Gallium OSMesa implementations" "$LINENO" 5
+ fi
+fi
+
+require_dri_shared_libs_and_glapi() {
+ if test "x$enable_static" = xyes; then
+ as_fn_error $? "$1 cannot be build as static library" "$LINENO" 5
fi
+ if test "x$enable_dri" != xyes; then
+ # There is only a single backend which won't be build/used otherwise.
+ # XXX: Revisit this as the egl/haiku is a thing.
+ as_fn_error $? "$1 requires --enable-dri" "$LINENO" 5
+ fi
+
+ if test "x$enable_shared_glapi" != xyes; then
+ as_fn_error $? "$1 requires --enable-shared-glapi" "$LINENO" 5
+ fi
+}
+
+if test "x$enable_dri" = xyes; then
+ require_dri_shared_libs_and_glapi "DRI"
+
# not a hard requirement as swrast does not depend on it
if test "x$have_libdrm" = xyes; then
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
@@ -22996,25 +23172,22 @@
fi
-case "x$enable_glx" in
-xxlib | xgallium-xlib)
- # Xlib-based GLX
- dri_modules="x11 xext xcb"
+if test "x$enable_glx" != xno; then
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIBGL" >&5
-$as_echo_n "checking for XLIBGL... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLPROTO" >&5
+$as_echo_n "checking for GLPROTO... " >&6; }
-if test -n "$XLIBGL_CFLAGS"; then
- pkg_cv_XLIBGL_CFLAGS="$XLIBGL_CFLAGS"
+if test -n "$GLPROTO_CFLAGS"; then
+ pkg_cv_GLPROTO_CFLAGS="$GLPROTO_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5
- ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XLIBGL_CFLAGS=`$PKG_CONFIG --cflags "$dri_modules" 2>/dev/null`
+ pkg_cv_GLPROTO_CFLAGS=`$PKG_CONFIG --cflags "glproto >= $GLPROTO_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23022,16 +23195,16 @@
else
pkg_failed=untried
fi
-if test -n "$XLIBGL_LIBS"; then
- pkg_cv_XLIBGL_LIBS="$XLIBGL_LIBS"
+if test -n "$GLPROTO_LIBS"; then
+ pkg_cv_GLPROTO_LIBS="$GLPROTO_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5
- ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_XLIBGL_LIBS=`$PKG_CONFIG --libs "$dri_modules" 2>/dev/null`
+ pkg_cv_GLPROTO_LIBS=`$PKG_CONFIG --libs "glproto >= $GLPROTO_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23052,22 +23225,22 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- XLIBGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$dri_modules" 2>&1`
+ GLPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glproto >= $GLPROTO_REQUIRED" 2>&1`
else
- XLIBGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$dri_modules" 2>&1`
+ GLPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glproto >= $GLPROTO_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$XLIBGL_PKG_ERRORS" >&5
+ echo "$GLPROTO_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements ($dri_modules) were not met:
+ as_fn_error $? "Package requirements (glproto >= $GLPROTO_REQUIRED) were not met:
-$XLIBGL_PKG_ERRORS
+$GLPROTO_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables XLIBGL_CFLAGS
-and XLIBGL_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables GLPROTO_CFLAGS
+and GLPROTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -23078,42 +23251,39 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables XLIBGL_CFLAGS
-and XLIBGL_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables GLPROTO_CFLAGS
+and GLPROTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see .
See \`config.log' for more details" "$LINENO" 5; }
else
- XLIBGL_CFLAGS=$pkg_cv_XLIBGL_CFLAGS
- XLIBGL_LIBS=$pkg_cv_XLIBGL_LIBS
+ GLPROTO_CFLAGS=$pkg_cv_GLPROTO_CFLAGS
+ GLPROTO_LIBS=$pkg_cv_GLPROTO_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
- GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
- X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
- GL_LIB_DEPS="$XLIBGL_LIBS"
- GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
- GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm $PTHREAD_LIBS"
- ;;
-xdri)
- # DRI-based GLX
+fi
+case "x$enable_glx" in
+xxlib | xgallium-xlib)
+ # Xlib-based GLX
+ dri_modules="x11 xext xcb"
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLPROTO" >&5
-$as_echo_n "checking for GLPROTO... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIBGL" >&5
+$as_echo_n "checking for XLIBGL... " >&6; }
-if test -n "$GLPROTO_CFLAGS"; then
- pkg_cv_GLPROTO_CFLAGS="$GLPROTO_CFLAGS"
+if test -n "$XLIBGL_CFLAGS"; then
+ pkg_cv_XLIBGL_CFLAGS="$XLIBGL_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GLPROTO_CFLAGS=`$PKG_CONFIG --cflags "glproto >= $GLPROTO_REQUIRED" 2>/dev/null`
+ pkg_cv_XLIBGL_CFLAGS=`$PKG_CONFIG --cflags "$dri_modules" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23121,16 +23291,16 @@
else
pkg_failed=untried
fi
-if test -n "$GLPROTO_LIBS"; then
- pkg_cv_GLPROTO_LIBS="$GLPROTO_LIBS"
+if test -n "$XLIBGL_LIBS"; then
+ pkg_cv_XLIBGL_LIBS="$XLIBGL_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_GLPROTO_LIBS=`$PKG_CONFIG --libs "glproto >= $GLPROTO_REQUIRED" 2>/dev/null`
+ pkg_cv_XLIBGL_LIBS=`$PKG_CONFIG --libs "$dri_modules" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -23151,22 +23321,22 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GLPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glproto >= $GLPROTO_REQUIRED" 2>&1`
+ XLIBGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$dri_modules" 2>&1`
else
- GLPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glproto >= $GLPROTO_REQUIRED" 2>&1`
+ XLIBGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$dri_modules" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$GLPROTO_PKG_ERRORS" >&5
+ echo "$XLIBGL_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (glproto >= $GLPROTO_REQUIRED) were not met:
+ as_fn_error $? "Package requirements ($dri_modules) were not met:
-$GLPROTO_PKG_ERRORS
+$XLIBGL_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables GLPROTO_CFLAGS
-and GLPROTO_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XLIBGL_CFLAGS
+and XLIBGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -23177,19 +23347,27 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables GLPROTO_CFLAGS
-and GLPROTO_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables XLIBGL_CFLAGS
+and XLIBGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see .
See \`config.log' for more details" "$LINENO" 5; }
else
- GLPROTO_CFLAGS=$pkg_cv_GLPROTO_CFLAGS
- GLPROTO_LIBS=$pkg_cv_GLPROTO_LIBS
+ XLIBGL_CFLAGS=$pkg_cv_XLIBGL_CFLAGS
+ XLIBGL_LIBS=$pkg_cv_XLIBGL_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
+ GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
+ X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
+ GL_LIB_DEPS="$XLIBGL_LIBS"
+ GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm $PTHREAD_LIBS"
+ ;;
+xdri)
+ # DRI-based GLX
# find the DRI deps for libGL
dri_modules="x11 xext xdamage xfixes x11-xcb xcb xcb-glx >= $XCBGLX_REQUIRED"
@@ -23197,9 +23375,7 @@
if test x"$driglx_direct" = xyes; then
if test x"$dri_platform" = xdrm ; then
DEFINES="$DEFINES -DGLX_USE_DRM"
- if test "x$have_libdrm" != xyes; then
- as_fn_error $? "Direct rendering requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
- fi
+ require_libdrm "Direct rendering"
pkg_failed=no
@@ -23590,6 +23766,9 @@
if test x"$dri_platform" = xapple ; then
DEFINES="$DEFINES -DGLX_USE_APPLEGL"
fi
+ if test x"$dri_platform" = xwindows ; then
+ DEFINES="$DEFINES -DGLX_USE_WINDOWSGL"
+ fi
fi
# add xf86vidmode if available
@@ -23769,17 +23948,6 @@
;;
esac
-have_pci_id=no
-if test "$have_libudev" = yes; then
- DEFINES="$DEFINES -DHAVE_LIBUDEV"
- have_pci_id=yes
-fi
-
-if test "$have_sysfs" = yes; then
- DEFINES="$DEFINES -DHAVE_SYSFS"
- have_pci_id=yes
-fi
-
# This is outside the case (above) so that it is invoked even for non-GLX
# builds.
if test "x$HAVE_XF86VIDMODE" = xyes; then
@@ -23826,14 +23994,14 @@
if test "${enable_glx_tls+set}" = set; then :
enableval=$enable_glx_tls; GLX_USE_TLS="$enableval"
else
- GLX_USE_TLS=no
+ GLX_USE_TLS=yes
fi
GLX_TLS=${GLX_USE_TLS}
-if test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes; then :
- DEFINES="${DEFINES} -DGLX_USE_TLS"
+if test "x$GLX_USE_TLS" = xyes; then
+ DEFINES="$DEFINES -DGLX_USE_TLS"
fi
# Check whether --enable-glx-read-only-text was given.
@@ -23889,15 +24057,10 @@
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
if test "x$enable_dri3" = xyes; then
DEFINES="$DEFINES -DHAVE_DRI3"
fi
- if test "x$have_pci_id" != xyes; then
- as_fn_error $? "libudev-dev or sysfs required for building DRI" "$LINENO" 5
- fi
-
case "$host_cpu" in
powerpc* | sparc*)
# Build only the drivers for cards that exist on PowerPC/sparc
@@ -23907,19 +24070,13 @@
;;
esac
;;
- *freebsd* | dragonfly* | *netbsd* | openbsd*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
- ;;
- gnu*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
- ;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
with_dri_drivers="swrast"
fi
;;
darwin*)
- DEFINES="$DEFINES -DGLX_ALIAS_UNSUPPORTED -DBUILDING_MESA"
+ DEFINES="$DEFINES -DBUILDING_MESA"
if test "x$with_dri_drivers" = "xyes"; then
with_dri_drivers="swrast"
fi
@@ -24515,16 +24672,185 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RADEON" >&5
$as_echo_n "checking for RADEON... " >&6; }
-if test -n "$RADEON_CFLAGS"; then
- pkg_cv_RADEON_CFLAGS="$RADEON_CFLAGS"
+if test -n "$RADEON_CFLAGS"; then
+ pkg_cv_RADEON_CFLAGS="$RADEON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon >= \$LIBDRM_RADEON_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$RADEON_LIBS"; then
+ pkg_cv_RADEON_LIBS="$RADEON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon >= \$LIBDRM_RADEON_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ RADEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>&1`
+ else
+ RADEON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$RADEON_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libdrm_radeon >= $LIBDRM_RADEON_REQUIRED) were not met:
+
+$RADEON_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables RADEON_CFLAGS
+and RADEON_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables RADEON_CFLAGS
+and RADEON_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ RADEON_CFLAGS=$pkg_cv_RADEON_CFLAGS
+ RADEON_LIBS=$pkg_cv_RADEON_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+ ;;
+ xswrast)
+ HAVE_SWRAST_DRI=yes;
+ ;;
+ *)
+ as_fn_error $? "classic DRI driver '$driver' does not exist" "$LINENO" 5
+ ;;
+ esac
+ done
+ DRI_DIRS=`echo $DRI_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
+fi
+
+
+# Check whether --enable-gallium-llvm was given.
+if test "${enable_gallium_llvm+set}" = set; then :
+ enableval=$enable_gallium_llvm; enable_gallium_llvm="$enableval"
+else
+ enable_gallium_llvm=auto
+fi
+
+
+if test "x$enable_gallium_llvm" = xauto; then
+ if test "x$FOUND_LLVM" = xyes; then
+ case "$host_cpu" in
+ i*86|x86_64|amd64) enable_gallium_llvm=yes;;
+ *) enable_gallium_llvm=no;;
+ esac
+ else
+ enable_gallium_llvm=no
+ fi
+fi
+
+if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
+ as_fn_error $? "--enable-gallium-llvm selected but llvm-config is not found" "$LINENO" 5
+fi
+
+#
+# Vulkan driver configuration
+#
+
+
+# Check whether --with-vulkan-drivers was given.
+if test "${with_vulkan_drivers+set}" = set; then :
+ withval=$with_vulkan_drivers; with_vulkan_drivers="$withval"
+else
+ with_vulkan_drivers="no"
+fi
+
+
+# Doing '--without-vulkan-drivers' will set this variable to 'no'. Clear it
+# here so that the script doesn't choke on an unknown driver name later.
+case "x$with_vulkan_drivers" in
+ xyes) with_vulkan_drivers="$VULKAN_DRIVERS_DEFAULT" ;;
+ xno) with_vulkan_drivers='' ;;
+esac
+
+
+# Check whether --with-vulkan-icddir was given.
+if test "${with_vulkan_icddir+set}" = set; then :
+ withval=$with_vulkan_icddir; VULKAN_ICD_INSTALL_DIR="$withval"
+else
+ VULKAN_ICD_INSTALL_DIR='${datarootdir}/vulkan/icd.d'
+fi
+
+
+
+if test -n "$with_vulkan_drivers"; then
+ VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers`
+ for driver in $VULKAN_DRIVERS; do
+ case "x$driver" in
+ xintel)
+ if test "x$HAVE_I965_DRI" != xyes; then
+ as_fn_error $? "Intel Vulkan driver requires the i965 dri driver" "$LINENO" 5
+ fi
+ HAVE_INTEL_VULKAN=yes;
+
+ ;;
+ xradeon)
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AMDGPU" >&5
+$as_echo_n "checking for AMDGPU... " >&6; }
+
+if test -n "$AMDGPU_CFLAGS"; then
+ pkg_cv_AMDGPU_CFLAGS="$AMDGPU_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon >= \$LIBDRM_RADEON_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_amdgpu >= \$LIBDRM_AMDGPU_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null`
+ pkg_cv_AMDGPU_CFLAGS=`$PKG_CONFIG --cflags "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -24532,16 +24858,16 @@
else
pkg_failed=untried
fi
-if test -n "$RADEON_LIBS"; then
- pkg_cv_RADEON_LIBS="$RADEON_LIBS"
+if test -n "$AMDGPU_LIBS"; then
+ pkg_cv_AMDGPU_LIBS="$AMDGPU_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon >= \$LIBDRM_RADEON_REQUIRED\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_amdgpu >= \$LIBDRM_AMDGPU_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null`
+ pkg_cv_AMDGPU_LIBS=`$PKG_CONFIG --libs "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -24562,22 +24888,22 @@
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- RADEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>&1`
+ AMDGPU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED" 2>&1`
else
- RADEON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_radeon >= $LIBDRM_RADEON_REQUIRED" 2>&1`
+ AMDGPU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
- echo "$RADEON_PKG_ERRORS" >&5
+ echo "$AMDGPU_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libdrm_radeon >= $LIBDRM_RADEON_REQUIRED) were not met:
+ as_fn_error $? "Package requirements (libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED) were not met:
-$RADEON_PKG_ERRORS
+$AMDGPU_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
-Alternatively, you may set the environment variables RADEON_CFLAGS
-and RADEON_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables AMDGPU_CFLAGS
+and AMDGPU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -24588,75 +24914,21 @@
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
-Alternatively, you may set the environment variables RADEON_CFLAGS
-and RADEON_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables AMDGPU_CFLAGS
+and AMDGPU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see .
See \`config.log' for more details" "$LINENO" 5; }
else
- RADEON_CFLAGS=$pkg_cv_RADEON_CFLAGS
- RADEON_LIBS=$pkg_cv_RADEON_LIBS
+ AMDGPU_CFLAGS=$pkg_cv_AMDGPU_CFLAGS
+ AMDGPU_LIBS=$pkg_cv_AMDGPU_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
- ;;
- xswrast)
- HAVE_SWRAST_DRI=yes;
- ;;
- *)
- as_fn_error $? "classic DRI driver '$driver' does not exist" "$LINENO" 5
- ;;
- esac
- done
- DRI_DIRS=`echo $DRI_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
-fi
-
-
-#
-# Vulkan driver configuration
-#
-
-
-# Check whether --with-vulkan-drivers was given.
-if test "${with_vulkan_drivers+set}" = set; then :
- withval=$with_vulkan_drivers; with_vulkan_drivers="$withval"
-else
- with_vulkan_drivers="no"
-fi
-
-
-# Doing '--without-vulkan-drivers' will set this variable to 'no'. Clear it
-# here so that the script doesn't choke on an unknown driver name later.
-case "x$with_vulkan_drivers" in
- xyes) with_vulkan_drivers="$VULKAN_DRIVERS_DEFAULT" ;;
- xno) with_vulkan_drivers='' ;;
-esac
-
-
-# Check whether --with-vulkan-icddir was given.
-if test "${with_vulkan_icddir+set}" = set; then :
- withval=$with_vulkan_icddir; VULKAN_ICD_INSTALL_DIR="$withval"
-else
- VULKAN_ICD_INSTALL_DIR='${datarootdir}/vulkan/icd.d'
-fi
-
-
-
-if test -n "$with_vulkan_drivers"; then
- VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers`
- for driver in $VULKAN_DRIVERS; do
- case "x$driver" in
- xintel)
- if test "x$HAVE_I965_DRI" != xyes; then
- as_fn_error $? "Intel Vulkan driver requires the i965 dri driver" "$LINENO" 5
- fi
- if test "x$with_sha1" == "x"; then
- as_fn_error $? "Intel Vulkan driver requires SHA1" "$LINENO" 5
- fi
- HAVE_INTEL_VULKAN=yes;
-
+ radeon_llvm_check $LLVM_REQUIRED_RADV "radv"
+ HAVE_RADEON_VULKAN=yes;
;;
*)
as_fn_error $? "Vulkan driver '$driver' does not exist" "$LINENO" 5
@@ -24667,6 +24939,7 @@
fi
+DEFINES="$DEFINES -DENABLE_SHADER_CACHE"
if test -n "$DRI_DIRS"; then
NEED_MEGADRIVER_TRUE=
NEED_MEGADRIVER_FALSE='#'
@@ -24729,31 +25002,8 @@
-if test "x$enable_gbm" = xauto; then
- case "$with_egl_platforms" in
- *drm*)
- enable_gbm=yes ;;
- *)
- enable_gbm=no ;;
- esac
-fi
if test "x$enable_gbm" = xyes; then
- if test "x$need_pci_id$have_pci_id" = xyesno; then
- as_fn_error $? "gbm requires udev >= $LIBUDEV_REQUIRED or sysfs" "$LINENO" 5
- fi
-
- if test "x$enable_dri" = xyes; then
- if test "x$enable_shared_glapi" = xno; then
- as_fn_error $? "gbm_dri requires --enable-shared-glapi" "$LINENO" 5
- fi
- else
- # Strictly speaking libgbm does not require --enable-dri, although
- # both of its backends do. Thus one can build libgbm without any
- # backends if --disable-dri is set.
- # To avoid unnecessary complexity of checking if at least one backend
- # is available when building, just mandate --enable-dri.
- as_fn_error $? "gbm requires --enable-dri" "$LINENO" 5
- fi
+ require_dri_shared_libs_and_glapi "gbm"
fi
if test "x$enable_gbm" = xyes; then
HAVE_GBM_TRUE=
@@ -24763,16 +25013,12 @@
HAVE_GBM_FALSE=
fi
-if test "x$need_pci_id$have_libudev" = xyesyes; then
- GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
-else
- GBM_PC_REQ_PRIV=""
-fi
+# FINISHME: GBM has a number of dependencies which we should add below
+GBM_PC_REQ_PRIV=""
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
-EGL_CLIENT_APIS=""
if test "x$enable_egl" = xyes; then
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS $PTHREAD_LIBS"
@@ -24783,25 +25029,7 @@
fi
- if test "$enable_static" != yes; then
- if test "x$enable_dri" = xyes; then
- HAVE_EGL_DRIVER_DRI2=1
- if test "x$enable_shared_glapi" = xno; then
- as_fn_error $? "egl_dri2 requires --enable-shared-glapi" "$LINENO" 5
- fi
- if test "x$enable_dri3" = xyes; then
- HAVE_EGL_DRIVER_DRI3=1
- if test "x$enable_shared_glapi" = xno; then
- as_fn_error $? "egl_dri3 requires --enable-shared-glapi" "$LINENO" 5
- fi
- fi
- else
- # Avoid building an "empty" libEGL. Drop/update this
- # when other backends (haiku?) come along.
- as_fn_error $? "egl requires --enable-dri" "$LINENO" 5
- fi
-
- fi
+ require_dri_shared_libs_and_glapi "egl"
fi
if test "x$enable_egl" = xyes; then
HAVE_EGL_TRUE=
@@ -24920,14 +25148,14 @@
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-dri3 xcb-present xcb-sync xshmfence >= \$XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= \$XCBDRI2_REQUIRED\""; } >&5
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= \$XCBDRI2_REQUIRED\""; } >&5
($PKG_CONFIG --exists --print-errors "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED") 2>&5
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_VL_CFLAGS=`$PKG_CONFIG --cflags "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>/dev/null`
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -24940,14 +25168,14 @@
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-dri3 xcb-present xcb-sync xshmfence >= \$XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= \$XCBDRI2_REQUIRED\""; } >&5
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= \$XCBDRI2_REQUIRED\""; } >&5
($PKG_CONFIG --exists --print-errors "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED") 2>&5
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_VL_LIBS=`$PKG_CONFIG --libs "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>/dev/null`
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -24969,16 +25197,16 @@
fi
if test $_pkg_short_errors_supported = yes; then
VL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>&1`
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>&1`
else
VL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>&1`
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$VL_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED) were not met:
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED) were not met:
$VL_PKG_ERRORS
@@ -25575,126 +25803,6 @@
have_libclc=no
fi
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBELF" >&5
-$as_echo_n "checking for LIBELF... " >&6; }
-
-if test -n "$LIBELF_CFLAGS"; then
- pkg_cv_LIBELF_CFLAGS="$LIBELF_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$LIBELF_LIBS"; then
- pkg_cv_LIBELF_LIBS="$LIBELF_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_LIBELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
- test "x$?" != "x0" && pkg_failed=yes
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- LIBELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libelf" 2>&1`
- else
- LIBELF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libelf" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$LIBELF_PKG_ERRORS" >&5
-
- have_libelf=no
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- have_libelf=no
-else
- LIBELF_CFLAGS=$pkg_cv_LIBELF_CFLAGS
- LIBELF_LIBS=$pkg_cv_LIBELF_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_libelf=yes
-fi
-
-if test "x$have_libelf" = xno; then
- LIBELF_LIBS=''
- LIBELF_CFLAGS=''
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_memory in -lelf" >&5
-$as_echo_n "checking for elf_memory in -lelf... " >&6; }
-if ${ac_cv_lib_elf_elf_memory+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lelf $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char elf_memory ();
-int
-main ()
-{
-return elf_memory ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_elf_elf_memory=yes
-else
- ac_cv_lib_elf_elf_memory=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_memory" >&5
-$as_echo "$ac_cv_lib_elf_elf_memory" >&6; }
-if test "x$ac_cv_lib_elf_elf_memory" = xyes; then :
- have_libelf=yes;LIBELF_LIBS=-lelf
-else
- have_libelf=no
-fi
-
-
-
-fi
-
if test "x$enable_opencl" = xyes; then
if test -z "$with_gallium_drivers"; then
as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
@@ -25727,6 +25835,47 @@
if test "x$have_libelf" != xyes; then
as_fn_error $? "Clover requires libelf" "$LINENO" 5
fi
+
+ if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
+ altivec_enabled=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if !defined(__VEC__) || !defined(__ALTIVEC__)
+ #error "AltiVec not enabled"
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ altivec_enabled=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test "$altivec_enabled" = yes; then
+ CLOVER_STD_OVERRIDE="-std=gnu++11"
+ fi
+
+ fi
+
+ llvm_require_version $LLVM_REQUIRED_OPENCL "opencl"
+
+ llvm_add_default_components "opencl"
+ llvm_add_component "all-targets" "opencl"
+ llvm_add_component "linker" "opencl"
+ llvm_add_component "instrumentation" "opencl"
+ llvm_add_component "ipo" "opencl"
+ llvm_add_component "irreader" "opencl"
+ llvm_add_component "option" "opencl"
+ llvm_add_component "objcarcopts" "opencl"
+ llvm_add_component "profiledata" "opencl"
+
+ if test -z "$CLANG_LIBDIR"; then
+ CLANG_LIBDIR=${LLVM_LIBDIR}
+ fi
+ CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
+ if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
+ as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5
+fi
fi
if test "x$enable_opencl" = xyes; then
HAVE_CLOVER_TRUE=
@@ -25746,6 +25895,7 @@
+
if test -n "$with_gallium_drivers"; then
HAVE_GALLIUM_TRUE=
HAVE_GALLIUM_FALSE='#'
@@ -25756,34 +25906,18 @@
-
-
-
-
-
-
-
-
-
-
-case "x$enable_opengl$enable_gles1$enable_gles2" in
-x*yes*)
- EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
- ;;
-esac
-
-
-
-
-
# Check whether --with-egl-platforms was given.
if test "${with_egl_platforms+set}" = set; then :
withval=$with_egl_platforms; with_egl_platforms="$withval"
else
if test "x$enable_egl" = xyes; then
- with_egl_platforms="x11"
+ if test "x$enable_gbm" = xyes; then
+ with_egl_platforms="x11,drm"
+ else
+ with_egl_platforms="x11"
+ fi
else
- with_egl_platforms=""
+ with_egl_platforms=""
fi
fi
@@ -25911,8 +26045,6 @@
for plat in $egl_platforms; do
case "$plat" in
wayland)
- test "x$have_libdrm" != xyes &&
- as_fn_error $? "EGL platform wayland requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
pkg_failed=no
@@ -26074,473 +26206,209 @@
as_fn_error $? "Package requirements (x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes) were not met:
$XCB_DRI2_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables XCB_DRI2_CFLAGS
-and XCB_DRI2_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables XCB_DRI2_CFLAGS
-and XCB_DRI2_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see .
-See \`config.log' for more details" "$LINENO" 5; }
-else
- XCB_DRI2_CFLAGS=$pkg_cv_XCB_DRI2_CFLAGS
- XCB_DRI2_LIBS=$pkg_cv_XCB_DRI2_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
- ;;
-
- drm)
- test "x$enable_gbm" = "xno" &&
- as_fn_error $? "EGL platform drm needs gbm" "$LINENO" 5
- test "x$have_libdrm" != xyes &&
- as_fn_error $? "EGL platform drm requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
- ;;
-
- surfaceless)
- test "x$have_libdrm" != xyes &&
- as_fn_error $? "EGL platform surfaceless requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
- ;;
-
- android)
- ;;
-
- *)
- as_fn_error $? "EGL platform '$plat' does not exist" "$LINENO" 5
- ;;
- esac
-
- case "$plat$need_pci_id$have_pci_id" in
- waylandyesno|drmyesno)
- as_fn_error $? "cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs" "$LINENO" 5 ;;
- esac
-done
-
-# libEGL wants to default to the first platform specified in
-# ./configure. parse that here.
-if test "x$egl_platforms" != "x"; then
- FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr '[a-z]' '[A-Z]'`
- EGL_NATIVE_PLATFORM="_EGL_PLATFORM_$FIRST_PLATFORM_CAPS"
-else
- EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
-fi
-
- if echo "$egl_platforms" | grep -q 'x11'; then
- HAVE_PLATFORM_X11_TRUE=
- HAVE_PLATFORM_X11_FALSE='#'
-else
- HAVE_PLATFORM_X11_TRUE='#'
- HAVE_PLATFORM_X11_FALSE=
-fi
-
- if echo "$egl_platforms" | grep -q 'wayland'; then
- HAVE_PLATFORM_WAYLAND_TRUE=
- HAVE_PLATFORM_WAYLAND_FALSE='#'
-else
- HAVE_PLATFORM_WAYLAND_TRUE='#'
- HAVE_PLATFORM_WAYLAND_FALSE=
-fi
-
- if echo "$egl_platforms" | grep -q 'drm'; then
- HAVE_EGL_PLATFORM_DRM_TRUE=
- HAVE_EGL_PLATFORM_DRM_FALSE='#'
-else
- HAVE_EGL_PLATFORM_DRM_TRUE='#'
- HAVE_EGL_PLATFORM_DRM_FALSE=
-fi
-
- if echo "$egl_platforms" | grep -q 'surfaceless'; then
- HAVE_EGL_PLATFORM_SURFACELESS_TRUE=
- HAVE_EGL_PLATFORM_SURFACELESS_FALSE='#'
-else
- HAVE_EGL_PLATFORM_SURFACELESS_TRUE='#'
- HAVE_EGL_PLATFORM_SURFACELESS_FALSE=
-fi
-
- if echo "$egl_platforms" | grep -q 'android'; then
- HAVE_EGL_PLATFORM_ANDROID_TRUE=
- HAVE_EGL_PLATFORM_ANDROID_FALSE='#'
-else
- HAVE_EGL_PLATFORM_ANDROID_TRUE='#'
- HAVE_EGL_PLATFORM_ANDROID_FALSE=
-fi
-
-
- if test "x$HAVE_EGL_DRIVER_DRI2" != "x"; then
- HAVE_EGL_DRIVER_DRI2_TRUE=
- HAVE_EGL_DRIVER_DRI2_FALSE='#'
-else
- HAVE_EGL_DRIVER_DRI2_TRUE='#'
- HAVE_EGL_DRIVER_DRI2_FALSE=
-fi
-
-
-
-
-
-# If we don't have the X11 platform, set this define so we don't try to include
-# the X11 headers.
-if ! echo "$egl_platforms" | grep -q 'x11'; then
- DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS"
- GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
-fi
-
-# Check whether --enable-gallium-llvm was given.
-if test "${enable_gallium_llvm+set}" = set; then :
- enableval=$enable_gallium_llvm; enable_gallium_llvm="$enableval"
-else
- enable_gallium_llvm=auto
-fi
-
-
-# Check whether --enable-llvm-shared-libs was given.
-if test "${enable_llvm_shared_libs+set}" = set; then :
- enableval=$enable_llvm_shared_libs; enable_llvm_shared_libs="$enableval"
-else
- enable_llvm_shared_libs=yes
-fi
-
-
-
-# Check whether --with-llvm-prefix was given.
-if test "${with_llvm_prefix+set}" = set; then :
- withval=$with_llvm_prefix; llvm_prefix="$withval"
-else
- llvm_prefix=''
-fi
-
-
-
-# Call this inside ` ` to get the return value.
-# $1 is the llvm-config command with arguments.
-strip_unwanted_llvm_flags() {
- # Use \> (marks the end of the word)
- echo `$1` | sed \
- -e 's/-march=\S*//g' \
- -e 's/-mtune=\S*//g' \
- -e 's/-mcpu=\S*//g' \
- -e 's/-DNDEBUG\>//g' \
- -e 's/-D_GNU_SOURCE\>//g' \
- -e 's/-pedantic\>//g' \
- -e 's/-Wcovered-switch-default\>//g' \
- -e 's/-O.\>//g' \
- -e 's/-g\>//g' \
- -e 's/-Wall\>//g' \
- -e 's/-Wcast-qual\>//g' \
- -e 's/-Woverloaded-virtual\>//g' \
- -e 's/-fcolor-diagnostics\>//g' \
- -e 's/-fdata-sections\>//g' \
- -e 's/-ffunction-sections\>//g' \
- -e 's/-fno-exceptions\>//g' \
- -e 's/-fomit-frame-pointer\>//g' \
- -e 's/-fvisibility-inlines-hidden\>//g' \
- -e 's/-fPIC\>//g' \
- -e 's/-fstack-protector-strong\>//g'
-}
-
-llvm_check_version_for() {
- if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt "${1}0${2}${3}"; then
- as_fn_error $? "LLVM $1.$2.$3 or newer is required for $4" "$LINENO" 5
- fi
-}
-
-
-
-if test -z "$with_gallium_drivers"; then
- enable_gallium_llvm=no
-fi
-if test "x$enable_gallium_llvm" = xauto; then
- case "$host_cpu" in
- i*86|x86_64|amd64) enable_gallium_llvm=yes;;
- esac
-fi
-if test "x$enable_gallium_llvm" = xyes; then
- if test -n "$llvm_prefix"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LLVM_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $LLVM_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in "$llvm_prefix/bin"
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
-if test -n "$LLVM_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
-$as_echo "$LLVM_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_LLVM_CONFIG"; then
- ac_pt_LLVM_CONFIG=$LLVM_CONFIG
- # Extract the first word of "llvm-config", so it can be a program name with args.
-set dummy llvm-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_LLVM_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_LLVM_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_LLVM_CONFIG="$ac_pt_LLVM_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in "$llvm_prefix/bin"
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-ac_pt_LLVM_CONFIG=$ac_cv_path_ac_pt_LLVM_CONFIG
-if test -n "$ac_pt_LLVM_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_CONFIG" >&5
-$as_echo "$ac_pt_LLVM_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XCB_DRI2_CFLAGS
+and XCB_DRI2_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
-fi
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
- if test "x$ac_pt_LLVM_CONFIG" = x; then
- LLVM_CONFIG="no"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LLVM_CONFIG=$ac_pt_LLVM_CONFIG
- fi
+Alternatively, you may set the environment variables XCB_DRI2_CFLAGS
+and XCB_DRI2_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
else
- LLVM_CONFIG="$ac_cv_path_LLVM_CONFIG"
+ XCB_DRI2_CFLAGS=$pkg_cv_XCB_DRI2_CFLAGS
+ XCB_DRI2_LIBS=$pkg_cv_XCB_DRI2_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
fi
+ ;;
- else
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}llvm-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LLVM_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $LLVM_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
+ drm)
+ test "x$enable_gbm" = "xno" &&
+ as_fn_error $? "EGL platform drm needs gbm" "$LINENO" 5
+ ;;
- ;;
-esac
+ surfaceless)
+ ;;
+
+ android)
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANDROID" >&5
+$as_echo_n "checking for ANDROID... " >&6; }
+
+if test -n "$ANDROID_CFLAGS"; then
+ pkg_cv_ANDROID_CFLAGS="$ANDROID_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cutils hardware sync\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cutils hardware sync") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ANDROID_CFLAGS=`$PKG_CONFIG --cflags "cutils hardware sync" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
fi
-LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
-if test -n "$LLVM_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
-$as_echo "$LLVM_CONFIG" >&6; }
+ else
+ pkg_failed=untried
+fi
+if test -n "$ANDROID_LIBS"; then
+ pkg_cv_ANDROID_LIBS="$ANDROID_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cutils hardware sync\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cutils hardware sync") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ANDROID_LIBS=`$PKG_CONFIG --libs "cutils hardware sync" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
fi
-fi
-if test -z "$ac_cv_path_LLVM_CONFIG"; then
- ac_pt_LLVM_CONFIG=$LLVM_CONFIG
- # Extract the first word of "llvm-config", so it can be a program name with args.
-set dummy llvm-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_LLVM_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $ac_pt_LLVM_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_ac_pt_LLVM_CONFIG="$ac_pt_LLVM_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_ac_pt_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
- ;;
-esac
-fi
-ac_pt_LLVM_CONFIG=$ac_cv_path_ac_pt_LLVM_CONFIG
-if test -n "$ac_pt_LLVM_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_CONFIG" >&5
-$as_echo "$ac_pt_LLVM_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
-fi
- if test "x$ac_pt_LLVM_CONFIG" = x; then
- LLVM_CONFIG="no"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LLVM_CONFIG=$ac_pt_LLVM_CONFIG
- fi
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
else
- LLVM_CONFIG="$ac_cv_path_LLVM_CONFIG"
+ _pkg_short_errors_supported=no
fi
+ if test $_pkg_short_errors_supported = yes; then
+ ANDROID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cutils hardware sync" 2>&1`
+ else
+ ANDROID_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cutils hardware sync" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ANDROID_PKG_ERRORS" >&5
- fi
+ as_fn_error $? "Package requirements (cutils hardware sync) were not met:
- if test "x$LLVM_CONFIG" != xno; then
- LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[0-9.]+'`
- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
- LLVM_BINDIR=`$LLVM_CONFIG --bindir`
- LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
- LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
- LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
- LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
- LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
+$ANDROID_PKG_ERRORS
- if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_MAJOR" "LLVM_VERSION_MAJOR" "#include \"${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h\""; then :
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables ANDROID_CFLAGS
+and ANDROID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables ANDROID_CFLAGS
+and ANDROID_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ ANDROID_CFLAGS=$pkg_cv_ANDROID_CFLAGS
+ ANDROID_LIBS=$pkg_cv_ANDROID_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+ ;;
- if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_MINOR" "LLVM_VERSION_MINOR" "#include \"${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h\""; then :
+ *)
+ as_fn_error $? "EGL platform '$plat' does not exist" "$LINENO" 5
+ ;;
+ esac
+
+ case "$plat" in
+ wayland|drm|surfaceless)
+ require_libdrm "Platform $plat"
+ ;;
+ esac
+done
+# libEGL wants to default to the first platform specified in
+# ./configure. parse that here.
+if test "x$egl_platforms" != "x"; then
+ FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr '[a-z]' '[A-Z]'`
+ EGL_NATIVE_PLATFORM="_EGL_PLATFORM_$FIRST_PLATFORM_CAPS"
+else
+ EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
fi
+ if echo "$egl_platforms" | grep -q 'x11'; then
+ HAVE_PLATFORM_X11_TRUE=
+ HAVE_PLATFORM_X11_FALSE='#'
+else
+ HAVE_PLATFORM_X11_TRUE='#'
+ HAVE_PLATFORM_X11_FALSE=
+fi
- LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3 | egrep -o '^[0-9]+'`
- if test -z "$LLVM_VERSION_PATCH"; then
- LLVM_VERSION_PATCH=0
- fi
+ if echo "$egl_platforms" | grep -q 'wayland'; then
+ HAVE_PLATFORM_WAYLAND_TRUE=
+ HAVE_PLATFORM_WAYLAND_FALSE='#'
+else
+ HAVE_PLATFORM_WAYLAND_TRUE='#'
+ HAVE_PLATFORM_WAYLAND_FALSE=
+fi
- if test -n "${LLVM_VERSION_MAJOR}"; then
- LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
- else
- LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([0-9]\)\.\([0-9]\)/\10\2/g'`
- fi
+ if echo "$egl_platforms" | grep -q 'drm'; then
+ HAVE_EGL_PLATFORM_DRM_TRUE=
+ HAVE_EGL_PLATFORM_DRM_FALSE='#'
+else
+ HAVE_EGL_PLATFORM_DRM_TRUE='#'
+ HAVE_EGL_PLATFORM_DRM_FALSE=
+fi
- LLVM_REQUIRED_VERSION_MAJOR="3"
- LLVM_REQUIRED_VERSION_MINOR="3"
- if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
- as_fn_error $? "LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required" "$LINENO" 5
- fi
+ if echo "$egl_platforms" | grep -q 'surfaceless'; then
+ HAVE_EGL_PLATFORM_SURFACELESS_TRUE=
+ HAVE_EGL_PLATFORM_SURFACELESS_FALSE='#'
+else
+ HAVE_EGL_PLATFORM_SURFACELESS_TRUE='#'
+ HAVE_EGL_PLATFORM_SURFACELESS_FALSE=
+fi
- LLVM_COMPONENTS="engine bitwriter mcjit mcdisassembler"
+ if echo "$egl_platforms" | grep -q 'android'; then
+ HAVE_EGL_PLATFORM_ANDROID_TRUE=
+ HAVE_EGL_PLATFORM_ANDROID_FALSE='#'
+else
+ HAVE_EGL_PLATFORM_ANDROID_TRUE='#'
+ HAVE_EGL_PLATFORM_ANDROID_FALSE=
+fi
- if $LLVM_CONFIG --components | grep -q inteljitevents ; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} inteljitevents"
- fi
- if test "x$enable_opencl" = xyes; then
- llvm_check_version_for "3" "5" "0" "opencl"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
- fi
- DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
- MESA_LLVM=1
- if test "x$enable_opencl" = xyes; then
- if test -z "$CLANG_LIBDIR"; then
- CLANG_LIBDIR=${LLVM_LIBDIR}
- fi
- CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
- as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5
-fi
- fi
- else
- MESA_LLVM=0
- LLVM_VERSION_INT=0
- fi
-else
- MESA_LLVM=0
- LLVM_VERSION_INT=0
- if test "x$enable_opencl" = xyes; then
- as_fn_error $? "cannot enable OpenCL without LLVM" "$LINENO" 5
- fi
+# If we don't have the X11 platform, set this define so we don't try to include
+# the X11 headers.
+if ! echo "$egl_platforms" | grep -q 'x11'; then
+ DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS"
+ GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
fi
@@ -26604,72 +26472,32 @@
-gallium_require_drm() {
- if test "x$have_libdrm" != xyes; then
- as_fn_error $? "$1 requires libdrm >= $LIBDRM_REQUIRED" "$LINENO" 5
- fi
-}
-
-gallium_require_llvm() {
- if test "x$MESA_LLVM" = x0; then
- case "$host" in *gnux32) return;; esac
- case "$host_cpu" in
- i*86|x86_64|amd64) as_fn_error $? "LLVM is required to build $1 on x86 and x86_64" "$LINENO" 5;;
- esac
- fi
-}
-
-gallium_require_drm_loader() {
- if test "x$need_pci_id$have_pci_id" = xyesno; then
- as_fn_error $? "Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs" "$LINENO" 5
- fi
+r300_require_llvm() {
+ case "$host" in *gnux32) return;; esac
+ case "$host_cpu" in
+ i*86|x86_64|amd64) require_llvm $1
+ ;;
+ esac
}
-require_egl_drm() {
- if test "x$enable_opengl" = xno; then
- return 0
- fi
-
+require_basic_egl() {
case "$with_egl_platforms" in
- *drm*)
+ *drm*|*surfaceless*)
;;
- *)
- as_fn_error $? "--with-egl-platforms=drm is required to build the $1 driver." "$LINENO" 5
+ *)
+ as_fn_error $? "$1 requires one of these:
+ 1) --with-egl-platforms=drm (X, Wayland, offscreen rendering based on DRM)
+ 2) --with-egl-platforms=surfaceless (offscreen only)
+ Recommended options: drm,x11" "$LINENO" 5
;;
esac
- if test "x$enable_gbm" != xyes; then
- as_fn_error $? "--enable-gbm is required to build the $1 driver." "$LINENO" 5
- fi
-}
-
-radeon_llvm_check() {
- if test ${LLVM_VERSION_INT} -lt 307; then
- amdgpu_llvm_target_name='r600'
- else
- amdgpu_llvm_target_name='amdgpu'
- fi
- if test "x$enable_gallium_llvm" != "xyes"; then
- as_fn_error $? "--enable-gallium-llvm is required when building $1" "$LINENO" 5
- fi
- llvm_check_version_for "3" "6" "0" $1
- if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
- as_fn_error $? "LLVM $amdgpu_llvm_target_name not enabled in your LLVM build." "$LINENO" 5
- fi
- LLVM_COMPONENTS="${LLVM_COMPONENTS} $amdgpu_llvm_target_name bitreader ipo"
- NEED_RADEON_LLVM=yes
- if test "x$have_libelf" != xyes; then
- as_fn_error $? "$1 requires libelf when using llvm" "$LINENO" 5
- fi
}
-swr_llvm_check() {
- gallium_require_llvm $1
- if test ${LLVM_VERSION_INT} -lt 306; then
- as_fn_error $? "LLVM version 3.6 or later required when building $1" "$LINENO" 5
- fi
+radeon_gallium_llvm_check() {
if test "x$enable_gallium_llvm" != "xyes"; then
- as_fn_error $? "--enable-gallium-llvm is required when building $1" "$LINENO" 5
+ as_fn_error $? "--enable-gallium-llvm is required when building $2" "$LINENO" 5
fi
+ radeon_llvm_check $*
}
swr_require_cxx_feature_flags() {
@@ -26740,8 +26568,7 @@
case "x$driver" in
xsvga)
HAVE_GALLIUM_SVGA=yes
- gallium_require_drm "svga"
- gallium_require_drm_loader
+ require_libdrm "svga"
;;
xi915)
HAVE_GALLIUM_I915=yes
@@ -26836,8 +26663,7 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "Gallium i915"
- gallium_require_drm_loader
+ require_libdrm "Gallium i915"
;;
xilo)
HAVE_GALLIUM_ILO=yes
@@ -26932,8 +26758,7 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "Gallium i965/ilo"
- gallium_require_drm_loader
+ require_libdrm "Gallium i965/ilo"
;;
xr300)
HAVE_GALLIUM_R300=yes
@@ -27028,9 +26853,8 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "Gallium R300"
- gallium_require_drm_loader
- gallium_require_llvm "Gallium R300"
+ require_libdrm "r300"
+ r300_require_llvm "r300"
;;
xr600)
HAVE_GALLIUM_R600=yes
@@ -27125,11 +26949,12 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "Gallium R600"
- gallium_require_drm_loader
+ require_libdrm "r600"
if test "x$enable_opencl" = xyes; then
- radeon_llvm_check "r600g"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
+ radeon_gallium_llvm_check $LLVM_REQUIRED_R600 "r600"
+
+ llvm_add_component "asmparser" "r600"
+ llvm_add_component "bitreader" "r600"
fi
;;
xradeonsi)
@@ -27316,10 +27141,11 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "radeonsi"
- gallium_require_drm_loader
- radeon_llvm_check "radeonsi"
- require_egl_drm "radeonsi"
+ require_libdrm "radeonsi"
+ radeon_gallium_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
+ if test "x$enable_egl" = xyes; then
+ require_basic_egl "radeonsi"
+ fi
;;
xnouveau)
HAVE_GALLIUM_NOUVEAU=yes
@@ -27414,8 +27240,7 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "nouveau"
- gallium_require_drm_loader
+ require_libdrm "nouveau"
;;
xfreedreno)
HAVE_GALLIUM_FREEDRENO=yes
@@ -27510,17 +27335,114 @@
$as_echo "yes" >&6; }
fi
- gallium_require_drm "freedreno"
- gallium_require_drm_loader
+ require_libdrm "freedreno"
+ ;;
+ xetnaviv)
+ HAVE_GALLIUM_ETNAVIV=yes
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETNAVIV" >&5
+$as_echo_n "checking for ETNAVIV... " >&6; }
+
+if test -n "$ETNAVIV_CFLAGS"; then
+ pkg_cv_ETNAVIV_CFLAGS="$ETNAVIV_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_etnaviv >= \$LIBDRM_ETNAVIV_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ETNAVIV_CFLAGS=`$PKG_CONFIG --cflags "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ETNAVIV_LIBS"; then
+ pkg_cv_ETNAVIV_LIBS="$ETNAVIV_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_etnaviv >= \$LIBDRM_ETNAVIV_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ETNAVIV_LIBS=`$PKG_CONFIG --libs "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ETNAVIV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED" 2>&1`
+ else
+ ETNAVIV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ETNAVIV_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED) were not met:
+
+$ETNAVIV_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables ETNAVIV_CFLAGS
+and ETNAVIV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables ETNAVIV_CFLAGS
+and ETNAVIV_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ ETNAVIV_CFLAGS=$pkg_cv_ETNAVIV_CFLAGS
+ ETNAVIV_LIBS=$pkg_cv_ETNAVIV_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+ require_libdrm "etnaviv"
+ ;;
+ ximx)
+ HAVE_GALLIUM_IMX=yes
;;
xswrast)
HAVE_GALLIUM_SOFTPIPE=yes
- if test "x$MESA_LLVM" = x1; then
+ if test "x$enable_gallium_llvm" = xyes; then
HAVE_GALLIUM_LLVMPIPE=yes
fi
;;
xswr)
- swr_llvm_check "swr"
+ llvm_require_version $LLVM_REQUIRED_SWR "swr"
swr_require_cxx_feature_flags "C++11" "__cplusplus >= 201103L" \
",-std=c++11" \
@@ -27541,8 +27463,98 @@
;;
xvc4)
HAVE_GALLIUM_VC4=yes
- gallium_require_drm "vc4"
- gallium_require_drm_loader
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VC4" >&5
+$as_echo_n "checking for VC4... " >&6; }
+
+if test -n "$VC4_CFLAGS"; then
+ pkg_cv_VC4_CFLAGS="$VC4_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_vc4 >= \$LIBDRM_VC4_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VC4_CFLAGS=`$PKG_CONFIG --cflags "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$VC4_LIBS"; then
+ pkg_cv_VC4_LIBS="$VC4_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_vc4 >= \$LIBDRM_VC4_REQUIRED\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_VC4_LIBS=`$PKG_CONFIG --libs "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ VC4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED" 2>&1`
+ else
+ VC4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_vc4 >= $LIBDRM_VC4_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$VC4_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (libdrm_vc4 >= $LIBDRM_VC4_REQUIRED) were not met:
+
+$VC4_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables VC4_CFLAGS
+and VC4_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables VC4_CFLAGS
+and VC4_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ VC4_CFLAGS=$pkg_cv_VC4_CFLAGS
+ VC4_LIBS=$pkg_cv_VC4_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+ require_libdrm "vc4"
pkg_failed=no
@@ -27619,9 +27631,10 @@
;;
xvirgl)
HAVE_GALLIUM_VIRGL=yes
- gallium_require_drm "virgl"
- gallium_require_drm_loader
- require_egl_drm "virgl"
+ require_libdrm "virgl"
+ if test "x$enable_egl" = xyes; then
+ require_basic_egl "virgl"
+ fi
;;
*)
as_fn_error $? "Unknown Gallium driver: $driver" "$LINENO" 5
@@ -27630,8 +27643,23 @@
done
fi
+if test "x$enable_gallium_llvm" == "xyes" -a "$with_gallium_drivers"; then
+ llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
+ llvm_add_default_components "gallium"
+fi
+
+
+if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" == xyes ; then
+ as_fn_error $? "Building with imx requires etnaviv" "$LINENO" 5
+fi
+
+if test "x$enable_gallium_llvm" = xyes; then
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
+
+ LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
+ LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
+ LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
-if test "x$MESA_LLVM" != x0; then
if ! $LLVM_CONFIG --libs ${LLVM_COMPONENTS} >/dev/null; then
as_fn_error $? "Calling ${LLVM_CONFIG} failed" "$LINENO" 5
@@ -27663,7 +27691,7 @@
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building mesa with statically linked LLVM may cause compilation issues" >&5
$as_echo "$as_me: WARNING: Building mesa with statically linked LLVM may cause compilation issues" >&2;}
- if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
+ if test $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --system-libs`"
fi
fi
@@ -27742,6 +27770,22 @@
HAVE_GALLIUM_FREEDRENO_FALSE=
fi
+ if test "x$HAVE_GALLIUM_ETNAVIV" = xyes; then
+ HAVE_GALLIUM_ETNAVIV_TRUE=
+ HAVE_GALLIUM_ETNAVIV_FALSE='#'
+else
+ HAVE_GALLIUM_ETNAVIV_TRUE='#'
+ HAVE_GALLIUM_ETNAVIV_FALSE=
+fi
+
+ if test "x$HAVE_GALLIUM_IMX" = xyes; then
+ HAVE_GALLIUM_IMX_TRUE=
+ HAVE_GALLIUM_IMX_FALSE='#'
+else
+ HAVE_GALLIUM_IMX_TRUE='#'
+ HAVE_GALLIUM_IMX_FALSE=
+fi
+
if test "x$HAVE_GALLIUM_SOFTPIPE" = xyes; then
HAVE_GALLIUM_SOFTPIPE_TRUE=
HAVE_GALLIUM_SOFTPIPE_FALSE='#'
@@ -27860,6 +27904,14 @@
fi
+ if test "x$HAVE_RADEON_VULKAN" = xyes; then
+ HAVE_RADEON_VULKAN_TRUE=
+ HAVE_RADEON_VULKAN_FALSE='#'
+else
+ HAVE_RADEON_VULKAN_TRUE='#'
+ HAVE_RADEON_VULKAN_FALSE=
+fi
+
if test "x$HAVE_INTEL_VULKAN" = xyes; then
HAVE_INTEL_VULKAN_TRUE=
HAVE_INTEL_VULKAN_FALSE='#'
@@ -27869,6 +27921,17 @@
fi
+ if test "x$HAVE_GALLIUM_R600" = xyes -o \
+ "x$HAVE_GALLIUM_RADEONSI" = xyes -o \
+ "x$HAVE_RADEON_VULKAN" = xyes; then
+ HAVE_AMD_DRIVERS_TRUE=
+ HAVE_AMD_DRIVERS_FALSE='#'
+else
+ HAVE_AMD_DRIVERS_TRUE='#'
+ HAVE_AMD_DRIVERS_FALSE=
+fi
+
+
if test "x$HAVE_INTEL_VULKAN" = xyes -o \
"x$HAVE_I965_DRI" = xyes; then
HAVE_INTEL_DRIVERS_TRUE=
@@ -27913,12 +27976,12 @@
HAVE_GALLIUM_COMPUTE_FALSE=
fi
- if test x$MESA_LLVM = x1; then
- HAVE_MESA_LLVM_TRUE=
- HAVE_MESA_LLVM_FALSE='#'
+ if test "x$enable_gallium_llvm" = xyes; then
+ HAVE_GALLIUM_LLVM_TRUE=
+ HAVE_GALLIUM_LLVM_FALSE='#'
else
- HAVE_MESA_LLVM_TRUE='#'
- HAVE_MESA_LLVM_FALSE=
+ HAVE_GALLIUM_LLVM_TRUE='#'
+ HAVE_GALLIUM_LLVM_FALSE=
fi
if test x$USE_VC4_SIMULATOR = xyes; then
@@ -28013,6 +28076,15 @@
VA_MINOR=$VA_MINOR
+ if test "x$VULKAN_DRIVERS" != "x"; then
+ HAVE_VULKAN_COMMON_TRUE=
+ HAVE_VULKAN_COMMON_FALSE='#'
+else
+ HAVE_VULKAN_COMMON_TRUE='#'
+ HAVE_VULKAN_COMMON_FALSE=
+fi
+
+
XVMC_MAJOR=1
XVMC_MINOR=0
@@ -28032,9 +28104,6 @@
XA_VERSION="$XA_MAJOR.$XA_MINOR.$XA_TINY"
-TIMESTAMP_CMD='`test $(SOURCE_DATE_EPOCH) && echo $(SOURCE_DATE_EPOCH) || date +%s`'
-
-
# Check whether --enable-valgrind was given.
if test "${enable_valgrind+set}" = set; then :
enableval=$enable_valgrind; VALGRIND=$enableval
@@ -28144,7 +28213,7 @@
CFLAGS="$CFLAGS $USER_CFLAGS"
CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
-ac_config_files="$ac_config_files Makefile src/Makefile src/compiler/Makefile src/egl/Makefile src/egl/main/egl.pc src/egl/wayland/wayland-drm/Makefile src/egl/wayland/wayland-egl/Makefile src/egl/wayland/wayland-egl/wayland-egl.pc src/gallium/Makefile src/gallium/auxiliary/Makefile src/gallium/auxiliary/pipe-loader/Makefile src/gallium/drivers/freedreno/Makefile src/gallium/drivers/ddebug/Makefile src/gallium/drivers/i915/Makefile src/gallium/drivers/ilo/Makefile src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/noop/Makefile src/gallium/drivers/nouveau/Makefile src/gallium/drivers/r300/Makefile src/gallium/drivers/r600/Makefile src/gallium/drivers/radeon/Makefile src/gallium/drivers/radeonsi/Makefile src/gallium/drivers/rbug/Makefile src/gallium/drivers/softpipe/Makefile src/gallium/drivers/svga/Makefile src/gallium/drivers/swr/Makefile src/gallium/drivers/trace/Makefile src/gallium/drivers/vc4/Makefile src/gallium/drivers/virgl/Makefile src/gallium/state_trackers/clover/Makefile src/gallium/state_trackers/dri/Makefile src/gallium/state_trackers/glx/xlib/Makefile src/gallium/state_trackers/nine/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/xa/Makefile src/gallium/state_trackers/xvmc/Makefile src/gallium/targets/d3dadapter9/Makefile src/gallium/targets/d3dadapter9/d3d.pc src/gallium/targets/dri/Makefile src/gallium/targets/libgl-xlib/Makefile src/gallium/targets/omx/Makefile src/gallium/targets/opencl/Makefile src/gallium/targets/opencl/mesa.icd 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 src/gallium/targets/xvmc/Makefile src/gallium/tests/trivial/Makefile src/gallium/tests/unit/Makefile src/gallium/winsys/freedreno/drm/Makefile src/gallium/winsys/i915/drm/Makefile src/gallium/winsys/intel/drm/Makefile src/gallium/winsys/nouveau/drm/Makefile src/gallium/winsys/radeon/drm/Makefile src/gallium/winsys/amdgpu/drm/Makefile src/gallium/winsys/svga/drm/Makefile src/gallium/winsys/sw/dri/Makefile src/gallium/winsys/sw/kms-dri/Makefile src/gallium/winsys/sw/null/Makefile src/gallium/winsys/sw/wrapper/Makefile src/gallium/winsys/sw/xlib/Makefile src/gallium/winsys/vc4/drm/Makefile src/gallium/winsys/virgl/drm/Makefile src/gallium/winsys/virgl/vtest/Makefile src/gbm/Makefile src/gbm/main/gbm.pc src/glx/Makefile src/glx/apple/Makefile src/glx/tests/Makefile src/gtest/Makefile src/intel/Makefile src/intel/genxml/Makefile src/intel/isl/Makefile src/intel/vulkan/Makefile src/loader/Makefile src/mapi/Makefile src/mapi/es1api/glesv1_cm.pc src/mapi/es2api/glesv2.pc src/mapi/glapi/gen/Makefile src/mesa/Makefile src/mesa/gl.pc src/mesa/drivers/dri/dri.pc src/mesa/drivers/dri/common/Makefile src/mesa/drivers/dri/common/xmlpool/Makefile src/mesa/drivers/dri/i915/Makefile src/mesa/drivers/dri/i965/Makefile src/mesa/drivers/dri/Makefile src/mesa/drivers/dri/nouveau/Makefile src/mesa/drivers/dri/r200/Makefile src/mesa/drivers/dri/radeon/Makefile src/mesa/drivers/dri/swrast/Makefile src/mesa/drivers/osmesa/Makefile src/mesa/drivers/osmesa/osmesa.pc src/mesa/drivers/x11/Makefile src/mesa/main/tests/Makefile src/util/Makefile src/util/tests/hash_table/Makefile"
+ac_config_files="$ac_config_files Makefile src/Makefile src/amd/Makefile src/amd/vulkan/Makefile src/compiler/Makefile src/egl/Makefile src/egl/main/egl.pc src/egl/wayland/wayland-drm/Makefile src/egl/wayland/wayland-egl/Makefile src/egl/wayland/wayland-egl/wayland-egl.pc src/gallium/Makefile src/gallium/auxiliary/Makefile src/gallium/auxiliary/pipe-loader/Makefile src/gallium/drivers/freedreno/Makefile src/gallium/drivers/ddebug/Makefile src/gallium/drivers/i915/Makefile src/gallium/drivers/ilo/Makefile src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/noop/Makefile src/gallium/drivers/nouveau/Makefile src/gallium/drivers/r300/Makefile src/gallium/drivers/r600/Makefile src/gallium/drivers/radeon/Makefile src/gallium/drivers/radeonsi/Makefile src/gallium/drivers/rbug/Makefile src/gallium/drivers/softpipe/Makefile src/gallium/drivers/svga/Makefile src/gallium/drivers/swr/Makefile src/gallium/drivers/trace/Makefile src/gallium/drivers/etnaviv/Makefile src/gallium/drivers/imx/Makefile src/gallium/drivers/vc4/Makefile src/gallium/drivers/virgl/Makefile src/gallium/state_trackers/clover/Makefile src/gallium/state_trackers/dri/Makefile src/gallium/state_trackers/glx/xlib/Makefile src/gallium/state_trackers/nine/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/xa/Makefile src/gallium/state_trackers/xvmc/Makefile src/gallium/targets/d3dadapter9/Makefile src/gallium/targets/d3dadapter9/d3d.pc src/gallium/targets/dri/Makefile src/gallium/targets/libgl-xlib/Makefile src/gallium/targets/omx/Makefile src/gallium/targets/opencl/Makefile src/gallium/targets/opencl/mesa.icd 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 src/gallium/targets/xvmc/Makefile src/gallium/tests/trivial/Makefile src/gallium/tests/unit/Makefile src/gallium/winsys/etnaviv/drm/Makefile src/gallium/winsys/imx/drm/Makefile src/gallium/winsys/freedreno/drm/Makefile src/gallium/winsys/i915/drm/Makefile src/gallium/winsys/intel/drm/Makefile src/gallium/winsys/nouveau/drm/Makefile src/gallium/winsys/radeon/drm/Makefile src/gallium/winsys/amdgpu/drm/Makefile src/gallium/winsys/svga/drm/Makefile src/gallium/winsys/sw/dri/Makefile src/gallium/winsys/sw/kms-dri/Makefile src/gallium/winsys/sw/null/Makefile src/gallium/winsys/sw/wrapper/Makefile src/gallium/winsys/sw/xlib/Makefile src/gallium/winsys/vc4/drm/Makefile src/gallium/winsys/virgl/drm/Makefile src/gallium/winsys/virgl/vtest/Makefile src/gbm/Makefile src/gbm/main/gbm.pc src/glx/Makefile src/glx/apple/Makefile src/glx/tests/Makefile src/glx/windows/Makefile src/glx/windows/windowsdriproto.pc src/gtest/Makefile src/intel/Makefile src/intel/tools/Makefile src/intel/vulkan/Makefile src/loader/Makefile src/mapi/Makefile src/mapi/es1api/glesv1_cm.pc src/mapi/es2api/glesv2.pc src/mapi/glapi/gen/Makefile src/mesa/Makefile src/mesa/gl.pc src/mesa/drivers/dri/dri.pc src/mesa/drivers/dri/common/Makefile src/mesa/drivers/dri/common/xmlpool/Makefile src/mesa/drivers/dri/i915/Makefile src/mesa/drivers/dri/i965/Makefile src/mesa/drivers/dri/Makefile src/mesa/drivers/dri/nouveau/Makefile src/mesa/drivers/dri/r200/Makefile src/mesa/drivers/dri/radeon/Makefile src/mesa/drivers/dri/swrast/Makefile src/mesa/drivers/osmesa/Makefile src/mesa/drivers/osmesa/osmesa.pc src/mesa/drivers/x11/Makefile src/mesa/main/tests/Makefile src/util/Makefile src/util/tests/hash_table/Makefile src/vulkan/wsi/Makefile"
cat >confcache <<\_ACEOF
@@ -28340,6 +28409,10 @@
as_fn_error $? "conditional \"SSE41_SUPPORTED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GCC_ATOMIC_BUILTINS_SUPPORTED_TRUE}" && test -z "${GCC_ATOMIC_BUILTINS_SUPPORTED_FALSE}"; then
+ as_fn_error $? "conditional \"GCC_ATOMIC_BUILTINS_SUPPORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${BUILD_SHARED_TRUE}" && test -z "${BUILD_SHARED_FALSE}"; then
as_fn_error $? "conditional \"BUILD_SHARED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28360,6 +28433,14 @@
as_fn_error $? "conditional \"USE_LIBGLVND_GLX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_GALLIUM_EXTRA_HUD_TRUE}" && test -z "${HAVE_GALLIUM_EXTRA_HUD_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GALLIUM_EXTRA_HUD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBSENSORS_TRUE}" && test -z "${HAVE_LIBSENSORS_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LIBSENSORS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_OPENGL_TRUE}" && test -z "${HAVE_OPENGL_FALSE}"; then
as_fn_error $? "conditional \"HAVE_OPENGL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28420,12 +28501,20 @@
as_fn_error $? "conditional \"HAVE_APPLEDRI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HAVE_SHARED_GLAPI_TRUE}" && test -z "${HAVE_SHARED_GLAPI_FALSE}"; then
- as_fn_error $? "conditional \"HAVE_SHARED_GLAPI\" was never defined.
+if test -z "${HAVE_LMSENSORS_TRUE}" && test -z "${HAVE_LMSENSORS_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LMSENSORS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GALLIUM_EXTRA_HUD_TRUE}" && test -z "${HAVE_GALLIUM_EXTRA_HUD_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GALLIUM_EXTRA_HUD\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_WINDOWSDRI_TRUE}" && test -z "${HAVE_WINDOWSDRI_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_WINDOWSDRI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${ENABLE_SHADER_CACHE_TRUE}" && test -z "${ENABLE_SHADER_CACHE_FALSE}"; then
- as_fn_error $? "conditional \"ENABLE_SHADER_CACHE\" was never defined.
+if test -z "${HAVE_SHARED_GLAPI_TRUE}" && test -z "${HAVE_SHARED_GLAPI_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_SHARED_GLAPI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_XF86VIDMODE_TRUE}" && test -z "${HAVE_XF86VIDMODE_FALSE}"; then
@@ -28512,10 +28601,6 @@
as_fn_error $? "conditional \"HAVE_EGL_PLATFORM_ANDROID\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HAVE_EGL_DRIVER_DRI2_TRUE}" && test -z "${HAVE_EGL_DRIVER_DRI2_FALSE}"; then
- as_fn_error $? "conditional \"HAVE_EGL_DRIVER_DRI2\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${HAVE_GALLIUM_TESTS_TRUE}" && test -z "${HAVE_GALLIUM_TESTS_FALSE}"; then
as_fn_error $? "conditional \"HAVE_GALLIUM_TESTS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28556,6 +28641,14 @@
as_fn_error $? "conditional \"HAVE_GALLIUM_FREEDRENO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_GALLIUM_ETNAVIV_TRUE}" && test -z "${HAVE_GALLIUM_ETNAVIV_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GALLIUM_ETNAVIV\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GALLIUM_IMX_TRUE}" && test -z "${HAVE_GALLIUM_IMX_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GALLIUM_IMX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_GALLIUM_SOFTPIPE_TRUE}" && test -z "${HAVE_GALLIUM_SOFTPIPE_FALSE}"; then
as_fn_error $? "conditional \"HAVE_GALLIUM_SOFTPIPE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28608,10 +28701,18 @@
as_fn_error $? "conditional \"HAVE_SWRAST_DRI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_RADEON_VULKAN_TRUE}" && test -z "${HAVE_RADEON_VULKAN_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_RADEON_VULKAN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_INTEL_VULKAN_TRUE}" && test -z "${HAVE_INTEL_VULKAN_FALSE}"; then
as_fn_error $? "conditional \"HAVE_INTEL_VULKAN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_AMD_DRIVERS_TRUE}" && test -z "${HAVE_AMD_DRIVERS_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_AMD_DRIVERS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_INTEL_DRIVERS_TRUE}" && test -z "${HAVE_INTEL_DRIVERS_FALSE}"; then
as_fn_error $? "conditional \"HAVE_INTEL_DRIVERS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -28632,8 +28733,8 @@
as_fn_error $? "conditional \"HAVE_GALLIUM_COMPUTE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HAVE_MESA_LLVM_TRUE}" && test -z "${HAVE_MESA_LLVM_FALSE}"; then
- as_fn_error $? "conditional \"HAVE_MESA_LLVM\" was never defined.
+if test -z "${HAVE_GALLIUM_LLVM_TRUE}" && test -z "${HAVE_GALLIUM_LLVM_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GALLIUM_LLVM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_VC4_SIMULATOR_TRUE}" && test -z "${USE_VC4_SIMULATOR_FALSE}"; then
@@ -28668,6 +28769,10 @@
as_fn_error $? "conditional \"HAVE_SPARC_ASM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_VULKAN_COMMON_TRUE}" && test -z "${HAVE_VULKAN_COMMON_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_VULKAN_COMMON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -29065,7 +29170,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Mesa $as_me 12.0.6, which was
+This file was extended by Mesa $as_me 17.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -29122,7 +29227,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Mesa config.status 12.0.6
+Mesa config.status 17.0.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -29625,6 +29730,8 @@
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/amd/Makefile") CONFIG_FILES="$CONFIG_FILES src/amd/Makefile" ;;
+ "src/amd/vulkan/Makefile") CONFIG_FILES="$CONFIG_FILES src/amd/vulkan/Makefile" ;;
"src/compiler/Makefile") CONFIG_FILES="$CONFIG_FILES src/compiler/Makefile" ;;
"src/egl/Makefile") CONFIG_FILES="$CONFIG_FILES src/egl/Makefile" ;;
"src/egl/main/egl.pc") CONFIG_FILES="$CONFIG_FILES src/egl/main/egl.pc" ;;
@@ -29650,6 +29757,8 @@
"src/gallium/drivers/svga/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/svga/Makefile" ;;
"src/gallium/drivers/swr/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/swr/Makefile" ;;
"src/gallium/drivers/trace/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/trace/Makefile" ;;
+ "src/gallium/drivers/etnaviv/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/etnaviv/Makefile" ;;
+ "src/gallium/drivers/imx/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/imx/Makefile" ;;
"src/gallium/drivers/vc4/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/vc4/Makefile" ;;
"src/gallium/drivers/virgl/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/drivers/virgl/Makefile" ;;
"src/gallium/state_trackers/clover/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/state_trackers/clover/Makefile" ;;
@@ -29679,6 +29788,8 @@
"src/gallium/targets/xvmc/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/targets/xvmc/Makefile" ;;
"src/gallium/tests/trivial/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/tests/trivial/Makefile" ;;
"src/gallium/tests/unit/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/tests/unit/Makefile" ;;
+ "src/gallium/winsys/etnaviv/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/winsys/etnaviv/drm/Makefile" ;;
+ "src/gallium/winsys/imx/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/winsys/imx/drm/Makefile" ;;
"src/gallium/winsys/freedreno/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/winsys/freedreno/drm/Makefile" ;;
"src/gallium/winsys/i915/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/winsys/i915/drm/Makefile" ;;
"src/gallium/winsys/intel/drm/Makefile") CONFIG_FILES="$CONFIG_FILES src/gallium/winsys/intel/drm/Makefile" ;;
@@ -29699,10 +29810,11 @@
"src/glx/Makefile") CONFIG_FILES="$CONFIG_FILES src/glx/Makefile" ;;
"src/glx/apple/Makefile") CONFIG_FILES="$CONFIG_FILES src/glx/apple/Makefile" ;;
"src/glx/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/glx/tests/Makefile" ;;
+ "src/glx/windows/Makefile") CONFIG_FILES="$CONFIG_FILES src/glx/windows/Makefile" ;;
+ "src/glx/windows/windowsdriproto.pc") CONFIG_FILES="$CONFIG_FILES src/glx/windows/windowsdriproto.pc" ;;
"src/gtest/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtest/Makefile" ;;
"src/intel/Makefile") CONFIG_FILES="$CONFIG_FILES src/intel/Makefile" ;;
- "src/intel/genxml/Makefile") CONFIG_FILES="$CONFIG_FILES src/intel/genxml/Makefile" ;;
- "src/intel/isl/Makefile") CONFIG_FILES="$CONFIG_FILES src/intel/isl/Makefile" ;;
+ "src/intel/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/intel/tools/Makefile" ;;
"src/intel/vulkan/Makefile") CONFIG_FILES="$CONFIG_FILES src/intel/vulkan/Makefile" ;;
"src/loader/Makefile") CONFIG_FILES="$CONFIG_FILES src/loader/Makefile" ;;
"src/mapi/Makefile") CONFIG_FILES="$CONFIG_FILES src/mapi/Makefile" ;;
@@ -29727,6 +29839,7 @@
"src/mesa/main/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/mesa/main/tests/Makefile" ;;
"src/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;;
"src/util/tests/hash_table/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/tests/hash_table/Makefile" ;;
+ "src/vulkan/wsi/Makefile") CONFIG_FILES="$CONFIG_FILES src/vulkan/wsi/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -31001,9 +31114,6 @@
# Fix up dependencies in *.Plo files, where we changed the extension of a
# source file
$SED -i -e 's/brw_blorp.cpp/brw_blorp.c/' src/mesa/drivers/dri/i965/.deps/brw_blorp.Plo
-$SED -i -e 's/gen6_blorp.cpp/gen6_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen6_blorp.Plo
-$SED -i -e 's/gen7_blorp.cpp/gen7_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen7_blorp.Plo
-$SED -i -e 's/gen8_blorp.cpp/gen8_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen8_blorp.Plo
echo ""
@@ -31060,15 +31170,20 @@
echo " EGL platforms: $egl_platforms"
egl_drivers=""
- if test "x$HAVE_EGL_DRIVER_DRI2" != "x"; then
+ if test "x$enable_dri" != "xno"; then
egl_drivers="$egl_drivers builtin:egl_dri2"
fi
- if test "x$HAVE_EGL_DRIVER_DRI3" != "x"; then
+ if test "x$enable_dri3" != "xno"; then
egl_drivers="$egl_drivers builtin:egl_dri3"
fi
echo " EGL drivers: $egl_drivers"
fi
+if test "x$enable_gbm" = xyes; then
+ echo " GBM: yes"
+else
+ echo " GBM: no"
+fi
# Vulkan
echo ""
@@ -31080,7 +31195,7 @@
fi
echo ""
-if test "x$MESA_LLVM" = x1; then
+if test "x$enable_gallium_llvm" = xyes; then
echo " llvm: yes"
echo " llvm-config: $LLVM_CONFIG"
echo " llvm-version: $LLVM_VERSION"
@@ -31097,9 +31212,16 @@
fi
echo ""
-echo " Shader cache: $enable_shader_cache"
-if test "x$enable_shader_cache" = "xyes"; then
- echo " With SHA1 from: $with_sha1"
+if test "x$enable_gallium_extra_hud" != xyes; then
+ echo " HUD extra stats: no"
+else
+ echo " HUD extra stats: yes"
+fi
+
+if test "x$enable_lmsensors" != xyes; then
+ echo " HUD lmsensors: no"
+else
+ echo " HUD lmsensors: yes"
fi
echo ""
@@ -31118,7 +31240,7 @@
echo " CXXFLAGS: $cxxflags"
echo " Macros: $defines"
echo ""
-if test "x$MESA_LLVM" = x1; then
+if test "x$enable_gallium_llvm" = xyes; then
echo " LLVM_CFLAGS: $LLVM_CFLAGS"
echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
diff -Nru mesa-12.0.6/configure.ac mesa-17.0.7/configure.ac
--- mesa-12.0.6/configure.ac 2017-01-24 01:41:27.000000000 +0000
+++ mesa-17.0.7/configure.ac 2017-06-01 10:37:10.000000000 +0000
@@ -9,7 +9,6 @@
dnl Copyright © 2011-2012 Benjamin Franzke
dnl Copyright © 2008-2014 David Airlie
dnl Copyright © 2009-2013 Brian Paul
-dnl Copyright © 2003-2007 Keith Packard, Daniel Stone
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -74,22 +73,32 @@
LIBDRM_INTEL_REQUIRED=2.4.61
LIBDRM_NVVIEUX_REQUIRED=2.4.66
LIBDRM_NOUVEAU_REQUIRED=2.4.66
-LIBDRM_FREEDRENO_REQUIRED=2.4.67
+LIBDRM_FREEDRENO_REQUIRED=2.4.74
+LIBDRM_VC4_REQUIRED=2.4.69
+LIBDRM_ETNAVIV_REQUIRED=2.4.74
DRI2PROTO_REQUIRED=2.6
DRI3PROTO_REQUIRED=1.0
PRESENTPROTO_REQUIRED=1.0
-LIBUDEV_REQUIRED=151
GLPROTO_REQUIRED=1.4.14
LIBOMXIL_BELLAGIO_REQUIRED=0.0
LIBVA_REQUIRED=0.38.0
VDPAU_REQUIRED=1.1
-WAYLAND_REQUIRED=1.2.0
+WAYLAND_REQUIRED=1.11
XCB_REQUIRED=1.9.3
XCBDRI2_REQUIRED=1.8
XCBGLX_REQUIRED=1.8.1
XSHMFENCE_REQUIRED=1.1
XVMC_REQUIRED=1.0.6
-PYTHON_MAKO_REQUIRED=0.3.4
+PYTHON_MAKO_REQUIRED=0.8.0
+LIBSENSORS_REQUIRED=4.0.0
+
+dnl LLVM versions
+LLVM_REQUIRED_GALLIUM=3.3.0
+LLVM_REQUIRED_OPENCL=3.6.0
+LLVM_REQUIRED_R600=3.6.0
+LLVM_REQUIRED_RADEONSI=3.6.0
+LLVM_REQUIRED_RADV=3.9.0
+LLVM_REQUIRED_SWR=3.6.0
dnl Check for progs
AC_PROG_CPP
@@ -108,6 +117,7 @@
LT_INIT([disable-static])
AC_CHECK_PROG(RM, rm, [rm -f])
+AC_CHECK_PROG(XXD, xxd, [xxd])
AX_PROG_BISON([],
AS_IF([test ! -f "$srcdir/src/compiler/glsl/glcpp/glcpp-parse.c"],
@@ -228,6 +238,7 @@
AX_GCC_FUNC_ATTRIBUTE([visibility])
AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
AX_GCC_FUNC_ATTRIBUTE([weak])
+AX_GCC_FUNC_ATTRIBUTE([alias])
AM_CONDITIONAL([GEN_ASM_OFFSETS], test "x$GEN_ASM_OFFSETS" = xyes)
@@ -255,15 +266,12 @@
*-android)
android=yes
;;
-linux*|*-gnu*|gnu*)
+linux*|*-gnu*|gnu*|cygwin*)
DEFINES="$DEFINES -D_GNU_SOURCE"
;;
solaris*)
DEFINES="$DEFINES -DSVR4"
;;
-cygwin*)
- DEFINES="$DEFINES -D_XOPEN_SOURCE=700"
- ;;
esac
AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)
@@ -302,16 +310,9 @@
# Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
CFLAGS=$save_CFLAGS
- # Work around aliasing bugs - developers should comment this out
- CFLAGS="$CFLAGS -fno-strict-aliasing"
-
# We don't want floating-point math functions to set errno or trap
CFLAGS="$CFLAGS -fno-math-errno -fno-trapping-math"
- # gcc's builtin memcmp is slower than glibc's
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
- CFLAGS="$CFLAGS -fno-builtin-memcmp"
-
# Flags to help ensure that certain portions of the code -- and only those
# portions -- can be built with MSVC:
# - src/util, src/gallium/auxiliary, rc/gallium/drivers/llvmpipe, and
@@ -348,12 +349,8 @@
# Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
CXXFLAGS=$save_CXXFLAGS
- # Work around aliasing bugs - developers should comment this out
- CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
-
- # gcc's builtin memcmp is slower than glibc's
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
- CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
+ # We don't want floating-point math functions to set errno or trap
+ CXXFLAGS="$CXXFLAGS -fno-math-errno -fno-trapping-math"
fi
AC_SUBST([MSVC2013_COMPAT_CFLAGS])
@@ -399,6 +396,17 @@
AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1])
AC_SUBST([SSE41_CFLAGS], $SSE41_CFLAGS)
+dnl Check for new-style atomic builtins
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+int main() {
+ int n;
+ return __atomic_load_n(&n, __ATOMIC_ACQUIRE);
+}]])], GCC_ATOMIC_BUILTINS_SUPPORTED=1)
+if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = x1; then
+ DEFINES="$DEFINES -DUSE_GCC_ATOMIC_BUILTINS"
+fi
+AM_CONDITIONAL([GCC_ATOMIC_BUILTINS_SUPPORTED], [test x$GCC_ATOMIC_BUILTINS_SUPPORTED = x1])
+
dnl Check for Endianness
AC_C_BIGENDIAN(
little_endian=no,
@@ -459,12 +467,10 @@
dnl was explicitly requested.
case "x$enable_static$enable_shared" in
xyesyes)
- AC_MSG_WARN([Cannot build static and shared libraries, disabling shared])
- enable_shared=no
+ AC_MSG_ERROR([Cannot enable both static and shared. Building using --enable-shared is strongly recommended])
;;
xnono)
- AC_MSG_WARN([Cannot disable both static and shared libraries, enabling shared])
- enable_shared=yes
+ AC_MSG_ERROR([Cannot disable both static and shared. Building using --enable-shared is strongly recommended])
;;
esac
@@ -824,12 +830,27 @@
fi
dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS
dnl to -pthread, which causes problems if we need -lpthread to appear in
-dnl pkgconfig files.
-test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
+dnl pkgconfig files. Since Android doesn't have a pthread lib, this check
+dnl is not valid for that platform.
+if test "x$android" = xno; then
+ test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
+fi
+
+dnl pthread-stubs is mandatory on targets where it exists
+case "$host_os" in
+cygwin* )
+ pthread_stubs_possible="no"
+ ;;
+* )
+ pthread_stubs_possible="yes"
+ ;;
+esac
-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
-AC_SUBST(PTHREADSTUBS_CFLAGS)
-AC_SUBST(PTHREADSTUBS_LIBS)
+if test "x$pthread_stubs_possible" = xyes; then
+ PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
+ AC_SUBST(PTHREADSTUBS_CFLAGS)
+ AC_SUBST(PTHREADSTUBS_LIBS)
+fi
dnl SELinux awareness.
AC_ARG_ENABLE([selinux],
@@ -849,6 +870,207 @@
AC_SUBST([SELINUX_CFLAGS])
AC_SUBST([SELINUX_LIBS])
+dnl
+dnl LLVM
+dnl
+AC_ARG_ENABLE([llvm-shared-libs],
+ [AS_HELP_STRING([--enable-llvm-shared-libs],
+ [link with LLVM shared libraries @<:@default=enabled@:>@])],
+ [enable_llvm_shared_libs="$enableval"],
+ [enable_llvm_shared_libs=yes])
+
+AC_ARG_WITH([llvm-prefix],
+ [AS_HELP_STRING([--with-llvm-prefix],
+ [Prefix for LLVM installations in non-standard locations])],
+ [llvm_prefix="$withval"],
+ [llvm_prefix=''])
+
+PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [have_libelf=no])
+if test "x$have_libelf" = xno; then
+ LIBELF_LIBS=''
+ LIBELF_CFLAGS=''
+ AC_CHECK_LIB([elf], [elf_memory], [have_libelf=yes;LIBELF_LIBS=-lelf], [have_libelf=no])
+ AC_SUBST([LIBELF_LIBS])
+ AC_SUBST([LIBELF_CFLAGS])
+fi
+
+if test -z "$LLVM_CONFIG"; then
+ if test -n "$llvm_prefix"; then
+ AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
+ else
+ AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
+ fi
+fi
+
+llvm_add_component() {
+ new_llvm_component=$1
+ driver_name=$2
+
+ if $LLVM_CONFIG --components | grep -iqw $new_llvm_component ; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ${new_llvm_component}"
+ else
+ AC_MSG_ERROR([LLVM component '$new_llvm_component' not enabled in your LLVM build. Required by $driver_name.])
+ fi
+}
+
+llvm_add_default_components() {
+ driver_name=$1
+
+ # Required default components
+ llvm_add_component "bitwriter" $driver_name
+ llvm_add_component "engine" $driver_name
+ llvm_add_component "mcdisassembler" $driver_name
+ llvm_add_component "mcjit" $driver_name
+
+ # Optional default components
+ if $LLVM_CONFIG --components | grep -iqw inteljitevents ; then
+ LLVM_COMPONENTS="$LLVM_COMPONENTS inteljitevents"
+ fi
+}
+
+llvm_add_target() {
+ new_llvm_target=$1
+ driver_name=$2
+
+ if $LLVM_CONFIG --targets-built | grep -iqw $new_llvm_target ; then
+ llvm_add_component $new_llvm_target $driver_name
+ else
+ AC_MSG_ERROR([LLVM target '$new_llvm_target' not enabled in your LLVM build. Required by $driver_name.])
+ fi
+}
+
+# Call this inside ` ` to get the return value.
+# $1 is the llvm-config command with arguments.
+strip_unwanted_llvm_flags() {
+ # Use \> (marks the end of the word)
+ echo " `$1`" | sed \
+ -e 's/\s\+-m\S*//g' \
+ -e 's/\s\+-DNDEBUG\>//g' \
+ -e 's/\s\+-D_GNU_SOURCE\>//g' \
+ -e 's/\s\+-pedantic\>//g' \
+ -e 's/\s\+-W\S*//g' \
+ -e 's/\s\+-O\S*//g' \
+ -e 's/\s\+-g\S*//g' \
+ -e 's/-fno-rtti\>/-Fno-rtti/g' \
+ -e 's/\s\+-f\S*//g' \
+ -e 's/-Fno-rtti\>/-fno-rtti/g' \
+ -e 's/^ //'
+}
+
+llvm_set_environment_variables() {
+ if test "x$LLVM_CONFIG" != xno; then
+ LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
+ LLVM_BINDIR=`$LLVM_CONFIG --bindir`
+ LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
+ LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
+ LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
+
+ # We need to respect LLVM_CPPFLAGS when compiling LLVM headers.
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $LLVM_CPPFLAGS"
+
+ AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
+ [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
+ AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
+ [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
+ AC_COMPUTE_INT([LLVM_VERSION_PATCH], [LLVM_VERSION_PATCH],
+ [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
+
+ CFLAGS="$save_CFLAGS"
+
+ # Only needed for LLVM < 3.6.0
+ if test -z "$LLVM_VERSION_PATCH"; then
+ LLVM_VERSION_PATCH=0
+ fi
+
+ if test "$LLVM_VERSION_MINOR" -lt 10; then
+ LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
+ else
+ LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}"
+ fi
+
+ FOUND_LLVM=yes
+ else
+ FOUND_LLVM=no
+ LLVM_VERSION_INT=0
+ fi
+}
+
+require_llvm() {
+ if test "x$enable_gallium_llvm" != "xyes"; then
+ AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
+ fi
+}
+
+llvm_require_version() {
+ require_llvm $2
+
+ llvm_target_version_major=`echo $1 | cut -d. -f1 | egrep -o '^[[0-9]]+'`
+ llvm_target_version_minor=`echo $1 | cut -d. -f2 | egrep -o '^[[0-9]]+'`
+ llvm_target_version_patch=`echo $1 | cut -d. -f3 | egrep -o '^[[0-9]]+'`
+
+ if test "$LLVM_VERSION_MAJOR" -gt "$llvm_target_version_major"; then
+ # major > required major
+ # --> OK
+ return
+ fi
+
+ if test "$LLVM_VERSION_MAJOR" -eq "$llvm_target_version_major"; then
+ if test "$LLVM_VERSION_MINOR" -gt "$llvm_target_version_minor"; then
+ # major = required major and
+ # minor > required minor
+ # --> OK
+ return
+ else
+ if test "$LLVM_VERSION_MINOR" -eq "$llvm_target_version_minor"; then
+ if test "$LLVM_VERSION_PATCH" -ge "$llvm_target_version_patch"; then
+ # major = required major and
+ # minor = required minor and
+ # patch >= required patch
+ # --> OK
+ return
+ fi
+ fi
+ fi
+ fi
+
+ AC_MSG_ERROR([LLVM $1 or newer is required for $2])
+}
+
+radeon_llvm_check() {
+ if test ${LLVM_VERSION_INT} -lt 307; then
+ amdgpu_llvm_target_name='r600'
+ else
+ amdgpu_llvm_target_name='amdgpu'
+ fi
+
+ llvm_require_version $*
+
+ llvm_add_target $amdgpu_llvm_target_name $2
+
+ llvm_add_default_components $2
+ llvm_add_component "bitreader" $2
+ llvm_add_component "ipo" $2
+
+ NEED_RADEON_LLVM=yes
+ if test "x$have_libelf" != xyes; then
+ AC_MSG_ERROR([$1 requires libelf when using llvm])
+ fi
+}
+
+llvm_set_environment_variables
+
+AC_SUBST([MESA_LLVM])
+AC_SUBST([LLVM_BINDIR])
+AC_SUBST([LLVM_CFLAGS])
+AC_SUBST([LLVM_CPPFLAGS])
+AC_SUBST([LLVM_CXXFLAGS])
+AC_SUBST([LLVM_LIBDIR])
+AC_SUBST([LLVM_LIBS])
+AC_SUBST([LLVM_LDFLAGS])
+AC_SUBST([LLVM_INCLUDEDIR])
+AC_SUBST([LLVM_VERSION])
+
dnl Options for APIs
AC_ARG_ENABLE([opengl],
[AS_HELP_STRING([--disable-opengl],
@@ -872,6 +1094,32 @@
[enable_dri="$enableval"],
[enable_dri=yes])
+AC_ARG_ENABLE([gallium-extra-hud],
+ [AS_HELP_STRING([--enable-gallium-extra-hud],
+ [enable HUD block/NIC I/O HUD stats support @<:@default=disabled@:>@])],
+ [enable_gallium_extra_hud="$enableval"],
+ [enable_gallium_extra_hud=no])
+AM_CONDITIONAL(HAVE_GALLIUM_EXTRA_HUD, test "x$enable_gallium_extra_hud" = xyes)
+if test "x$enable_gallium_extra_hud" = xyes ; then
+ DEFINES="${DEFINES} -DHAVE_GALLIUM_EXTRA_HUD=1"
+fi
+
+#TODO: no pkgconfig .pc available for libsensors.
+#PKG_CHECK_MODULES([LIBSENSORS], [libsensors >= $LIBSENSORS_REQUIRED], [enable_lmsensors=yes], [enable_lmsensors=no])
+AC_ARG_ENABLE([lmsensors],
+ [AS_HELP_STRING([--enable-lmsensors],
+ [enable HUD lmsensor support @<:@default=disabled@:>@])],
+ [enable_lmsensors="$enableval"],
+ [enable_lmsensors=no])
+AM_CONDITIONAL(HAVE_LIBSENSORS, test "x$enable_lmsensors" = xyes)
+if test "x$enable_lmsensors" = xyes ; then
+ DEFINES="${DEFINES} -DHAVE_LIBSENSORS=1"
+ LIBSENSORS_LIBS="-lsensors"
+else
+ LIBSENSORS_LIBS=""
+fi
+AC_SUBST(LIBSENSORS_LIBS)
+
case "$host_os" in
linux*)
dri3_default=yes
@@ -918,9 +1166,16 @@
[enable_xa=no])
AC_ARG_ENABLE([gbm],
[AS_HELP_STRING([--enable-gbm],
- [enable gbm library @<:@default=auto@:>@])],
+ [enable gbm library @<:@default=yes except cygwin@:>@])],
[enable_gbm="$enableval"],
- [enable_gbm=auto])
+ [case "$host_os" in
+ cygwin*)
+ enable_gbm=no
+ ;;
+ *)
+ enable_gbm=yes
+ ;;
+ esac])
AC_ARG_ENABLE([nine],
[AS_HELP_STRING([--enable-nine],
[enable build of the nine Direct3D9 API @<:@default=no@:>@])],
@@ -973,7 +1228,7 @@
AC_ARG_WITH([gallium-drivers],
[AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
[comma delimited Gallium drivers list, e.g.
- "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl"
+ "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
@<:@default=r300,r600,svga,swrast@:>@])],
[with_gallium_drivers="$withval"],
[with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
@@ -1103,11 +1358,20 @@
DEFINES="$DEFINES -DHAVE_LIBDRM"
fi
+require_libdrm() {
+ if test "x$have_libdrm" != xyes; then
+ AC_MSG_ERROR([$1 requires libdrm >= $LIBDRM_REQUIRED])
+ fi
+}
+
+
# Select which platform-dependent DRI code gets built
case "$host_os" in
darwin*)
dri_platform='apple' ;;
-gnu*|cygwin*)
+cygwin*)
+ dri_platform='windows' ;;
+gnu*)
dri_platform='none' ;;
*)
dri_platform='drm' ;;
@@ -1123,6 +1387,9 @@
AM_CONDITIONAL(HAVE_DRI2, test "x$enable_dri" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes )
AM_CONDITIONAL(HAVE_DRI3, test "x$enable_dri3" = xyes -a "x$dri_platform" = xdrm -a "x$have_libdrm" = xyes )
AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = xapple )
+AM_CONDITIONAL(HAVE_LMSENSORS, test "x$enable_lmsensors" = xyes )
+AM_CONDITIONAL(HAVE_GALLIUM_EXTRA_HUD, test "x$enable_gallium_extra_hud" = xyes )
+AM_CONDITIONAL(HAVE_WINDOWSDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = xwindows )
AC_ARG_ENABLE([shared-glapi],
[AS_HELP_STRING([--enable-shared-glapi],
@@ -1159,172 +1426,24 @@
fi
fi
-AC_SUBST([MESA_LLVM])
-
-# SHA1 hashing
-AC_ARG_WITH([sha1],
- [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI],
- [choose SHA1 implementation])])
-case "x$with_sha1" in
-x | xlibc | xlibmd | xlibnettle | xlibgcrypt | xlibcrypto | xlibsha1 | xCommonCrypto | xCryptoAPI)
- ;;
-*)
- AC_MSG_ERROR([Illegal value for --with-sha1: $with_sha1])
-esac
-
-AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes])
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then
- with_sha1=libc
-fi
-if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then
- AC_MSG_ERROR([sha1 in libc requested but not found])
-fi
-if test "x$with_sha1" = xlibc; then
- AC_DEFINE([HAVE_SHA1_IN_LIBC], [1],
- [Use libc SHA1 functions])
- SHA1_LIBS=""
-fi
-AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes])
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then
- with_sha1=CommonCrypto
-fi
-if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then
- AC_MSG_ERROR([CommonCrypto requested but not found])
-fi
-if test "x$with_sha1" = xCommonCrypto; then
- AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1],
- [Use CommonCrypto SHA1 functions])
- SHA1_LIBS=""
-fi
-dnl stdcall functions cannot be tested with AC_CHECK_LIB
-AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include ])
-if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then
- with_sha1=CryptoAPI
-fi
-if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then
- AC_MSG_ERROR([CryptoAPI requested but not found])
-fi
-if test "x$with_sha1" = xCryptoAPI; then
- AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1],
- [Use CryptoAPI SHA1 functions])
- SHA1_LIBS=""
-fi
-AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes])
-if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then
- with_sha1=libmd
-fi
-if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then
- AC_MSG_ERROR([libmd requested but not found])
-fi
-if test "x$with_sha1" = xlibmd; then
- AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1],
- [Use libmd SHA1 functions])
- SHA1_LIBS=-lmd
-fi
-PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no])
-if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then
- with_sha1=libsha1
-fi
-if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then
- AC_MSG_ERROR([libsha1 requested but not found])
-fi
-if test "x$with_sha1" = xlibsha1; then
- AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1],
- [Use libsha1 for SHA1])
- SHA1_LIBS=-lsha1
-fi
-AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes])
-if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then
- with_sha1=libnettle
-fi
-if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then
- AC_MSG_ERROR([libnettle requested but not found])
-fi
-if test "x$with_sha1" = xlibnettle; then
- AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1],
- [Use libnettle SHA1 functions])
- SHA1_LIBS=-lnettle
-fi
-AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes])
-if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then
- with_sha1=libgcrypt
-fi
-if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then
- AC_MSG_ERROR([libgcrypt requested but not found])
-fi
-if test "x$with_sha1" = xlibgcrypt; then
- AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1],
- [Use libgcrypt SHA1 functions])
- SHA1_LIBS=-lgcrypt
-fi
-# We don't need all of the OpenSSL libraries, just libcrypto
-AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes])
-PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes],
- [HAVE_OPENSSL_PKC=no])
-if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then
- if test "x$with_sha1" = x; then
- with_sha1=libcrypto
- fi
-else
- if test "x$with_sha1" = xlibcrypto; then
- AC_MSG_ERROR([OpenSSL libcrypto requested but not found])
- fi
-fi
-if test "x$with_sha1" = xlibcrypto; then
- if test "x$HAVE_LIBCRYPTO" = xyes; then
- SHA1_LIBS=-lcrypto
- else
- SHA1_LIBS="$OPENSSL_LIBS"
- SHA1_CFLAGS="$OPENSSL_CFLAGS"
- fi
-fi
-AC_MSG_CHECKING([for SHA1 implementation])
-AC_MSG_RESULT([$with_sha1])
-AC_SUBST(SHA1_LIBS)
-AC_SUBST(SHA1_CFLAGS)
-
-# Enable a define for SHA1
-if test "x$with_sha1" != "x"; then
- DEFINES="$DEFINES -DHAVE_SHA1"
-fi
-
-# Allow user to configure out the shader-cache feature
-AC_ARG_ENABLE([shader-cache],
- AS_HELP_STRING([--disable-shader-cache], [Disable binary shader cache]),
- [enable_shader_cache="$enableval"],
- [if test "x$with_sha1" != "x"; then
- enable_shader_cache=yes
- else
- enable_shader_cache=no
- fi])
-if test "x$with_sha1" = "x"; then
- if test "x$enable_shader_cache" = "xyes"; then
- AC_MSG_ERROR([Cannot enable shader cache (no SHA-1 implementation found)])
+require_dri_shared_libs_and_glapi() {
+ if test "x$enable_static" = xyes; then
+ AC_MSG_ERROR([$1 cannot be build as static library])
fi
-fi
-AM_CONDITIONAL([ENABLE_SHADER_CACHE], [test x$enable_shader_cache = xyes])
-case "$host_os" in
-linux*)
- need_pci_id=yes ;;
-*)
- need_pci_id=no ;;
-esac
-
-PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
- have_libudev=yes, have_libudev=no)
+ if test "x$enable_dri" != xyes; then
+ # There is only a single backend which won't be build/used otherwise.
+ # XXX: Revisit this as the egl/haiku is a thing.
+ AC_MSG_ERROR([$1 requires --enable-dri])
+ fi
-AC_ARG_ENABLE([sysfs],
- [AS_HELP_STRING([--enable-sysfs],
- [enable /sys PCI identification @<:@default=disabled@:>@])],
- [have_sysfs="$enableval"],
- [have_sysfs=no]
-)
+ if test "x$enable_shared_glapi" != xyes; then
+ AC_MSG_ERROR([$1 requires --enable-shared-glapi])
+ fi
+}
if test "x$enable_dri" = xyes; then
- if test "$enable_static" = yes; then
- AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
- fi
+ require_dri_shared_libs_and_glapi "DRI"
# not a hard requirement as swrast does not depend on it
if test "x$have_libdrm" = xyes; then
@@ -1342,6 +1461,9 @@
dnl
dnl libGL configuration per driver
dnl
+if test "x$enable_glx" != xno; then
+ PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
+fi
case "x$enable_glx" in
xxlib | xgallium-xlib)
# Xlib-based GLX
@@ -1355,7 +1477,6 @@
;;
xdri)
# DRI-based GLX
- PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
# find the DRI deps for libGL
dri_modules="x11 xext xdamage xfixes x11-xcb xcb xcb-glx >= $XCBGLX_REQUIRED"
@@ -1363,9 +1484,7 @@
if test x"$driglx_direct" = xyes; then
if test x"$dri_platform" = xdrm ; then
DEFINES="$DEFINES -DGLX_USE_DRM"
- if test "x$have_libdrm" != xyes; then
- AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED])
- fi
+ require_libdrm "Direct rendering"
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
@@ -1387,6 +1506,9 @@
if test x"$dri_platform" = xapple ; then
DEFINES="$DEFINES -DGLX_USE_APPLEGL"
fi
+ if test x"$dri_platform" = xwindows ; then
+ DEFINES="$DEFINES -DGLX_USE_WINDOWSGL"
+ fi
fi
# add xf86vidmode if available
@@ -1406,17 +1528,6 @@
;;
esac
-have_pci_id=no
-if test "$have_libudev" = yes; then
- DEFINES="$DEFINES -DHAVE_LIBUDEV"
- have_pci_id=yes
-fi
-
-if test "$have_sysfs" = yes; then
- DEFINES="$DEFINES -DHAVE_SYSFS"
- have_pci_id=yes
-fi
-
# This is outside the case (above) so that it is invoked even for non-GLX
# builds.
AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
@@ -1460,13 +1571,14 @@
AC_ARG_ENABLE([glx-tls],
[AS_HELP_STRING([--enable-glx-tls],
- [enable TLS support in GLX @<:@default=disabled@:>@])],
+ [enable TLS support in GLX @<:@default=enabled@:>@])],
[GLX_USE_TLS="$enableval"],
- [GLX_USE_TLS=no])
+ [GLX_USE_TLS=yes])
AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
-AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
- [DEFINES="${DEFINES} -DGLX_USE_TLS"])
+if test "x$GLX_USE_TLS" = xyes; then
+ DEFINES="$DEFINES -DGLX_USE_TLS"
+fi
dnl Read-only text section on x86 hardened platforms
AC_ARG_ENABLE([glx-read-only-text],
@@ -1520,15 +1632,10 @@
# Platform specific settings and drivers to build
case "$host_os" in
linux*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
if test "x$enable_dri3" = xyes; then
DEFINES="$DEFINES -DHAVE_DRI3"
fi
- if test "x$have_pci_id" != xyes; then
- AC_MSG_ERROR([libudev-dev or sysfs required for building DRI])
- fi
-
case "$host_cpu" in
powerpc* | sparc*)
# Build only the drivers for cards that exist on PowerPC/sparc
@@ -1538,19 +1645,13 @@
;;
esac
;;
- *freebsd* | dragonfly* | *netbsd* | openbsd*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
- ;;
- gnu*)
- DEFINES="$DEFINES -DHAVE_ALIAS"
- ;;
cygwin*)
if test "x$with_dri_drivers" = "xyes"; then
with_dri_drivers="swrast"
fi
;;
darwin*)
- DEFINES="$DEFINES -DGLX_ALIAS_UNSUPPORTED -DBUILDING_MESA"
+ DEFINES="$DEFINES -DBUILDING_MESA"
if test "x$with_dri_drivers" = "xyes"; then
with_dri_drivers="swrast"
fi
@@ -1620,6 +1721,34 @@
fi
+dnl
+dnl Gallium LLVM
+dnl
+dnl With follow-up commits we'll rework --enable-gallium-llvm to --enable-llvm
+dnl Since that is too invasive to stable, do the more conservative thing for now
+dnl and consider it as a global LLVM toggle.
+dnl
+AC_ARG_ENABLE([gallium-llvm],
+ [AS_HELP_STRING([--enable-gallium-llvm],
+ [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
+ [enable_gallium_llvm="$enableval"],
+ [enable_gallium_llvm=auto])
+
+if test "x$enable_gallium_llvm" = xauto; then
+ if test "x$FOUND_LLVM" = xyes; then
+ case "$host_cpu" in
+ i*86|x86_64|amd64) enable_gallium_llvm=yes;;
+ *) enable_gallium_llvm=no;;
+ esac
+ else
+ enable_gallium_llvm=no
+ fi
+fi
+
+if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then
+ AC_MSG_ERROR([--enable-gallium-llvm selected but llvm-config is not found])
+fi
+
#
# Vulkan driver configuration
#
@@ -1627,7 +1756,7 @@
AC_ARG_WITH([vulkan-drivers],
[AS_HELP_STRING([--with-vulkan-drivers@<:@=DIRS...@:>@],
[comma delimited Vulkan drivers list, e.g.
- "intel"
+ "intel,radeon"
@<:@default=no@:>@])],
[with_vulkan_drivers="$withval"],
[with_vulkan_drivers="no"])
@@ -1654,12 +1783,14 @@
if test "x$HAVE_I965_DRI" != xyes; then
AC_MSG_ERROR([Intel Vulkan driver requires the i965 dri driver])
fi
- if test "x$with_sha1" == "x"; then
- AC_MSG_ERROR([Intel Vulkan driver requires SHA1])
- fi
HAVE_INTEL_VULKAN=yes;
;;
+ xradeon)
+ PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
+ radeon_llvm_check $LLVM_REQUIRED_RADV "radv"
+ HAVE_RADEON_VULKAN=yes;
+ ;;
*)
AC_MSG_ERROR([Vulkan driver '$driver' does not exist])
;;
@@ -1669,6 +1800,7 @@
fi
+DEFINES="$DEFINES -DENABLE_SHADER_CACHE"
AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_glx" = xxlib -o \
"x$enable_osmesa" = xyes -o \
@@ -1720,38 +1852,12 @@
dnl
dnl gbm configuration
dnl
-if test "x$enable_gbm" = xauto; then
- case "$with_egl_platforms" in
- *drm*)
- enable_gbm=yes ;;
- *)
- enable_gbm=no ;;
- esac
-fi
if test "x$enable_gbm" = xyes; then
- if test "x$need_pci_id$have_pci_id" = xyesno; then
- AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED or sysfs])
- fi
-
- if test "x$enable_dri" = xyes; then
- if test "x$enable_shared_glapi" = xno; then
- AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
- fi
- else
- # Strictly speaking libgbm does not require --enable-dri, although
- # both of its backends do. Thus one can build libgbm without any
- # backends if --disable-dri is set.
- # To avoid unnecessary complexity of checking if at least one backend
- # is available when building, just mandate --enable-dri.
- AC_MSG_ERROR([gbm requires --enable-dri])
- fi
+ require_dri_shared_libs_and_glapi "gbm"
fi
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
-if test "x$need_pci_id$have_libudev" = xyesyes; then
- GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
-else
- GBM_PC_REQ_PRIV=""
-fi
+# FINISHME: GBM has a number of dependencies which we should add below
+GBM_PC_REQ_PRIV=""
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
AC_SUBST([GBM_PC_REQ_PRIV])
AC_SUBST([GBM_PC_LIB_PRIV])
@@ -1759,32 +1865,13 @@
dnl
dnl EGL configuration
dnl
-EGL_CLIENT_APIS=""
if test "x$enable_egl" = xyes; then
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS $PTHREAD_LIBS"
AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
- if test "$enable_static" != yes; then
- if test "x$enable_dri" = xyes; then
- HAVE_EGL_DRIVER_DRI2=1
- if test "x$enable_shared_glapi" = xno; then
- AC_MSG_ERROR([egl_dri2 requires --enable-shared-glapi])
- fi
- if test "x$enable_dri3" = xyes; then
- HAVE_EGL_DRIVER_DRI3=1
- if test "x$enable_shared_glapi" = xno; then
- AC_MSG_ERROR([egl_dri3 requires --enable-shared-glapi])
- fi
- fi
- else
- # Avoid building an "empty" libEGL. Drop/update this
- # when other backends (haiku?) come along.
- AC_MSG_ERROR([egl requires --enable-dri])
- fi
-
- fi
+ require_dri_shared_libs_and_glapi "egl"
fi
AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes)
AC_SUBST([EGL_LIB_DEPS])
@@ -1843,7 +1930,7 @@
"x$enable_va" = xyes; then
if test x"$enable_dri3" = xyes; then
PKG_CHECK_MODULES([VL], [xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
- x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
+ xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
else
PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
fi
@@ -1909,15 +1996,6 @@
[CLANG_LIBDIR=''])
PKG_CHECK_EXISTS([libclc], [have_libclc=yes], [have_libclc=no])
-PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [have_libelf=no])
-
-if test "x$have_libelf" = xno; then
- LIBELF_LIBS=''
- LIBELF_CFLAGS=''
- AC_CHECK_LIB([elf], [elf_memory], [have_libelf=yes;LIBELF_LIBS=-lelf], [have_libelf=no])
- AC_SUBST([LIBELF_LIBS])
- AC_SUBST([LIBELF_CFLAGS])
-fi
if test "x$enable_opencl" = xyes; then
if test -z "$with_gallium_drivers"; then
@@ -1951,36 +2029,51 @@
if test "x$have_libelf" != xyes; then
AC_MSG_ERROR([Clover requires libelf])
fi
+
+ if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then
+ altivec_enabled=no
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #if !defined(__VEC__) || !defined(__ALTIVEC__)
+ #error "AltiVec not enabled"
+ #endif
+ ])], altivec_enabled=yes)
+
+ if test "$altivec_enabled" = yes; then
+ CLOVER_STD_OVERRIDE="-std=gnu++11"
+ fi
+ AC_SUBST([CLOVER_STD_OVERRIDE])
+ fi
+
+ llvm_require_version $LLVM_REQUIRED_OPENCL "opencl"
+
+ llvm_add_default_components "opencl"
+ llvm_add_component "all-targets" "opencl"
+ llvm_add_component "linker" "opencl"
+ llvm_add_component "instrumentation" "opencl"
+ llvm_add_component "ipo" "opencl"
+ llvm_add_component "irreader" "opencl"
+ llvm_add_component "option" "opencl"
+ llvm_add_component "objcarcopts" "opencl"
+ llvm_add_component "profiledata" "opencl"
+
+ dnl Check for Clang internal headers
+ if test -z "$CLANG_LIBDIR"; then
+ CLANG_LIBDIR=${LLVM_LIBDIR}
+ fi
+ CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
+ AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
+ [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
fi
AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
AC_SUBST([OPENCL_LIBNAME])
+AC_SUBST([CLANG_RESOURCE_DIR])
dnl
dnl Gallium configuration
dnl
AM_CONDITIONAL(HAVE_GALLIUM, test -n "$with_gallium_drivers")
-AC_SUBST([LLVM_BINDIR])
-AC_SUBST([LLVM_CFLAGS])
-AC_SUBST([LLVM_CPPFLAGS])
-AC_SUBST([LLVM_CXXFLAGS])
-AC_SUBST([LLVM_LIBDIR])
-AC_SUBST([LLVM_LIBS])
-AC_SUBST([LLVM_LDFLAGS])
-AC_SUBST([LLVM_INCLUDEDIR])
-AC_SUBST([LLVM_VERSION])
-AC_SUBST([CLANG_RESOURCE_DIR])
-
-case "x$enable_opengl$enable_gles1$enable_gles2" in
-x*yes*)
- EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
- ;;
-esac
-
-AC_SUBST([VG_LIB_DEPS])
-AC_SUBST([EGL_CLIENT_APIS])
-
dnl
dnl EGL Platforms configuration
dnl
@@ -1990,9 +2083,13 @@
"x11,drm" @<:@default=auto@:>@])],
[with_egl_platforms="$withval"],
[if test "x$enable_egl" = xyes; then
- with_egl_platforms="x11"
+ if test "x$enable_gbm" = xyes; then
+ with_egl_platforms="x11,drm"
+ else
+ with_egl_platforms="x11"
+ fi
else
- with_egl_platforms=""
+ with_egl_platforms=""
fi])
if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
@@ -2011,8 +2108,6 @@
for plat in $egl_platforms; do
case "$plat" in
wayland)
- test "x$have_libdrm" != xyes &&
- AC_MSG_ERROR([EGL platform wayland requires libdrm >= $LIBDRM_REQUIRED])
PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
@@ -2028,16 +2123,13 @@
drm)
test "x$enable_gbm" = "xno" &&
AC_MSG_ERROR([EGL platform drm needs gbm])
- test "x$have_libdrm" != xyes &&
- AC_MSG_ERROR([EGL platform drm requires libdrm >= $LIBDRM_REQUIRED])
;;
surfaceless)
- test "x$have_libdrm" != xyes &&
- AC_MSG_ERROR([EGL platform surfaceless requires libdrm >= $LIBDRM_REQUIRED])
;;
android)
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
;;
*)
@@ -2045,10 +2137,11 @@
;;
esac
- case "$plat$need_pci_id$have_pci_id" in
- waylandyesno|drmyesno)
- AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs]) ;;
- esac
+ case "$plat" in
+ wayland|drm|surfaceless)
+ require_libdrm "Platform $plat"
+ ;;
+ esac
done
# libEGL wants to default to the first platform specified in
@@ -2066,8 +2159,6 @@
AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
-AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
-
AC_SUBST([EGL_NATIVE_PLATFORM])
AC_SUBST([EGL_CFLAGS])
@@ -2078,147 +2169,6 @@
GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
fi
-dnl
-dnl Gallium LLVM
-dnl
-AC_ARG_ENABLE([gallium-llvm],
- [AS_HELP_STRING([--enable-gallium-llvm],
- [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
- [enable_gallium_llvm="$enableval"],
- [enable_gallium_llvm=auto])
-
-AC_ARG_ENABLE([llvm-shared-libs],
- [AS_HELP_STRING([--enable-llvm-shared-libs],
- [link with LLVM shared libraries @<:@default=enabled@:>@])],
- [enable_llvm_shared_libs="$enableval"],
- [enable_llvm_shared_libs=yes])
-
-AC_ARG_WITH([llvm-prefix],
- [AS_HELP_STRING([--with-llvm-prefix],
- [Prefix for LLVM installations in non-standard locations])],
- [llvm_prefix="$withval"],
- [llvm_prefix=''])
-
-
-# Call this inside ` ` to get the return value.
-# $1 is the llvm-config command with arguments.
-strip_unwanted_llvm_flags() {
- # Use \> (marks the end of the word)
- echo `$1` | sed \
- -e 's/-march=\S*//g' \
- -e 's/-mtune=\S*//g' \
- -e 's/-mcpu=\S*//g' \
- -e 's/-DNDEBUG\>//g' \
- -e 's/-D_GNU_SOURCE\>//g' \
- -e 's/-pedantic\>//g' \
- -e 's/-Wcovered-switch-default\>//g' \
- -e 's/-O.\>//g' \
- -e 's/-g\>//g' \
- -e 's/-Wall\>//g' \
- -e 's/-Wcast-qual\>//g' \
- -e 's/-Woverloaded-virtual\>//g' \
- -e 's/-fcolor-diagnostics\>//g' \
- -e 's/-fdata-sections\>//g' \
- -e 's/-ffunction-sections\>//g' \
- -e 's/-fno-exceptions\>//g' \
- -e 's/-fomit-frame-pointer\>//g' \
- -e 's/-fvisibility-inlines-hidden\>//g' \
- -e 's/-fPIC\>//g' \
- -e 's/-fstack-protector-strong\>//g'
-}
-
-llvm_check_version_for() {
- if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt "${1}0${2}${3}"; then
- AC_MSG_ERROR([LLVM $1.$2.$3 or newer is required for $4])
- fi
-}
-
-
-
-if test -z "$with_gallium_drivers"; then
- enable_gallium_llvm=no
-fi
-if test "x$enable_gallium_llvm" = xauto; then
- case "$host_cpu" in
- i*86|x86_64|amd64) enable_gallium_llvm=yes;;
- esac
-fi
-if test "x$enable_gallium_llvm" = xyes; then
- if test -n "$llvm_prefix"; then
- AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
- else
- AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no])
- fi
-
- if test "x$LLVM_CONFIG" != xno; then
- LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
- LLVM_BINDIR=`$LLVM_CONFIG --bindir`
- LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
- LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
- LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
- LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
- LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-
- AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
- [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
- AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
- [#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
-
- LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3 | egrep -o '^[[0-9]]+'`
- if test -z "$LLVM_VERSION_PATCH"; then
- LLVM_VERSION_PATCH=0
- fi
-
- if test -n "${LLVM_VERSION_MAJOR}"; then
- LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
- else
- LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
- fi
-
- LLVM_REQUIRED_VERSION_MAJOR="3"
- LLVM_REQUIRED_VERSION_MINOR="3"
- if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
- AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required])
- fi
-
- LLVM_COMPONENTS="engine bitwriter mcjit mcdisassembler"
-
- if $LLVM_CONFIG --components | grep -q inteljitevents ; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} inteljitevents"
- fi
-
- if test "x$enable_opencl" = xyes; then
- llvm_check_version_for "3" "5" "0" "opencl"
-
- LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
- fi
- DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
- MESA_LLVM=1
-
- dnl Check for Clang internal headers
- if test "x$enable_opencl" = xyes; then
- if test -z "$CLANG_LIBDIR"; then
- CLANG_LIBDIR=${LLVM_LIBDIR}
- fi
- CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
- fi
- else
- MESA_LLVM=0
- LLVM_VERSION_INT=0
- fi
-else
- MESA_LLVM=0
- LLVM_VERSION_INT=0
-
- if test "x$enable_opencl" = xyes; then
- AC_MSG_ERROR([cannot enable OpenCL without LLVM])
- fi
-fi
-
dnl Directory for XVMC libs
AC_ARG_WITH([xvmc-libdir],
[AS_HELP_STRING([--with-xvmc-libdir=DIR],
@@ -2266,75 +2216,40 @@
AC_SUBST([D3D_DRIVER_INSTALL_DIR])
dnl
-dnl Gallium helper functions
+dnl r300 doesn't strictly require LLVM, but for performance reasons we
+dnl highly recommend LLVM usage. So require it at least on x86 and x86_64
+dnl architectures.
dnl
-gallium_require_drm() {
- if test "x$have_libdrm" != xyes; then
- AC_MSG_ERROR([$1 requires libdrm >= $LIBDRM_REQUIRED])
- fi
-}
-
-gallium_require_llvm() {
- if test "x$MESA_LLVM" = x0; then
- case "$host" in *gnux32) return;; esac
- case "$host_cpu" in
- i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
- esac
- fi
-}
-
-gallium_require_drm_loader() {
- if test "x$need_pci_id$have_pci_id" = xyesno; then
- AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs])
- fi
+r300_require_llvm() {
+ case "$host" in *gnux32) return;; esac
+ case "$host_cpu" in
+ i*86|x86_64|amd64) require_llvm $1
+ ;;
+ esac
}
-dnl This is for Glamor. Skip this if OpenGL is disabled.
-require_egl_drm() {
- if test "x$enable_opengl" = xno; then
- return 0
- fi
-
+dnl
+dnl DRM is needed by X, Wayland, and offscreen rendering.
+dnl Surfaceless is an alternative for the last one.
+dnl
+require_basic_egl() {
case "$with_egl_platforms" in
- *drm*)
+ *drm*|*surfaceless*)
;;
- *)
- AC_MSG_ERROR([--with-egl-platforms=drm is required to build the $1 driver.])
+ *)
+ AC_MSG_ERROR([$1 requires one of these:
+ 1) --with-egl-platforms=drm (X, Wayland, offscreen rendering based on DRM)
+ 2) --with-egl-platforms=surfaceless (offscreen only)
+ Recommended options: drm,x11])
;;
esac
- if test "x$enable_gbm" != xyes; then
- AC_MSG_ERROR([--enable-gbm is required to build the $1 driver.])
- fi
-}
-
-radeon_llvm_check() {
- if test ${LLVM_VERSION_INT} -lt 307; then
- amdgpu_llvm_target_name='r600'
- else
- amdgpu_llvm_target_name='amdgpu'
- fi
- if test "x$enable_gallium_llvm" != "xyes"; then
- AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
- fi
- llvm_check_version_for "3" "6" "0" $1
- if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
- AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.])
- fi
- LLVM_COMPONENTS="${LLVM_COMPONENTS} $amdgpu_llvm_target_name bitreader ipo"
- NEED_RADEON_LLVM=yes
- if test "x$have_libelf" != xyes; then
- AC_MSG_ERROR([$1 requires libelf when using llvm])
- fi
}
-swr_llvm_check() {
- gallium_require_llvm $1
- if test ${LLVM_VERSION_INT} -lt 306; then
- AC_MSG_ERROR([LLVM version 3.6 or later required when building $1])
- fi
+radeon_gallium_llvm_check() {
if test "x$enable_gallium_llvm" != "xyes"; then
- AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
+ AC_MSG_ERROR([--enable-gallium-llvm is required when building $2])
fi
+ radeon_llvm_check $*
}
swr_require_cxx_feature_flags() {
@@ -2383,67 +2298,71 @@
case "x$driver" in
xsvga)
HAVE_GALLIUM_SVGA=yes
- gallium_require_drm "svga"
- gallium_require_drm_loader
+ require_libdrm "svga"
;;
xi915)
HAVE_GALLIUM_I915=yes
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
- gallium_require_drm "Gallium i915"
- gallium_require_drm_loader
+ require_libdrm "Gallium i915"
;;
xilo)
HAVE_GALLIUM_ILO=yes
PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
- gallium_require_drm "Gallium i965/ilo"
- gallium_require_drm_loader
+ require_libdrm "Gallium i965/ilo"
;;
xr300)
HAVE_GALLIUM_R300=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
- gallium_require_drm "Gallium R300"
- gallium_require_drm_loader
- gallium_require_llvm "Gallium R300"
+ require_libdrm "r300"
+ r300_require_llvm "r300"
;;
xr600)
HAVE_GALLIUM_R600=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
- gallium_require_drm "Gallium R600"
- gallium_require_drm_loader
+ require_libdrm "r600"
if test "x$enable_opencl" = xyes; then
- radeon_llvm_check "r600g"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
+ radeon_gallium_llvm_check $LLVM_REQUIRED_R600 "r600"
+
+ llvm_add_component "asmparser" "r600"
+ llvm_add_component "bitreader" "r600"
fi
;;
xradeonsi)
HAVE_GALLIUM_RADEONSI=yes
PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
- gallium_require_drm "radeonsi"
- gallium_require_drm_loader
- radeon_llvm_check "radeonsi"
- require_egl_drm "radeonsi"
+ require_libdrm "radeonsi"
+ radeon_gallium_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
+ if test "x$enable_egl" = xyes; then
+ require_basic_egl "radeonsi"
+ fi
;;
xnouveau)
HAVE_GALLIUM_NOUVEAU=yes
PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
- gallium_require_drm "nouveau"
- gallium_require_drm_loader
+ require_libdrm "nouveau"
;;
xfreedreno)
HAVE_GALLIUM_FREEDRENO=yes
PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
- gallium_require_drm "freedreno"
- gallium_require_drm_loader
+ require_libdrm "freedreno"
+ ;;
+ xetnaviv)
+ HAVE_GALLIUM_ETNAVIV=yes
+ PKG_CHECK_MODULES([ETNAVIV], [libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED])
+ require_libdrm "etnaviv"
+ ;;
+ ximx)
+ HAVE_GALLIUM_IMX=yes
;;
xswrast)
HAVE_GALLIUM_SOFTPIPE=yes
- if test "x$MESA_LLVM" = x1; then
+ if test "x$enable_gallium_llvm" = xyes; then
HAVE_GALLIUM_LLVMPIPE=yes
fi
;;
xswr)
- swr_llvm_check "swr"
+ llvm_require_version $LLVM_REQUIRED_SWR "swr"
swr_require_cxx_feature_flags "C++11" "__cplusplus >= 201103L" \
",-std=c++11" \
@@ -2464,8 +2383,8 @@
;;
xvc4)
HAVE_GALLIUM_VC4=yes
- gallium_require_drm "vc4"
- gallium_require_drm_loader
+ PKG_CHECK_MODULES([VC4], [libdrm_vc4 >= $LIBDRM_VC4_REQUIRED])
+ require_libdrm "vc4"
PKG_CHECK_MODULES([SIMPENROSE], [simpenrose],
[USE_VC4_SIMULATOR=yes;
@@ -2474,9 +2393,10 @@
;;
xvirgl)
HAVE_GALLIUM_VIRGL=yes
- gallium_require_drm "virgl"
- gallium_require_drm_loader
- require_egl_drm "virgl"
+ require_libdrm "virgl"
+ if test "x$enable_egl" = xyes; then
+ require_basic_egl "virgl"
+ fi
;;
*)
AC_MSG_ERROR([Unknown Gallium driver: $driver])
@@ -2485,14 +2405,33 @@
done
fi
-dnl Set LLVM_LIBS - This is done after the driver configuration so
-dnl that drivers can add additional components to LLVM_COMPONENTS.
-dnl Previously, gallium drivers were updating LLVM_LIBS directly
-dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
-dnl this was causing the same libraries to be appear multiple times
-dnl in LLVM_LIBS.
+if test "x$enable_gallium_llvm" == "xyes" -a "$with_gallium_drivers"; then
+ llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium"
+ llvm_add_default_components "gallium"
+fi
+
+dnl We need to validate some needed dependencies for renderonly drivers.
+
+if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" == xyes ; then
+ AC_ERROR([Building with imx requires etnaviv])
+fi
+
+dnl
+dnl Set defines and buildtime variables only when using LLVM.
+dnl
+if test "x$enable_gallium_llvm" = xyes; then
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
-if test "x$MESA_LLVM" != x0; then
+ LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
+ LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
+ LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
+
+ dnl Set LLVM_LIBS - This is done after the driver configuration so
+ dnl that drivers can add additional components to LLVM_COMPONENTS.
+ dnl Previously, gallium drivers were updating LLVM_LIBS directly
+ dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
+ dnl this was causing the same libraries to be appear multiple times
+ dnl in LLVM_LIBS.
if ! $LLVM_CONFIG --libs ${LLVM_COMPONENTS} >/dev/null; then
AC_MSG_ERROR([Calling ${LLVM_CONFIG} failed])
@@ -2533,7 +2472,7 @@
AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues])
dnl We need to link to llvm system libs when using static libs
dnl However, only llvm 3.5+ provides --system-libs
- if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
+ if test $LLVM_VERSION_MAJOR -ge 4 -o $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then
LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --system-libs`"
fi
fi
@@ -2549,6 +2488,8 @@
"x$HAVE_GALLIUM_RADEONSI" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_ETNAVIV, test "x$HAVE_GALLIUM_ETNAVIV" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_IMX, test "x$HAVE_GALLIUM_IMX" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes)
@@ -2576,8 +2517,13 @@
AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
+AM_CONDITIONAL(HAVE_RADEON_VULKAN, test "x$HAVE_RADEON_VULKAN" = xyes)
AM_CONDITIONAL(HAVE_INTEL_VULKAN, test "x$HAVE_INTEL_VULKAN" = xyes)
+AM_CONDITIONAL(HAVE_AMD_DRIVERS, test "x$HAVE_GALLIUM_R600" = xyes -o \
+ "x$HAVE_GALLIUM_RADEONSI" = xyes -o \
+ "x$HAVE_RADEON_VULKAN" = xyes)
+
AM_CONDITIONAL(HAVE_INTEL_DRIVERS, test "x$HAVE_INTEL_VULKAN" = xyes -o \
"x$HAVE_I965_DRI" = xyes)
@@ -2587,7 +2533,7 @@
AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib)
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
-AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
+AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$enable_gallium_llvm" = xyes)
AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes)
if test "x$USE_VC4_SIMULATOR" = xyes -a "x$HAVE_GALLIUM_ILO" = xyes; then
AC_MSG_ERROR([VC4 simulator on x86 replaces i965 driver build, so ilo must be disabled.])
@@ -2616,6 +2562,8 @@
AC_SUBST([VA_MAJOR], $VA_MAJOR)
AC_SUBST([VA_MINOR], $VA_MINOR)
+AM_CONDITIONAL(HAVE_VULKAN_COMMON, test "x$VULKAN_DRIVERS" != "x")
+
AC_SUBST([XVMC_MAJOR], 1)
AC_SUBST([XVMC_MINOR], 0)
@@ -2629,8 +2577,6 @@
AC_SUBST([XA_TINY], $XA_TINY)
AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
-AC_SUBST([TIMESTAMP_CMD], '`test $(SOURCE_DATE_EPOCH) && echo $(SOURCE_DATE_EPOCH) || date +%s`')
-
AC_ARG_ENABLE(valgrind,
[AS_HELP_STRING([--enable-valgrind],
[Build mesa with valgrind support (default: auto)])],
@@ -2669,6 +2615,8 @@
dnl Substitute the config
AC_CONFIG_FILES([Makefile
src/Makefile
+ src/amd/Makefile
+ src/amd/vulkan/Makefile
src/compiler/Makefile
src/egl/Makefile
src/egl/main/egl.pc
@@ -2694,6 +2642,8 @@
src/gallium/drivers/svga/Makefile
src/gallium/drivers/swr/Makefile
src/gallium/drivers/trace/Makefile
+ src/gallium/drivers/etnaviv/Makefile
+ src/gallium/drivers/imx/Makefile
src/gallium/drivers/vc4/Makefile
src/gallium/drivers/virgl/Makefile
src/gallium/state_trackers/clover/Makefile
@@ -2723,6 +2673,8 @@
src/gallium/targets/xvmc/Makefile
src/gallium/tests/trivial/Makefile
src/gallium/tests/unit/Makefile
+ src/gallium/winsys/etnaviv/drm/Makefile
+ src/gallium/winsys/imx/drm/Makefile
src/gallium/winsys/freedreno/drm/Makefile
src/gallium/winsys/i915/drm/Makefile
src/gallium/winsys/intel/drm/Makefile
@@ -2743,10 +2695,11 @@
src/glx/Makefile
src/glx/apple/Makefile
src/glx/tests/Makefile
+ src/glx/windows/Makefile
+ src/glx/windows/windowsdriproto.pc
src/gtest/Makefile
src/intel/Makefile
- src/intel/genxml/Makefile
- src/intel/isl/Makefile
+ src/intel/tools/Makefile
src/intel/vulkan/Makefile
src/loader/Makefile
src/mapi/Makefile
@@ -2770,16 +2723,14 @@
src/mesa/drivers/x11/Makefile
src/mesa/main/tests/Makefile
src/util/Makefile
- src/util/tests/hash_table/Makefile])
+ src/util/tests/hash_table/Makefile
+ src/vulkan/wsi/Makefile])
AC_OUTPUT
# Fix up dependencies in *.Plo files, where we changed the extension of a
# source file
$SED -i -e 's/brw_blorp.cpp/brw_blorp.c/' src/mesa/drivers/dri/i965/.deps/brw_blorp.Plo
-$SED -i -e 's/gen6_blorp.cpp/gen6_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen6_blorp.Plo
-$SED -i -e 's/gen7_blorp.cpp/gen7_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen7_blorp.Plo
-$SED -i -e 's/gen8_blorp.cpp/gen8_blorp.c/' src/mesa/drivers/dri/i965/.deps/gen8_blorp.Plo
dnl
@@ -2842,15 +2793,20 @@
echo " EGL platforms: $egl_platforms"
egl_drivers=""
- if test "x$HAVE_EGL_DRIVER_DRI2" != "x"; then
+ if test "x$enable_dri" != "xno"; then
egl_drivers="$egl_drivers builtin:egl_dri2"
fi
- if test "x$HAVE_EGL_DRIVER_DRI3" != "x"; then
+ if test "x$enable_dri3" != "xno"; then
egl_drivers="$egl_drivers builtin:egl_dri3"
fi
echo " EGL drivers: $egl_drivers"
fi
+if test "x$enable_gbm" = xyes; then
+ echo " GBM: yes"
+else
+ echo " GBM: no"
+fi
# Vulkan
echo ""
@@ -2862,7 +2818,7 @@
fi
echo ""
-if test "x$MESA_LLVM" = x1; then
+if test "x$enable_gallium_llvm" = xyes; then
echo " llvm: yes"
echo " llvm-config: $LLVM_CONFIG"
echo " llvm-version: $LLVM_VERSION"
@@ -2878,11 +2834,17 @@
echo " Gallium: no"
fi
-dnl Shader cache
echo ""
-echo " Shader cache: $enable_shader_cache"
-if test "x$enable_shader_cache" = "xyes"; then
- echo " With SHA1 from: $with_sha1"
+if test "x$enable_gallium_extra_hud" != xyes; then
+ echo " HUD extra stats: no"
+else
+ echo " HUD extra stats: yes"
+fi
+
+if test "x$enable_lmsensors" != xyes; then
+ echo " HUD lmsensors: no"
+else
+ echo " HUD lmsensors: yes"
fi
dnl Libraries
@@ -2903,7 +2865,7 @@
echo " CXXFLAGS: $cxxflags"
echo " Macros: $defines"
echo ""
-if test "x$MESA_LLVM" = x1; then
+if test "x$enable_gallium_llvm" = xyes; then
echo " LLVM_CFLAGS: $LLVM_CFLAGS"
echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
diff -Nru mesa-12.0.6/debian/changelog mesa-17.0.7/debian/changelog
--- mesa-12.0.6/debian/changelog 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/changelog 2017-06-26 12:58:29.000000000 +0000
@@ -1,9 +1,331 @@
-mesa (12.0.6-0ubuntu0.16.04.1) xenial; urgency=medium
+mesa (17.0.7-0ubuntu0.16.04.1) xenial; urgency=medium
- * New bugfix release. (LP: #1652564, #1652486)
- * Backport to xenial. (LP: #1643789)
+ * Backport to xenial. (LP: #1687981)
+ - rules: Force -O2 to fix ppc64el FTBFS
- -- Timo Aaltonen Fri, 20 Jan 2017 00:22:11 +0200
+ -- Timo Aaltonen Mon, 26 Jun 2017 15:29:20 +0300
+
+mesa (17.0.7-0ubuntu0.17.04.1) zesty; urgency=medium
+
+ * New upstream bugfix release.
+ * d/p/vulkan-mir.patch: Refreshed.
+
+ -- Timo Aaltonen Thu, 08 Jun 2017 10:54:05 +0300
+
+mesa (17.0.5-0ubuntu1) artful; urgency=medium
+
+ * New upstream bugfix release. (LP: #1686344)
+
+ -- Timo Aaltonen Thu, 04 May 2017 20:07:36 +0300
+
+mesa (17.0.4-1ubuntu1) artful; urgency=medium
+
+ * Merge from Debian.
+
+ -- Timo Aaltonen Wed, 26 Apr 2017 11:01:18 +0300
+
+mesa (17.0.4-1) experimental; urgency=medium
+
+ * New upstrem release.
+
+ -- Timo Aaltonen Wed, 19 Apr 2017 16:14:20 +0300
+
+mesa (17.0.3-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian.
+
+ -- Timo Aaltonen Mon, 03 Apr 2017 19:03:10 +0300
+
+mesa (17.0.3-1) experimental; urgency=medium
+
+ * New upstream release.
+ * Update d/upstream/signing-key.asc with key from Andres Gomez.
+
+ -- Andreas Boll Mon, 03 Apr 2017 11:35:58 +0200
+
+mesa (17.0.2-1ubuntu2) zesty; urgency=medium
+
+ [ Cemil Azizoglu ]
+ * egl-platform-rs.patch: Add support for Mir's new render surface based
+ EGL driver
+ * khr_platform_mir.patch: Add EGL_KHR_platform_mir
+ * vulkan-mir.patch: Add Vulkan WSI driver for Mir
+
+ -- Timo Aaltonen Tue, 28 Mar 2017 19:22:29 +0300
+
+mesa (17.0.2-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian experimental.
+
+ -- Timo Aaltonen Tue, 21 Mar 2017 13:36:51 +0200
+
+mesa (17.0.2-1) experimental; urgency=medium
+
+ [ Timo Aaltonen ]
+ * New upstream release.
+
+ [ Andreas Boll ]
+ * Require LLVM on sparc64:
+ - Enables radeonsi, llvmpipe and radv drivers.
+ - Enables OpenCL support.
+
+ -- Andreas Boll Tue, 21 Mar 2017 11:35:09 +0100
+
+mesa (17.0.1-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian.
+ - enable llvmpipe on ppc64el (LP: #1489483)
+
+ -- Timo Aaltonen Fri, 10 Mar 2017 14:25:48 +0200
+
+mesa (17.0.1-1) experimental; urgency=medium
+
+ [ Timo Aaltonen ]
+ * New upstream release.
+
+ [ Andreas Boll ]
+ * Declare Multi-Arch: same for mesa-vulkan-drivers (Closes: #853897).
+ * Cherry-pick 7d1195c (clover: Work around build failure with
+ AltiVec.) from upstream master branch.
+ * Enable OpenCL on ppc64el (Closes: #810913).
+ * Require LLVM on more architectures (armel mips mips64el mipsel
+ powerpc ppc64):
+ - Enables radeonsi, llvmpipe and radv drivers.
+ - Enables OpenCL support.
+
+ -- Andreas Boll Mon, 06 Mar 2017 15:15:00 +0100
+
+mesa (17.0.0-1ubuntu1) zesty; urgency=medium
+
+ [ Timo Aaltonen ]
+ * Merge from Debian.
+ * Drop patches for 16k wide textures on i965, upstream.
+
+ [ Cemil Azizoglu ]
+ * Updated egl-platform-mir.patch.
+ - remove device_name field (removed from the generic struct in the
+ upstream and made wayland specific).
+ - Change MirSurfaceParameters into MirWindowParameters.
+
+ -- Timo Aaltonen Mon, 13 Feb 2017 16:19:39 +0200
+
+mesa (17.0.0-1) experimental; urgency=medium
+
+ * New upstream release.
+ * control, rules: Bump clang/llvm to 4.0, and libclc to match.
+
+ -- Timo Aaltonen Mon, 13 Feb 2017 15:46:47 +0200
+
+mesa (17.0.0~rc3-1) experimental; urgency=medium
+
+ [ Timo Aaltonen ]
+ * Drop libgles1.
+
+ [ Andreas Boll ]
+ * New upstream release candidate.
+ * Drop transitional package libegl1-mesa-drivers.
+ * Remove Breaks/Replaces from pre-jessie.
+ * Explicitly disable LLVM on some arches. Should fix FTBFS on x32.
+ * Drop configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch,
+ upstream.
+ * Cherry-pick 045f38a (vulkan: Don't install vk_platform.h or
+ vulkan.h).
+ * Update list of unwanted vulkan headers.
+ * Drop unused git-cleanup.sh script. Replaced with usage of --extend-
+ diff-ignore some time ago.
+ * Enable building etnaviv and imx on armhf (Closes: #852614).
+ - Bump libdrm-dev build-dep to 2.4.74-2~.
+
+ -- Andreas Boll Mon, 06 Feb 2017 19:05:30 +0100
+
+mesa (17.0.0~rc2-1) experimental; urgency=medium
+
+ * New upstream release candidate.
+ * Add configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch:
+ Should fix FTBFS on some arches.
+ * rules: Explicitly enable/disable gbm. Should fix FTBFS on hurd.
+ * Revert to debhelper compat 9 (Workaround for #851130).
+
+ -- Andreas Boll Wed, 25 Jan 2017 16:45:53 +0100
+
+mesa (17.0.0~rc1-1) experimental; urgency=medium
+
+ * New upstream release candidate.
+ * Bump libdrm-dev build-dep to 2.4.74 per configure.ac.
+ * Bump libwayland-dev build-dep to 1.11.0 per configure.ac.
+ * Remove libgcrypt20-dev build-dep per configure.ac.
+ * Update watch url.
+ * Drop vl-zscan-fix-Fix-trivial-sign-compare-warnings.diff and r600-
+ sb-Fix-loop-optimization-related-hangs-on-eg.diff, upstream.
+ * Drop workaround-binutils-mips-844357.diff, binutils regression has
+ been fixed.
+ * Rename EGL_DISPLAYS to EGL_PLATFORMS.
+ * Update extend-diff-ignore.
+
+ -- Andreas Boll Thu, 19 Jan 2017 18:39:06 +0100
+
+mesa (13.0.5-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Switch mesa3d.org URLs to https.
+ * Update extend-diff-ignore.
+
+ -- Andreas Boll Tue, 21 Feb 2017 13:13:50 +0100
+
+mesa (13.0.4-1ubuntu1) zesty; urgency=medium
+
+ * Merge from debian.
+ * radeonsi-always-leave-poly-offset-in-a-valid-state.diff:
+ Dropped, upstream.
+
+ -- Timo Aaltonen Mon, 06 Feb 2017 09:47:24 +0200
+
+mesa (13.0.4-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Drop vl-zscan-fix-Fix-trivial-sign-compare-warnings.diff and r600-
+ sb-Fix-loop-optimization-related-hangs-on-eg.diff, upstream.
+ * Drop workaround-binutils-mips-844357.diff, binutils regression has
+ been fixed (Closes: #852030).
+ * Revert to debhelper compat 9 (Workaround for #851130).
+ * Update extend-diff-ignore.
+
+ -- Andreas Boll Wed, 01 Feb 2017 15:36:10 +0100
+
+mesa (13.0.3-1ubuntu3) zesty; urgency=medium
+
+ * control: Add dh-autoreconf back to build-deps, for backports.
+ * radeonsi-always-leave-poly-offset-in-a-valid-state.diff:
+ Fix fdo#99451.
+
+ -- Timo Aaltonen Thu, 19 Jan 2017 18:59:24 +0200
+
+mesa (13.0.3-1ubuntu2) zesty; urgency=medium
+
+ * rules: Drop forcing -O2 to fix ppc64el ftbfs, gcc got fixed already.
+ (LP: #1605796)
+ * control: Fix dependencies for ubuntuBSD. (LP: #1565080)
+ * compat,rules: Don't bump compat to 10, breaks applying patches
+ before autoreconf which we need for the Mir EGL platform.
+
+ -- Timo Aaltonen Thu, 12 Jan 2017 09:49:20 +0200
+
+mesa (13.0.3-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian.
+ * intel: Add patches to support 16k textures. (LP: #1655556)
+
+ -- Timo Aaltonen Wed, 11 Jan 2017 09:45:19 +0200
+
+mesa (13.0.3-1) unstable; urgency=medium
+
+ [ Timo Aaltonen ]
+ * New upstream release.
+
+ [ Andreas Boll ]
+ * Add vl-zscan-fix-Fix-trivial-sign-compare-warnings.diff: Fixes mpeg2
+ decoding on radeon GPUs without native mpeg2 support (Closes:
+ #846297). Thanks to Jörg-Volker Peetz for reporting and tracking
+ down this regression!
+ * Add r600-sb-Fix-loop-optimization-related-hangs-on-eg.diff: Fixes
+ GPU hangs on r600g (Evergreen and Northern Islands GPUs) in many
+ games.
+
+ -- Timo Aaltonen Tue, 10 Jan 2017 17:38:23 +0200
+
+mesa (13.0.2-3) unstable; urgency=medium
+
+ * Fix typo to correctly disable asm on x32. Should fix FTBFS on x32.
+ * Add debian/source/format file.
+
+ -- Andreas Boll Thu, 15 Dec 2016 16:42:25 +0100
+
+mesa (13.0.2-2) unstable; urgency=medium
+
+ * Bump llvm/libclang build-deps to >= 1:3.9.1.
+ - Enables support for OpenCL on AMD Polaris GPUs (Closes: #848173).
+ * Cherry-pick 6dc96de (cso: don't release sampler states that are
+ bound) from upstream master branch. Fixes random GPU hangs on
+ radeonsi (AMD Southern Islands and newer) in many games.
+ * Bump debhelper compat to 10.
+ * Stop passing --disable-silent-rules to configure, debhelper does
+ that for a while.
+ * Drop no longer needed dpkg-dev versioned build-dependency.
+ * Drop redundant cross-build detection, debhelper does this for us
+ already.
+ * Disable assembly usage on x32. Related to Bug #758094.
+
+ -- Andreas Boll Thu, 15 Dec 2016 15:16:56 +0100
+
+mesa (13.0.2-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian.
+
+ -- Timo Aaltonen Tue, 29 Nov 2016 18:15:09 +0200
+
+mesa (13.0.2-1) unstable; urgency=medium
+
+ * New upstream release.
+ * workaround-binutils-mips-844357.diff: Add workaround for broken
+ binutils on mips*. Fixes invalid symbol table of libGL.so.1. See
+ also Bug #844357.
+
+ -- Andreas Boll Tue, 29 Nov 2016 16:29:00 +0100
+
+mesa (13.0.1-2) unstable; urgency=medium
+
+ * Cherry-pick commit 1809f17 (mesa: Drop PATH_MAX usage.) from
+ upstream 13.0 branch. Should fix FTBFS on hurd (Closes: #843588).
+ * Enable extra HUD support for showing I/O stats of block/NIC devices.
+ * Enable HUD lmsensors support.
+
+ -- Andreas Boll Mon, 28 Nov 2016 13:32:31 +0100
+
+mesa (13.0.1-1ubuntu1) zesty; urgency=medium
+
+ * Merge from Debian experimental.
+ * dri3-fix-totem-with-libva.diff: Dropped, upstream.
+ * egl-platform-mir.patch: Refreshed.
+
+ -- Timo Aaltonen Wed, 23 Nov 2016 16:36:34 +0200
+
+mesa (13.0.1-1) experimental; urgency=medium
+
+ * New upstream release.
+
+ -- Andreas Boll Mon, 14 Nov 2016 16:23:42 +0100
+
+mesa (13.0.0-1) experimental; urgency=medium
+
+ * New upstream release.
+ * Make mesa-vulkan-drivers.install more generic. Should fix FTBFS on
+ some arches.
+ * rules: Remove superfluous linux check.
+ * rules: Remove vulkan_intel.h only where it get installed in tmp.
+ Should fix FTBFS on some more arches.
+ * source/local-options: Update extend-diff-ignore.
+
+ -- Andreas Boll Wed, 02 Nov 2016 11:49:13 +0100
+
+mesa (13.0.0~rc2-1) experimental; urgency=medium
+
+ * New upstream release candidate.
+ * control, rules: Use llvm/clang 3.9 (Closes: #836913).
+ * control: Bump libclc dependencies.
+ * Bump libdrm-dev build-dep to 2.4.69 per configure.ac.
+ * Remove libudev-dev and libudev1 dependencies per configure.ac.
+ * Enable OpenCL on kfreebsd-* since we don't need udev anymore.
+ * Enable radv vulkan driver.
+ * control: Remove superfluous linux- prefix.
+ * not-installed: wglext.h got dropped from the tarball.
+ * mesa-common-dev: Remove mesa_glinterop.h, upstream doesn't install
+ it anymore.
+ * Update libgles2-mesa.symbols.
+ * Update libgl1-mesa-glx.symbols.
+ * source/local-options: Update extend-diff-ignore.
+ * Update mesa-vulkan-drivers.lintian-overrides.
+
+ -- Andreas Boll Tue, 25 Oct 2016 10:59:08 +0200
mesa (12.0.4-2ubuntu1) zesty; urgency=medium
diff -Nru mesa-12.0.6/debian/control mesa-17.0.7/debian/control
--- mesa-12.0.6/debian/control 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/control 2017-06-26 12:58:29.000000000 +0000
@@ -10,19 +10,18 @@
dh-autoreconf,
quilt (>= 0.40),
pkg-config,
- libdrm-dev (>= 2.4.67) [!hurd-any],
+ libdrm-dev (>= 2.4.74-2~) [!hurd-any],
libx11-dev,
x11proto-gl-dev (>= 1.4.14),
libxxf86vm-dev,
libexpat1-dev,
- dpkg-dev (>= 1.16.1),
- libgcrypt20-dev [linux-amd64 linux-i386 linux-x32],
+ libsensors4-dev [!hurd-any],
libxfixes-dev,
libxdamage-dev,
libxext-dev,
libva-dev (>= 1.6.0) [linux-any kfreebsd-any],
libvdpau-dev (>= 1.1.1) [linux-any kfreebsd-any],
- libvulkan-dev [linux-amd64 linux-i386 linux-x32],
+ libvulkan-dev [amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64 ppc64el sparc64 x32],
autoconf,
automake,
libtool,
@@ -39,21 +38,20 @@
libxcb-randr0-dev,
libxcb-sync-dev,
libxshmfence-dev (>= 1.1),
+ libmirclient-dev (>= 0.26.2) [linux-any],
+ mir-client-platform-mesa-dev [linux-any],
python,
python-mako,
- libudev-dev [linux-any],
flex,
bison,
- llvm-3.8-dev (>= 1:3.8) [amd64 i386 kfreebsd-amd64 kfreebsd-i386 arm64 armhf ppc64el],
- libelf-dev [amd64 i386 kfreebsd-amd64 kfreebsd-i386 arm64 armhf ppc64el],
- libwayland-dev (>= 1.2.0) [linux-any],
- libclang-3.8-dev (>= 1:3.8) [amd64 i386 arm64 armhf],
- libclc-dev (>= 0.2.0+git20150813) [amd64 i386 arm64 armhf],
- mir-client-platform-mesa-dev,
- libmirclient-dev,
+ llvm-4.0-dev (>= 1:4.0~) [amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el],
+ libelf-dev [amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el],
+ libwayland-dev (>= 1.11.0) [linux-any],
+ libclang-4.0-dev (>= 1:4.0~) [amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el],
+ libclc-dev (>= 0.2.0+git20170213) [amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el],
Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/lib/mesa.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xorg/lib/mesa.git
-Homepage: http://mesa3d.org/
+Homepage: https://mesa3d.org/
Package: libxatracker2
Section: libs
@@ -91,7 +89,6 @@
Depends:
${shlibs:Depends},
${misc:Depends},
- libudev1 [linux-any],
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: generic buffer management API -- runtime
@@ -105,7 +102,6 @@
Architecture: linux-any kfreebsd-any
Depends:
libgbm1 (= ${binary:Version}),
- libudev-dev [linux-any],
${misc:Depends},
Multi-Arch: same
Description: generic buffer management API -- development files
@@ -124,7 +120,6 @@
${shlibs:Depends},
${misc:Depends},
libgbm1 (= ${binary:Version}) [!hurd-any],
- libudev1 [linux-any],
libgl1-mesa-dri (= ${binary:Version}),
Provides: libegl1-x11
Conflicts: libegl1-x11
@@ -145,7 +140,7 @@
Depends:
libegl1-mesa (= ${binary:Version}),
libwayland-egl1-mesa (= ${binary:Version}) [linux-any],
- libdrm-dev (>= 2.4.52) [!hurd-any],
+ libdrm-dev (>= 2.4.74) [!hurd-any],
x11proto-dri2-dev (>= 2.6),
x11proto-gl-dev (>= 1.4.14),
libx11-dev,
@@ -160,9 +155,9 @@
libxcb-sync-dev,
libxshmfence-dev,
libx11-xcb-dev,
- libmirclient-dev [!arm64 !powerpc !ppc64 !ppc64el],
- libwayland-dev (>= 1.2.0) [linux-any],
+ libwayland-dev (>= 1.11.0) [linux-any],
${misc:Depends},
+ libmirclient-dev (>= 0.26.2) [!arm64 !powerpc !ppc64 !ppc64el !kfreebsd-any !hurd-any],
Multi-Arch: same
Description: free implementation of the EGL API -- development files
This package contains the development environment required for compiling
@@ -173,15 +168,6 @@
This package provides the development environment for compiling programs
against the EGL library.
-Package: libegl1-mesa-drivers
-Section: libs
-Architecture: linux-any kfreebsd-any
-Depends:
- ${misc:Depends},
-Multi-Arch: same
-Description: transitional dummy package
- This is a transitional dummy package, it can be safely removed.
-
Package: libwayland-egl1-mesa
Section: libs
Architecture: linux-any
@@ -191,52 +177,12 @@
libegl1-mesa (= ${binary:Version})
Provides: libwayland-egl1
Conflicts: libwayland-egl1
-Replaces: libwayland-egl1, libegl1-mesa-drivers (<< 10.1.0-2)
-Breaks: libegl1-mesa-drivers (<< 10.1.0-2)
+Replaces: libwayland-egl1
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: implementation of the Wayland EGL platform -- runtime
This package contains the mesa implementation of the Wayland EGL platform
-Package: libgles1-mesa
-Section: libs
-Architecture: any
-Depends:
- libglapi-mesa (= ${binary:Version}),
- ${shlibs:Depends},
- ${misc:Depends},
-Provides: libgles1
-Conflicts: libgles1
-Replaces: libgles1
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Description: free implementation of the OpenGL|ES 1.x API -- runtime
- OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
- embedded systems - including consoles, phones, appliances and vehicles.
- It contains a subset of OpenGL plus a number of extensions for the
- special needs of embedded systems.
- .
- OpenGL|ES 1.x provides an API for fixed-function hardware.
-
-Package: libgles1-mesa-dev
-Section: libdevel
-Architecture: any
-Depends:
- libgles1-mesa (= ${binary:Version}),
- libegl1-mesa-dev,
- ${misc:Depends},
-Multi-Arch: same
-Description: free implementation of the OpenGL|ES 1.x API -- development files
- OpenGL|ES is a cross-platform API for full-function 2D and 3D graphics on
- embedded systems - including consoles, phones, appliances and vehicles.
- It contains a subset of OpenGL plus a number of extensions for the
- special needs of embedded systems.
- .
- OpenGL|ES 1.x provides an API for fixed-function hardware.
- .
- This package provides a development environment for building programs using
- the OpenGL|ES 1.x APIs.
-
Package: libgles2-mesa
Section: libs
Architecture: any
@@ -298,13 +244,11 @@
${shlibs:Depends},
${misc:Depends},
libglapi-mesa (= ${binary:Version}),
- libudev1 [linux-any],
- libgl1-mesa-dri (>= 7.2)
+ libgl1-mesa-dri
Conflicts: libgl1
Replaces: libgl1
Provides: libgl1
Breaks:
- glx-diversions (<< 0.4),
libopengl-perl (<< 0.6704+dfsg-2),
Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
@@ -325,15 +269,12 @@
Package: libgl1-mesa-dri
Section: libs
-Priority: optional
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends:
${shlibs:Depends},
${misc:Depends}
Recommends: libtxc-dxtn-s2tc | libtxc-dxtn-s2tc0 | libtxc-dxtn0
-Breaks:
- xserver-xorg-core (<< 2:1.14.3-5),
Multi-Arch: same
Description: free implementation of the OpenGL API -- DRI modules
This version of Mesa provides GLX and DRI capabilities: it is capable of
@@ -352,7 +293,7 @@
Depends:
mesa-common-dev (= ${binary:Version}),
libgl1-mesa-glx (= ${binary:Version}),
- libdrm-dev (>= 2.4.65) [!hurd-any],
+ libdrm-dev (>= 2.4.74) [!hurd-any],
libx11-dev,
libx11-xcb-dev,
libxcb-dri3-dev,
@@ -474,30 +415,27 @@
Package: mesa-vulkan-drivers
Section: libs
-Architecture: linux-amd64 linux-i386 linux-x32
+Architecture: amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64 ppc64el sparc64 x32
Pre-Depends: ${misc:Pre-Depends}
Depends:
libvulkan1,
${shlibs:Depends},
${misc:Depends}
+Multi-Arch: same
Description: Mesa Vulkan graphics drivers
Vulkan is a low-overhead 3D graphics and compute API. This package
includes Vulkan drivers provided by the Mesa project.
Package: mesa-opencl-icd
Section: libs
-Architecture: amd64 i386 arm64 armhf
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el
Pre-Depends: ${misc:Pre-Depends}
Depends:
- libclc-r600 (>= 0.2.0+git20150813),
- libclc-amdgcn,
+ libclc-r600 (>= 0.2.0+git20170213),
+ libclc-amdgcn (>= 0.2.0+git20170213),
ocl-icd-libopencl1 | libopencl1,
${shlibs:Depends},
${misc:Depends},
-Replaces:
- libgl1-mesa-dri (<< 10.3.0-1),
-Breaks:
- libgl1-mesa-dri (<< 10.3.0-1),
Provides: opencl-icd
Multi-Arch: same
Description: free implementation of the OpenCL API -- ICD runtime
diff -Nru mesa-12.0.6/debian/copyright mesa-17.0.7/debian/copyright
--- mesa-12.0.6/debian/copyright 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/copyright 2017-06-26 12:58:29.000000000 +0000
@@ -4,11 +4,11 @@
again debianized by Thierry Reding on Sat, 14 Oct 2006
02:01:12 +0200.
-It was downloaded from http://www.mesa3d.org/download.html
+It was downloaded from https://www.mesa3d.org/download.html
For more information see:
- http://www.mesa3d.org/
+ https://www.mesa3d.org/
-------------------------------------------------------------------------------
The Mesa distribution consists of several components. Different copyrights and
diff -Nru mesa-12.0.6/debian/git-cleanup.sh mesa-17.0.7/debian/git-cleanup.sh
--- mesa-12.0.6/debian/git-cleanup.sh 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/git-cleanup.sh 1970-01-01 00:00:00.000000000 +0000
@@ -1,75 +0,0 @@
-#!/bin/sh
-# © 2011 Cyril Brulebois
-set -e
-
-### First phase, files known to make dpkg-source unhappy.
-
-# List broken symlinks:
-symlinks=$(find -type l)
-
-# Symlinks vs. directories:
-dirs_vs_symlinks=''
-
-# Modified binaries:
-binaries='
-src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe
-src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe
-src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe
-src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe
-src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe
-src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-abs.png
-docs/gears.png
-'
-
-case $1 in
- "") clean=0; echo "I: No parameter given, listing only (-f to remove).";;
- "-f") clean=1; echo "I: Removing files.";;
- *) clean=0; echo "I: Unknown parameter given, listing only (-f to remove).";;
-esac
-
-# Readibility:
-echo
-
-for x in $symlinks $dirs_vs_symlinks $binaries; do
- # Do not fail if the file went away already, only warn:
- if [ -e $x -o -L $x ]; then
- if [ $clean = 1 ]; then
- git rm $x
- else
- echo "I: Would remove $x"
- fi
- else
- echo "W: Unable to remove non-existing: $x"
- fi
-done
-
-### Second phase, kill all files in git not in the tarball
-version=$(dpkg-parsechangelog|awk '/Version: / {print $2}'|sed 's/-.*$//')
-tarball="../mesa_$version.orig.tar.gz"
-if [ ! -f $tarball ]; then
- echo "E: Missing tarball ($tarball), you could use: uscan --download-current --rename"
- exit 1
-fi
-
-# Be lazy for now, temporary files would be better:
-one=1
-two=2
-
-# Strip one directory, Mesa-$version/ is the top-level:
-tar tfz $tarball | sed 's,[^/]*/,,' | sort > $two
-# List all files known to git, except those under debian/:
-git ls-files | grep -v ^debian/ | sort > $one
-
-for x in $(diff -u $one $two|tail -n +3|grep ^-|sed 's/^-//'); do
- if [ -e $x -o -L $x ]; then
- if [ $clean = 1 ]; then
- git rm $x
- else
- echo "I: Would remove $x"
- fi
- else
- echo "W: Unable to remove non-existing: $x (maybe gone during 1st phase)"
- fi
-done
-
-rm $one $two
diff -Nru mesa-12.0.6/debian/libgl1-mesa-glx.symbols mesa-17.0.7/debian/libgl1-mesa-glx.symbols
--- mesa-12.0.6/debian/libgl1-mesa-glx.symbols 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/libgl1-mesa-glx.symbols 2017-06-26 12:58:29.000000000 +0000
@@ -49,17 +49,22 @@
glBindVertexBuffer@Base 0
glBindVertexBuffers@Base 0
glBitmap@Base 0
+ glBlendBarrier@Base 13.0.0~
glBlendColor@Base 0
glBlendColorEXT@Base 0
glBlendEquation@Base 0
glBlendEquationEXT@Base 0
glBlendEquationSeparate@Base 0
+ glBlendEquationSeparatei@Base 13.0.0~
glBlendEquationSeparateiARB@Base 0
+ glBlendEquationi@Base 13.0.0~
glBlendEquationiARB@Base 0
glBlendFunc@Base 0
glBlendFuncSeparate@Base 0
glBlendFuncSeparateEXT@Base 0
+ glBlendFuncSeparatei@Base 13.0.0~
glBlendFuncSeparateiARB@Base 0
+ glBlendFunci@Base 13.0.0~
glBlendFunciARB@Base 0
glBlitFramebuffer@Base 0
glBufferData@Base 0
@@ -388,6 +393,7 @@
glGetFramebufferAttachmentParameteriv@Base 0
glGetFramebufferAttachmentParameterivEXT@Base 0
glGetFramebufferParameteriv@Base 12.0.1
+ glGetGraphicsResetStatus@Base 13.0.0~
glGetGraphicsResetStatusARB@Base 0
glGetHandleARB@Base 0
glGetHistogram@Base 0
@@ -514,8 +520,11 @@
glGetnSeparableFilterARB@Base 0
glGetnTexImageARB@Base 0
glGetnUniformdvARB@Base 0
+ glGetnUniformfv@Base 13.0.0~
glGetnUniformfvARB@Base 0
+ glGetnUniformiv@Base 13.0.0~
glGetnUniformivARB@Base 0
+ glGetnUniformuiv@Base 13.0.0~
glGetnUniformuivARB@Base 0
glHint@Base 0
glHistogram@Base 0
@@ -723,6 +732,7 @@
glOrthof@Base 0
glOrthox@Base 0
glPassThrough@Base 0
+ glPatchParameteri@Base 13.0.0~
glPauseTransformFeedback@Base 0
glPixelMapfv@Base 0
glPixelMapuiv@Base 0
@@ -754,6 +764,7 @@
glPopDebugGroup@Base 0
glPopMatrix@Base 0
glPopName@Base 0
+ glPrimitiveBoundingBox@Base 13.0.0~
glPrimitiveRestartIndex@Base 0
glPrimitiveRestartIndexNV@Base 0
glPrimitiveRestartNV@Base 0
@@ -836,6 +847,7 @@
glRasterPos4sv@Base 0
glReadBuffer@Base 0
glReadPixels@Base 0
+ glReadnPixels@Base 13.0.0~
glReadnPixelsARB@Base 0
glRectd@Base 0
glRectdv@Base 0
diff -Nru mesa-12.0.6/debian/libgles1-mesa.lintian-overrides mesa-17.0.7/debian/libgles1-mesa.lintian-overrides
--- mesa-12.0.6/debian/libgles1-mesa.lintian-overrides 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/libgles1-mesa.lintian-overrides 1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-package-name-doesnt-match-sonames libGLESv1-CM1
diff -Nru mesa-12.0.6/debian/libgles1-mesa.symbols mesa-17.0.7/debian/libgles1-mesa.symbols
--- mesa-12.0.6/debian/libgles1-mesa.symbols 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/libgles1-mesa.symbols 1970-01-01 00:00:00.000000000 +0000
@@ -1,148 +0,0 @@
-libGLESv1_CM.so.1 libgles1-mesa #MINVER# | libgles1
- glActiveTexture@Base 7.8.1
- glAlphaFunc@Base 7.8.1
- glAlphaFuncx@Base 7.8.1
- glBindBuffer@Base 7.8.1
- glBindTexture@Base 7.8.1
- glBlendFunc@Base 7.8.1
- glBufferData@Base 7.8.1
- glBufferSubData@Base 7.8.1
- glClear@Base 7.8.1
- glClearColor@Base 7.8.1
- glClearColorx@Base 7.8.1
- glClearDepthf@Base 7.8.1
- glClearDepthx@Base 7.8.1
- glClearStencil@Base 7.8.1
- glClientActiveTexture@Base 7.8.1
- glClipPlanef@Base 7.8.1
- glClipPlanex@Base 7.8.1
- glColor4f@Base 7.8.1
- glColor4ub@Base 7.8.1
- glColor4x@Base 7.8.1
- glColorMask@Base 7.8.1
- glColorPointer@Base 7.8.1
- glCompressedTexImage2D@Base 7.8.1
- glCompressedTexSubImage2D@Base 7.8.1
- glCopyTexImage2D@Base 7.8.1
- glCopyTexSubImage2D@Base 7.8.1
- glCullFace@Base 7.8.1
- glDeleteBuffers@Base 7.8.1
- glDeleteTextures@Base 7.8.1
- glDepthFunc@Base 7.8.1
- glDepthMask@Base 7.8.1
- glDepthRangef@Base 7.8.1
- glDepthRangex@Base 7.8.1
- glDisable@Base 7.8.1
- glDisableClientState@Base 7.8.1
- glDrawArrays@Base 7.8.1
- glDrawElements@Base 7.8.1
- glEnable@Base 7.8.1
- glEnableClientState@Base 7.8.1
- glFinish@Base 7.8.1
- glFlush@Base 7.8.1
- glFogf@Base 7.8.1
- glFogfv@Base 7.8.1
- glFogx@Base 7.8.1
- glFogxv@Base 7.8.1
- glFrontFace@Base 7.8.1
- glFrustumf@Base 7.8.1
- glFrustumx@Base 7.8.1
- glGenBuffers@Base 7.8.1
- glGenTextures@Base 7.8.1
- glGetBooleanv@Base 7.8.1
- glGetBufferParameteriv@Base 7.8.1
- glGetClipPlanef@Base 7.8.1
- glGetClipPlanex@Base 7.8.1
- glGetError@Base 7.8.1
- glGetFixedv@Base 7.8.1
- glGetFloatv@Base 7.8.1
- glGetIntegerv@Base 7.8.1
- glGetLightfv@Base 7.8.1
- glGetLightxv@Base 7.8.1
- glGetMaterialfv@Base 7.8.1
- glGetMaterialxv@Base 7.8.1
- glGetPointerv@Base 7.8.1
- glGetString@Base 7.8.1
- glGetTexEnvfv@Base 7.8.1
- glGetTexEnviv@Base 7.8.1
- glGetTexEnvxv@Base 7.8.1
- glGetTexParameterfv@Base 7.8.1
- glGetTexParameteriv@Base 7.8.1
- glGetTexParameterxv@Base 7.8.1
- glHint@Base 7.8.1
- glIsBuffer@Base 7.8.1
- glIsEnabled@Base 7.8.1
- glIsTexture@Base 7.8.1
- glLightModelf@Base 7.8.1
- glLightModelfv@Base 7.8.1
- glLightModelx@Base 7.8.1
- glLightModelxv@Base 7.8.1
- glLightf@Base 7.8.1
- glLightfv@Base 7.8.1
- glLightx@Base 7.8.1
- glLightxv@Base 7.8.1
- glLineWidth@Base 7.8.1
- glLineWidthx@Base 7.8.1
- glLoadIdentity@Base 7.8.1
- glLoadMatrixf@Base 7.8.1
- glLoadMatrixx@Base 7.8.1
- glLogicOp@Base 7.8.1
- glMaterialf@Base 7.8.1
- glMaterialfv@Base 7.8.1
- glMaterialx@Base 7.8.1
- glMaterialxv@Base 7.8.1
- glMatrixMode@Base 7.8.1
- glMultMatrixf@Base 7.8.1
- glMultMatrixx@Base 7.8.1
- glMultiDrawArraysEXT@Base 7.8.1
- glMultiDrawElementsEXT@Base 7.8.1
- glMultiTexCoord4f@Base 7.8.1
- glMultiTexCoord4x@Base 7.8.1
- glNormal3f@Base 7.8.1
- glNormal3x@Base 7.8.1
- glNormalPointer@Base 7.8.1
- glOrthof@Base 7.8.1
- glOrthox@Base 7.8.1
- glPixelStorei@Base 7.8.1
- glPointParameterf@Base 7.8.1
- glPointParameterfv@Base 7.8.1
- glPointParameterx@Base 7.8.1
- glPointParameterxv@Base 7.8.1
- glPointSize@Base 7.8.1
- glPointSizePointerOES@Base 7.8.1
- glPointSizex@Base 7.8.1
- glPolygonOffset@Base 7.8.1
- glPolygonOffsetx@Base 7.8.1
- glPopMatrix@Base 7.8.1
- glPushMatrix@Base 7.8.1
- glReadPixels@Base 7.8.1
- glRotatef@Base 7.8.1
- glRotatex@Base 7.8.1
- glSampleCoverage@Base 7.8.1
- glSampleCoveragex@Base 7.8.1
- glScalef@Base 7.8.1
- glScalex@Base 7.8.1
- glScissor@Base 7.8.1
- glShadeModel@Base 7.8.1
- glStencilFunc@Base 7.8.1
- glStencilMask@Base 7.8.1
- glStencilOp@Base 7.8.1
- glTexCoordPointer@Base 7.8.1
- glTexEnvf@Base 7.8.1
- glTexEnvfv@Base 7.8.1
- glTexEnvi@Base 7.8.1
- glTexEnviv@Base 7.8.1
- glTexEnvx@Base 7.8.1
- glTexEnvxv@Base 7.8.1
- glTexImage2D@Base 7.8.1
- glTexParameterf@Base 7.8.1
- glTexParameterfv@Base 7.8.1
- glTexParameteri@Base 7.8.1
- glTexParameteriv@Base 7.8.1
- glTexParameterx@Base 7.8.1
- glTexParameterxv@Base 7.8.1
- glTexSubImage2D@Base 7.8.1
- glTranslatef@Base 7.8.1
- glTranslatex@Base 7.8.1
- glVertexPointer@Base 7.8.1
- glViewport@Base 7.8.1
diff -Nru mesa-12.0.6/debian/libgles2-mesa.symbols mesa-17.0.7/debian/libgles2-mesa.symbols
--- mesa-12.0.6/debian/libgles2-mesa.symbols 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/libgles2-mesa.symbols 2017-06-26 12:58:29.000000000 +0000
@@ -18,11 +18,16 @@
glBindTransformFeedback@Base 9.1~
glBindVertexArray@Base 9.1~
glBindVertexBuffer@Base 10.7.0~
+ glBlendBarrier@Base 13.0.0~
glBlendColor@Base 7.8.1
glBlendEquation@Base 7.8.1
glBlendEquationSeparate@Base 7.8.1
+ glBlendEquationSeparatei@Base 13.0.0~
+ glBlendEquationi@Base 13.0.0~
glBlendFunc@Base 7.8.1
glBlendFuncSeparate@Base 7.8.1
+ glBlendFuncSeparatei@Base 13.0.0~
+ glBlendFunci@Base 13.0.0~
glBlitFramebuffer@Base 9.1~
glBufferData@Base 7.8.1
glBufferSubData@Base 7.8.1
@@ -130,6 +135,7 @@
glGetFragDataLocation@Base 9.1~
glGetFramebufferAttachmentParameteriv@Base 7.8.1
glGetFramebufferParameteriv@Base 12.0.1
+ glGetGraphicsResetStatus@Base 13.0.0~
glGetInteger64i_v@Base 9.1~
glGetInteger64v@Base 9.1~
glGetIntegeri_v@Base 9.1~
@@ -138,6 +144,7 @@
glGetMultisamplefv@Base 10.7.0~
glGetObjectLabel@Base 12.0.0~
glGetObjectPtrLabel@Base 12.0.0~
+ glGetPointerv@Base 13.0.0~
glGetProgramBinary@Base 9.1~
glGetProgramInfoLog@Base 7.8.1
glGetProgramInterfaceiv@Base 12.0.1
@@ -182,6 +189,9 @@
glGetVertexAttribPointerv@Base 7.8.1
glGetVertexAttribfv@Base 7.8.1
glGetVertexAttribiv@Base 7.8.1
+ glGetnUniformfv@Base 13.0.0~
+ glGetnUniformiv@Base 13.0.0~
+ glGetnUniformuiv@Base 13.0.0~
glHint@Base 7.8.1
glInvalidateFramebuffer@Base 9.1~
glInvalidateSubFramebuffer@Base 9.1~
@@ -209,10 +219,12 @@
glMultiDrawElementsEXT@Base 7.8.1
glObjectLabel@Base 12.0.0~
glObjectPtrLabel@Base 12.0.0~
+ glPatchParameteri@Base 13.0.0~
glPauseTransformFeedback@Base 9.1~
glPixelStorei@Base 7.8.1
glPolygonOffset@Base 7.8.1
glPopDebugGroup@Base 12.0.0~
+ glPrimitiveBoundingBox@Base 13.0.0~
glProgramBinary@Base 9.1~
glProgramParameteri@Base 9.1~
glProgramUniform1f@Base 12.0.1
@@ -251,6 +263,7 @@
glPushDebugGroup@Base 12.0.0~
glReadBuffer@Base 9.1~
glReadPixels@Base 7.8.1
+ glReadnPixels@Base 13.0.0~
glReleaseShaderCompiler@Base 7.8.1
glRenderbufferStorage@Base 7.8.1
glRenderbufferStorageMultisample@Base 9.1~
diff -Nru mesa-12.0.6/debian/mesa-vulkan-drivers.install mesa-17.0.7/debian/mesa-vulkan-drivers.install
--- mesa-12.0.6/debian/mesa-vulkan-drivers.install 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/mesa-vulkan-drivers.install 2017-06-26 12:58:29.000000000 +0000
@@ -1,2 +1,2 @@
usr/share/vulkan/icd.d/*.json
-usr/lib/*/libvulkan_intel.so
+usr/lib/*/libvulkan_*.so
diff -Nru mesa-12.0.6/debian/mesa-vulkan-drivers.lintian-overrides mesa-17.0.7/debian/mesa-vulkan-drivers.lintian-overrides
--- mesa-12.0.6/debian/mesa-vulkan-drivers.lintian-overrides 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/mesa-vulkan-drivers.lintian-overrides 2017-06-26 12:58:29.000000000 +0000
@@ -1,2 +1,3 @@
-package-name-doesnt-match-sonames libvulkan-intel
+package-name-doesnt-match-sonames libvulkan-intel libvulkan-radeon
shlib-without-versioned-soname usr/lib/*/libvulkan_intel.so libvulkan_intel.so
+shlib-without-versioned-soname usr/lib/*/libvulkan_radeon.so libvulkan_radeon.so
diff -Nru mesa-12.0.6/debian/patches/egl-platform-mir.patch mesa-17.0.7/debian/patches/egl-platform-mir.patch
--- mesa-12.0.6/debian/patches/egl-platform-mir.patch 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/patches/egl-platform-mir.patch 2017-06-26 12:58:29.000000000 +0000
@@ -1,8 +1,8 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -2037,7 +2037,9 @@ for plat in $egl_platforms; do
-
+@@ -2099,7 +2099,9 @@ for plat in $egl_platforms; do
android)
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
;;
-
+ mir)
@@ -11,14 +11,14 @@
*)
AC_MSG_ERROR([EGL platform '$plat' does not exist])
;;
-@@ -2063,6 +2065,7 @@ AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, ec
+@@ -2126,6 +2128,7 @@ AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, ec
AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
+AM_CONDITIONAL(HAVE_EGL_PLATFORM_MIR, echo "$egl_platforms" | grep -q 'mir')
- AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
-
+ AC_SUBST([EGL_NATIVE_PLATFORM])
+ AC_SUBST([EGL_CFLAGS])
--- a/include/EGL/eglplatform.h
+++ b/include/EGL/eglplatform.h
@@ -105,6 +105,13 @@ typedef struct ANativeWindow*
@@ -37,7 +37,7 @@
#if defined(MESA_EGL_NO_X11_HEADERS)
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
-@@ -921,10 +921,12 @@ struct __DRIbufferRec {
+@@ -963,10 +963,12 @@ struct __DRIbufferRec {
unsigned int pitch;
unsigned int cpp;
unsigned int flags;
@@ -51,11 +51,9 @@
struct __DRIdri2LoaderExtensionRec {
__DRIextension base;
-Index: mesa-12.0.2/src/egl/drivers/dri2/egl_dri2.c
-===================================================================
---- mesa-12.0.2.orig/src/egl/drivers/dri2/egl_dri2.c 2016-09-16 12:11:30.975350268 +1000
-+++ mesa-12.0.2/src/egl/drivers/dri2/egl_dri2.c 2016-09-16 13:57:41.750324740 +1000
-@@ -813,6 +813,11 @@
+--- a/src/egl/drivers/dri2/egl_dri2.c
++++ b/src/egl/drivers/dri2/egl_dri2.c
+@@ -834,6 +834,11 @@ dri2_initialize(_EGLDriver *drv, _EGLDis
ret = dri2_initialize_wayland(drv, disp);
break;
#endif
@@ -67,7 +65,7 @@
#ifdef HAVE_ANDROID_PLATFORM
case _EGL_PLATFORM_ANDROID:
ret = dri2_initialize_android(drv, disp);
-@@ -876,6 +881,13 @@
+@@ -906,6 +911,13 @@ dri2_display_release(_EGLDisplay *disp)
}
break;
#endif
@@ -81,7 +79,7 @@
#ifdef HAVE_WAYLAND_PLATFORM
case _EGL_PLATFORM_WAYLAND:
if (dri2_dpy->wl_drm)
-@@ -862,7 +875,8 @@ dri2_terminate(_EGLDriver *drv, _EGLDisp
+@@ -928,7 +940,8 @@ dri2_display_release(_EGLDisplay *disp)
* the ones from the gbm device. As such the gbm itself is responsible
* for the cleanup.
*/
@@ -104,18 +102,18 @@
#include "eglconfig.h"
#include "eglcontext.h"
#include "egldisplay.h"
-@@ -217,6 +221,10 @@ struct dri2_egl_display
+@@ -226,6 +230,10 @@ struct dri2_egl_display
- int is_render_node;
- int is_different_gpu;
+ int is_render_node;
+ int is_different_gpu;
+
+#ifdef HAVE_MIR_PLATFORM
-+ MirMesaEGLNativeDisplay *mir_disp;
++ MirMesaEGLNativeDisplay *mir_disp;
+#endif
};
struct dri2_egl_context
-@@ -263,7 +271,7 @@ struct dri2_egl_surface
+@@ -272,7 +280,7 @@ struct dri2_egl_surface
struct gbm_dri_surface *gbm_surf;
#endif
@@ -124,7 +122,7 @@
__DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
struct {
#ifdef HAVE_WAYLAND_PLATFORM
-@@ -275,9 +283,13 @@ struct dri2_egl_surface
+@@ -284,9 +292,13 @@ struct dri2_egl_surface
void *data;
int data_size;
#endif
@@ -139,9 +137,9 @@
int locked;
int age;
} color_buffers[4], *back, *current;
-@@ -291,6 +303,10 @@ struct dri2_egl_surface
- /* EGL-owned buffers */
- __DRIbuffer *local_buffers[__DRI_BUFFER_COUNT];
+@@ -306,6 +318,10 @@ struct dri2_egl_surface
+ __DRIimage *front;
+ unsigned int visual;
#endif
+
+#ifdef HAVE_MIR_PLATFORM
@@ -149,18 +147,20 @@
+#endif
};
-
-@@ -387,4 +403,7 @@ const __DRIconfig *
- dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type,
- EGLenum colorspace);
+ struct dri2_egl_config
+@@ -394,6 +410,9 @@ dri2_initialize_android(_EGLDriver *drv,
+ EGLBoolean
+ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp);
+EGLBoolean
+dri2_initialize_mir(_EGLDriver *drv, _EGLDisplay *disp);
+
- #endif /* EGL_DRI2_INCLUDED */
+ void
+ dri2_flush_drawable_for_swapbuffers(_EGLDisplay *disp, _EGLSurface *draw);
+
--- /dev/null
+++ b/src/egl/drivers/dri2/platform_mir.c
-@@ -0,0 +1,637 @@
+@@ -0,0 +1,636 @@
+/*
+ * Copyright © 2012 Canonical, Inc
+ *
@@ -487,7 +487,7 @@
+ struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
+ struct dri2_egl_surface *dri2_surf;
+ const __DRIconfig *config;
-+ MirSurfaceParameters surf_params;
++ MirWindowParameters win_params;
+
+ (void) drv;
+
@@ -501,11 +501,11 @@
+ goto cleanup_surf;
+
+ dri2_surf->mir_surf = window;
-+ if (!dri2_surf->mir_surf->surface_get_parameters(dri2_surf->mir_surf, &surf_params))
++ if (!dri2_surf->mir_surf->surface_get_parameters(dri2_surf->mir_surf, &win_params))
+ goto cleanup_surf;
+
-+ dri2_surf->base.Width = surf_params.width;
-+ dri2_surf->base.Height = surf_params.height;
++ dri2_surf->base.Width = win_params.width;
++ dri2_surf->base.Height = win_params.height;
+
+ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] =
+ calloc(sizeof(*dri2_surf->dri_buffers[0]), 1);
@@ -739,7 +739,6 @@
+ dri2_dpy->mir_disp = disp->PlatformDisplay;
+ dri2_dpy->mir_disp->display_get_platform(dri2_dpy->mir_disp, &platform);
+ dri2_dpy->fd = platform.fd[0];
-+ dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
+
+ /*
+ * At the moment, a pointer to gbm_device is the first and only
@@ -800,7 +799,7 @@
+}
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
-@@ -56,7 +56,10 @@
+@@ -58,7 +58,10 @@
#ifdef HAVE_DRM_PLATFORM
#include
#endif
@@ -812,7 +811,7 @@
/**
* Map --with-egl-platforms names to platform types.
-@@ -71,6 +74,7 @@ static const struct {
+@@ -73,6 +76,7 @@ static const struct {
{ _EGL_PLATFORM_ANDROID, "android" },
{ _EGL_PLATFORM_HAIKU, "haiku" },
{ _EGL_PLATFORM_SURFACELESS, "surfaceless" },
@@ -820,7 +819,7 @@
};
-@@ -130,6 +134,47 @@ _eglPointerIsDereferencable(void *p)
+@@ -132,6 +136,47 @@ _eglPointerIsDereferencable(void *p)
#endif
}
@@ -868,7 +867,7 @@
/**
* Try detecting native platform with the help of native display characteristcs.
-@@ -140,6 +185,11 @@ _eglNativePlatformDetectNativeDisplay(vo
+@@ -142,6 +187,11 @@ _eglNativePlatformDetectNativeDisplay(vo
if (nativeDisplay == EGL_DEFAULT_DISPLAY)
return _EGL_INVALID_PLATFORM;
@@ -880,15 +879,15 @@
if (_eglPointerIsDereferencable(nativeDisplay)) {
void *first_pointer = *(void **) nativeDisplay;
-@@ -178,7 +228,7 @@ _eglNativePlatformDetectNativeDisplay(vo
+@@ -180,7 +230,7 @@ _eglNativePlatformDetectNativeDisplay(vo
_EGLPlatformType
_eglGetNativePlatform(void *nativeDisplay)
{
-- static _EGLPlatformType native_platform = _EGL_INVALID_PLATFORM;
-+ _EGLPlatformType native_platform = _EGL_INVALID_PLATFORM;
- char *detection_method = NULL;
+- static _EGLPlatformType native_platform;
++ _EGLPlatformType native_platform;
+ char *detection_method;
- if (native_platform == _EGL_INVALID_PLATFORM) {
+ native_platform = _eglGetNativePlatformFromEnv();
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -50,6 +50,7 @@ enum _egl_platform_type {
@@ -901,7 +900,7 @@
_EGL_INVALID_PLATFORM = -1
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
-@@ -582,13 +582,21 @@ dri2_allocate_textures(struct dri_contex
+@@ -604,13 +604,21 @@ dri2_allocate_textures(struct dri_contex
templ.height0 = dri_drawable->h;
templ.format = format;
templ.bind = bind;
@@ -938,7 +937,7 @@
.getBuffers = dri_get_buffers,
.flushFrontBuffer = dri_flush_front_buffer,
-@@ -642,6 +642,43 @@ gbm_dri_to_gbm_format(uint32_t dri_forma
+@@ -646,6 +646,49 @@ gbm_dri_to_gbm_format(uint32_t dri_forma
return ret;
}
@@ -948,8 +947,14 @@
+ uint32_t dri_format = 0;
+
+ switch (gbm_format) {
++ case GBM_FORMAT_R8:
++ dri_format = __DRI_IMAGE_FORMAT_R8;
++ break;
++ case GBM_FORMAT_GR88:
++ dri_format = __DRI_IMAGE_FORMAT_GR88;
++ break;
+ case GBM_FORMAT_RGB565:
-+ dri_format =__DRI_IMAGE_FORMAT_RGB565;
++ dri_format = __DRI_IMAGE_FORMAT_RGB565;
+ break;
+ case GBM_FORMAT_XRGB8888:
+ case GBM_BO_FORMAT_XRGB8888:
@@ -982,13 +987,19 @@
static struct gbm_bo *
gbm_dri_bo_import(struct gbm_device *gbm,
uint32_t type, void *buffer, uint32_t usage)
-@@ -866,34 +903,7 @@ gbm_dri_bo_create(struct gbm_device *gbm
+@@ -870,40 +913,7 @@ gbm_dri_bo_create(struct gbm_device *gbm
bo->base.base.height = height;
bo->base.base.format = format;
- switch (format) {
+- case GBM_FORMAT_R8:
+- dri_format = __DRI_IMAGE_FORMAT_R8;
+- break;
+- case GBM_FORMAT_GR88:
+- dri_format = __DRI_IMAGE_FORMAT_GR88;
+- break;
- case GBM_FORMAT_RGB565:
-- dri_format =__DRI_IMAGE_FORMAT_RGB565;
+- dri_format = __DRI_IMAGE_FORMAT_RGB565;
- break;
- case GBM_FORMAT_XRGB8888:
- case GBM_BO_FORMAT_XRGB8888:
@@ -1020,7 +1031,7 @@
dri_use |= __DRI_IMAGE_USE_SCANOUT;
--- a/src/egl/Makefile.am
+++ b/src/egl/Makefile.am
-@@ -89,6 +89,12 @@ AM_CFLAGS += -DHAVE_ANDROID_PLATFORM
+@@ -91,6 +91,12 @@ libEGL_la_LIBADD += $(ANDROID_LIBS)
dri2_backend_FILES += drivers/dri2/platform_android.c
endif
@@ -1030,6 +1041,6 @@
+dri2_backend_FILES += drivers/dri2/platform_mir.c
+endif
+
- if HAVE_EGL_DRIVER_DRI2
AM_CFLAGS += \
-I$(top_srcdir)/src/loader \
+ -I$(top_srcdir)/src/egl/drivers/dri2 \
diff -Nru mesa-12.0.6/debian/patches/egl-platform-rs.patch mesa-17.0.7/debian/patches/egl-platform-rs.patch
--- mesa-12.0.6/debian/patches/egl-platform-rs.patch 1970-01-01 00:00:00.000000000 +0000
+++ mesa-17.0.7/debian/patches/egl-platform-rs.patch 2017-06-26 12:58:29.000000000 +0000
@@ -0,0 +1,1185 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -91,6 +91,7 @@ XSHMFENCE_REQUIRED=1.1
+ XVMC_REQUIRED=1.0.6
+ PYTHON_MAKO_REQUIRED=0.8.0
+ LIBSENSORS_REQUIRED=4.0.0
++MIR_REQUIRED=0.26.2
+
+ dnl LLVM versions
+ LLVM_REQUIRED_GALLIUM=3.3.0
+@@ -2131,9 +2132,15 @@ for plat in $egl_platforms; do
+ android)
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
+ ;;
+- mir)
+- PKG_CHECK_MODULES([MIR], [mirclient mir-client-platform-mesa])
+- ;;
++
++ mir)
++ PKG_CHECK_MODULES([MIR], [mirclient mir-client-platform-mesa])
++ ;;
++
++ rs)
++ PKG_CHECK_MODULES([RS], [mirclient >= $MIR_REQUIRED])
++ ;;
++
+ *)
+ AC_MSG_ERROR([EGL platform '$plat' does not exist])
+ ;;
+@@ -2161,6 +2168,7 @@ AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, ec
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_MIR, echo "$egl_platforms" | grep -q 'mir')
++AM_CONDITIONAL(HAVE_EGL_PLATFORM_RS, echo "$egl_platforms" | grep -q 'rs')
+
+ AC_SUBST([EGL_NATIVE_PLATFORM])
+ AC_SUBST([EGL_CFLAGS])
+--- a/include/EGL/eglplatform.h
++++ b/include/EGL/eglplatform.h
+@@ -112,6 +112,13 @@ typedef MirEGLNativeDisplayType EGLNativ
+ typedef void *EGLNativePixmapType;
+ typedef MirEGLNativeWindowType EGLNativeWindowType;
+
++#elif defined(RS_EGL_PLATFORM)
++
++#include
++typedef MirEGLNativeDisplayType EGLNativeDisplayType;
++typedef void *EGLNativePixmapType;
++typedef MirEGLNativeWindowType EGLNativeWindowType;
++
+ #elif defined(__unix__) || defined(__APPLE__)
+
+ #if defined(MESA_EGL_NO_X11_HEADERS)
+--- a/src/egl/Makefile.am
++++ b/src/egl/Makefile.am
+@@ -97,6 +97,13 @@ AM_CFLAGS += $(MIR_CFLAGS)
+ dri2_backend_FILES += drivers/dri2/platform_mir.c
+ endif
+
++if HAVE_EGL_PLATFORM_RS
++AM_CFLAGS += -DHAVE_RS_PLATFORM
++AM_CFLAGS += $(RS_CFLAGS)
++libEGL_la_LIBADD += $(RS_LIBS)
++dri2_backend_FILES += drivers/dri2/platform_rs.c
++endif
++
+ AM_CFLAGS += \
+ -I$(top_srcdir)/src/loader \
+ -I$(top_srcdir)/src/egl/drivers/dri2 \
+--- a/src/egl/drivers/dri2/egl_dri2.c
++++ b/src/egl/drivers/dri2/egl_dri2.c
+@@ -844,6 +844,11 @@ dri2_initialize(_EGLDriver *drv, _EGLDis
+ ret = dri2_initialize_android(drv, disp);
+ break;
+ #endif
++#ifdef HAVE_RS_PLATFORM
++ case _EGL_PLATFORM_RS:
++ ret = dri2_initialize_rs(drv, disp);
++ break;
++#endif
+ default:
+ _eglLog(_EGL_WARNING, "No EGL platform enabled.");
+ return EGL_FALSE;
+@@ -911,6 +916,13 @@ dri2_display_release(_EGLDisplay *disp)
+ }
+ break;
+ #endif
++#ifdef HAVE_RS_PLATFORM
++ case _EGL_PLATFORM_RS:
++ if (dri2_dpy->own_device) {
++ gbm_device_destroy(&dri2_dpy->gbm_dri->base.base);
++ }
++ break;
++#endif
+ #ifdef HAVE_MIR_PLATFORM
+ case _EGL_PLATFORM_MIR:
+ if (dri2_dpy->own_device) {
+@@ -941,7 +953,8 @@ dri2_display_release(_EGLDisplay *disp)
+ * for the cleanup.
+ */
+ if (disp->Platform != _EGL_PLATFORM_DRM &&
+- disp->Platform != _EGL_PLATFORM_MIR) {
++ disp->Platform != _EGL_PLATFORM_MIR &&
++ disp->Platform != _EGL_PLATFORM_RS) {
+ for (i = 0; dri2_dpy->driver_configs[i]; i++)
+ free((__DRIconfig *) dri2_dpy->driver_configs[i]);
+ free(dri2_dpy->driver_configs);
+--- a/src/egl/drivers/dri2/egl_dri2.h
++++ b/src/egl/drivers/dri2/egl_dri2.h
+@@ -74,6 +74,10 @@
+ #include
+ #endif
+
++#ifdef HAVE_RS_PLATFORM
++#include
++#endif
++
+ #include "eglconfig.h"
+ #include "eglcontext.h"
+ #include "egldisplay.h"
+@@ -234,6 +238,11 @@ struct dri2_egl_display
+ #ifdef HAVE_MIR_PLATFORM
+ MirMesaEGLNativeDisplay *mir_disp;
+ #endif
++#ifdef HAVE_RS_PLATFORM
++ MirConnection* mir_conn;
++ pthread_mutex_t lock;
++ pthread_cond_t cv;
++#endif
+ };
+
+ struct dri2_egl_context
+@@ -292,10 +301,10 @@ struct dri2_egl_surface
+ void *data;
+ int data_size;
+ #endif
+-#if HAVE_DRM_PLATFORM || defined(HAVE_MIR_PLATFORM)
++#if HAVE_DRM_PLATFORM || defined(HAVE_MIR_PLATFORM) || defined(HAVE_RS_PLATFORM)
+ struct gbm_bo *bo;
+ #endif
+-#ifdef HAVE_MIR_PLATFORM
++#if defined(HAVE_MIR_PLATFORM) || defined(HAVE_RS_PLATFORM)
+ int fd;
+ int buffer_age;
+ #endif
+@@ -314,6 +323,10 @@ struct dri2_egl_surface
+ __DRIbuffer *local_buffers[__DRI_BUFFER_COUNT];
+ #endif
+
++#ifdef HAVE_RS_PLATFORM
++ void* sc;
++#endif
++
+ #if defined(HAVE_SURFACELESS_PLATFORM)
+ __DRIimage *front;
+ unsigned int visual;
+@@ -413,6 +426,9 @@ dri2_initialize_surfaceless(_EGLDriver *
+ EGLBoolean
+ dri2_initialize_mir(_EGLDriver *drv, _EGLDisplay *disp);
+
++EGLBoolean
++dri2_initialize_rs(_EGLDriver *drv, _EGLDisplay *disp);
++
+ void
+ dri2_flush_drawable_for_swapbuffers(_EGLDisplay *disp, _EGLSurface *draw);
+
+@@ -443,5 +459,4 @@ dri2_set_WL_bind_wayland_display(_EGLDri
+ }
+ #endif
+ }
+-
+ #endif /* EGL_DRI2_INCLUDED */
+--- /dev/null
++++ b/src/egl/drivers/dri2/platform_rs.c
+@@ -0,0 +1,962 @@
++/*
++ * Copyright © 2016 Canonical, Inc
++ *
++ * 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, sublicense,
++ * 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
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS 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.
++ *
++ * Authors:
++ * Cemil Azizoglu
++ */
++
++#include
++#include
++#include
++#include
++#include
++
++#include
++#include
++#include
++
++#include "egl_dri2.h"
++#include "egl_dri2_fallbacks.h"
++#include "loader.h"
++
++#define MAX_BUFFERS (4)
++#define NUM_DEFAULT_BUFFERS (3) /* Can be at most MAX_BUFFERS */
++
++enum buffer_state
++{
++ buffer_state_none = 0,
++ buffer_state_available,
++ buffer_state_acquired,
++ buffer_state_submitted,
++};
++
++typedef struct SwapChain
++{
++ MirRenderSurface* surface;
++ MirPresentationChain* chain;
++ MirPixelFormat format;
++ uint32_t gbm_format;
++ unsigned int buffer_count;
++ MirBuffer* buffers[MAX_BUFFERS];
++ enum buffer_state state[MAX_BUFFERS];
++ uint32_t next_buffer_to_use;
++ pthread_mutex_t lock;
++ pthread_cond_t cv;
++ struct MirExtensionGbmBufferV2 const* gbm_buffer_ext;
++} SwapChain;
++
++static uint32_t
++mir_format_to_gbm_format(MirPixelFormat format)
++{
++ uint32_t gbm_pf;
++
++ switch (format)
++ {
++ case mir_pixel_format_argb_8888:
++ gbm_pf = GBM_FORMAT_ARGB8888;
++ break;
++ case mir_pixel_format_xrgb_8888:
++ gbm_pf = GBM_FORMAT_XRGB8888;
++ break;
++ case mir_pixel_format_abgr_8888:
++ gbm_pf = GBM_FORMAT_ABGR8888;
++ break;
++ case mir_pixel_format_xbgr_8888:
++ gbm_pf = GBM_FORMAT_XBGR8888;
++ break;
++ case mir_pixel_format_rgb_565:
++ gbm_pf = GBM_FORMAT_RGB565;
++ break;
++ default:
++ gbm_pf = UINT32_MAX;
++ break;
++ }
++
++ return gbm_pf;
++}
++
++static int
++get_format_bpp(MirPixelFormat format)
++{
++ int bpp;
++
++ switch (format) {
++ case mir_pixel_format_argb_8888:
++ case mir_pixel_format_xrgb_8888:
++ case mir_pixel_format_abgr_8888:
++ case mir_pixel_format_xbgr_8888:
++ bpp = 4;
++ break;
++ case mir_pixel_format_rgb_565:
++ bpp = 2;
++ break;
++ default:
++ bpp = 0;
++ break;
++ }
++
++ return bpp;
++}
++
++static struct gbm_bo *
++create_gbm_bo_from_buffer(struct gbm_device* gbm_dev, int fd, int width, int height, uint32_t stride, uint32_t format)
++{
++ struct gbm_import_fd_data data;
++
++ _eglLog(_EGL_INFO, "importing fd=%d", fd);
++ data.fd = fd;
++ data.width = width;
++ data.height = height;
++ data.format = format;
++ data.stride = stride;
++
++ return gbm_bo_import(gbm_dev, GBM_BO_IMPORT_FD, &data, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
++}
++
++static void
++clear_cached_buffers(struct dri2_egl_surface *dri2_surf)
++{
++ size_t i;
++ for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
++ if (dri2_surf->color_buffers[i].bo != NULL)
++ gbm_bo_destroy(dri2_surf->color_buffers[i].bo);
++ dri2_surf->color_buffers[i].bo = NULL;
++ dri2_surf->color_buffers[i].fd = -1;
++ dri2_surf->color_buffers[i].age = 0;
++ }
++}
++
++static ssize_t
++find_cached_buffer_with_fd(struct dri2_egl_surface *dri2_surf, int fd)
++{
++ ssize_t i;
++
++ for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
++ if (dri2_surf->color_buffers[i].fd == fd)
++ return i;
++ }
++
++ return -1;
++}
++
++static void
++cache_buffer(struct dri2_egl_surface *dri2_surf, size_t slot,
++ int fd, int width, int height, uint32_t stride)
++{
++ SwapChain* sc = (SwapChain *)dri2_surf->sc;
++ struct dri2_egl_display *dri2_dpy =
++ dri2_egl_display(dri2_surf->base.Resource.Display);
++
++ if (dri2_surf->color_buffers[slot].bo != NULL)
++ gbm_bo_destroy(dri2_surf->color_buffers[slot].bo);
++
++ dri2_surf->color_buffers[slot].bo = create_gbm_bo_from_buffer(
++ &dri2_dpy->gbm_dri->base.base,
++ fd, width, height, stride,
++ sc->gbm_format);
++
++ _eglLog(_EGL_INFO, " imported bo : %p format = %d (GBM_FORMAT_ARGB8888=%d)",
++ (void*)dri2_surf->color_buffers[slot].bo, gbm_bo_get_format(dri2_surf->color_buffers[slot].bo), GBM_FORMAT_ARGB8888);
++
++ dri2_surf->color_buffers[slot].fd = fd;
++}
++
++static size_t
++find_best_cache_slot(struct dri2_egl_surface *dri2_surf)
++{
++ size_t i;
++ size_t start_slot = 0;
++
++ /*
++ * If we have a back buffer, start searching after it to ensure
++ * we don't reuse the slot too soon.
++ */
++ if (dri2_surf->back != NULL) {
++ start_slot = dri2_surf->back - dri2_surf->color_buffers;
++ start_slot = (start_slot + 1) % ARRAY_SIZE(dri2_surf->color_buffers);
++ }
++
++ /* Try to find an empty slot */
++ for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
++ size_t slot = (start_slot + i) % ARRAY_SIZE(dri2_surf->color_buffers);
++ if (dri2_surf->color_buffers[slot].bo == NULL)
++ return slot;
++ }
++
++ /* If we don't have an empty slot, use the start slot */
++ return start_slot;
++}
++
++static void
++update_cached_buffer_ages(struct dri2_egl_surface *dri2_surf, size_t used_slot)
++{
++ /*
++ * If 3 (Mir surfaces are triple buffered at most) other buffers have been
++ * used since a buffer was used, we probably won't need this buffer again.
++ */
++ static const int destruction_age = 3;
++ size_t i;
++
++ for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
++ if (dri2_surf->color_buffers[i].bo != NULL) {
++ if (i == used_slot) {
++ dri2_surf->color_buffers[i].age = 0;
++ }
++ else {
++ ++dri2_surf->color_buffers[i].age;
++ if (dri2_surf->color_buffers[i].age == destruction_age) {
++ gbm_bo_destroy(dri2_surf->color_buffers[i].bo);
++ dri2_surf->color_buffers[i].bo = NULL;
++ dri2_surf->color_buffers[i].fd = -1;
++ }
++ }
++ }
++ }
++}
++
++static int
++dri2_rs_authenticate(_EGLDisplay *disp, uint32_t id)
++{
++ return 0;
++}
++
++static void
++buffer_submit_callback(MirBuffer* buffer, void* context)
++{
++ SwapChain* sc = (SwapChain*) context;
++
++// _eglLog(_EGL_DEBUG, "Buffer %p returned from server", (void*) buffer);
++ for (uint32_t i = 0; i < sc->buffer_count; i++)
++ if (sc->buffers[i] == buffer)
++ {
++ pthread_mutex_lock(&sc->lock);
++ assert(sc->state[i] == buffer_state_submitted);
++ sc->state[i] = buffer_state_available;
++ pthread_mutex_unlock(&sc->lock);
++ pthread_cond_broadcast(&sc->cv);
++ }
++}
++
++static EGLBoolean
++mir_submit_buffer(struct dri2_egl_surface *dri2_surf)
++{
++ SwapChain* sc = (SwapChain *)dri2_surf->sc;
++
++ for (uint32_t i = 0; i < sc->buffer_count; i++)
++ {
++ if (sc->state[i] == buffer_state_acquired)
++ {
++ int buffer_fd = sc->gbm_buffer_ext->fd(sc->buffers[i]);
++ if (buffer_fd == dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->fd)
++ {
++// _eglLog(_EGL_DEBUG, "..submitting buffer %p", sc->buffers[i]);
++ sc->state[i] = buffer_state_submitted;
++ mir_presentation_chain_submit_buffer(sc->chain,
++ sc->buffers[i],
++ buffer_submit_callback,
++ sc);
++ break;
++ }
++ }
++ }
++
++ return EGL_TRUE;
++}
++
++static EGLBoolean
++mir_acquire_buffer(struct dri2_egl_display *dri2_dpy, struct dri2_egl_surface *dri2_surf)
++{
++ SwapChain* sc = (SwapChain *)dri2_surf->sc;
++ MirBuffer* buffer = NULL;
++ unsigned int buffer_width, buffer_height;
++ bool found = false;
++ ssize_t buf_slot = -1;
++
++ if (!sc)
++ return EGL_TRUE;
++
++ uint32_t wrap = (sc->next_buffer_to_use-1)%(sc->buffer_count);
++ do
++ {
++ uint32_t const next_buffer = sc->next_buffer_to_use;
++ if (sc->state[next_buffer] == buffer_state_available)
++ {
++ int rs_width, rs_height;
++
++ found = true;
++ sc->state[next_buffer] = buffer_state_acquired;
++ buffer = sc->buffers[next_buffer];
++ buffer_width = mir_buffer_get_width(buffer);
++ buffer_height = mir_buffer_get_height(buffer);
++
++ // _eglLog(_EGL_DEBUG, "..acquired buffer %p with fd = %d", sc->buffers[sc->next_buffer_to_use], mbp->fd[0]);
++ mir_render_surface_get_size(sc->surface, &rs_width, &rs_height);
++ if ((rs_width != buffer_width) || (rs_height != buffer_height))
++ {
++ // release the old buffer
++ mir_buffer_release(buffer);
++ // .. replace it with a new buffer
++ sc->buffers[next_buffer] =
++ sc->gbm_buffer_ext->allocate_buffer_gbm_sync(
++ dri2_dpy->mir_conn,
++ rs_width, rs_height,
++ sc->gbm_format,
++ GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
++
++ buffer = sc->buffers[next_buffer];
++ buffer_width = rs_width;
++ buffer_height = rs_height;
++ }
++ }
++ else
++ {
++ if (next_buffer == wrap)
++ {
++ pthread_mutex_lock(&sc->lock);
++ pthread_cond_wait(&sc->cv, &sc->lock);
++ pthread_mutex_unlock(&sc->lock);
++ }
++ }
++
++ sc->next_buffer_to_use = (next_buffer+1)%(sc->buffer_count);
++ }
++ while(!found);
++
++ if (buffer_width && buffer_height) {
++ dri2_surf->base.Width = buffer_width;
++ dri2_surf->base.Height = buffer_height;
++ }
++
++ int buffer_fd = sc->gbm_buffer_ext->fd(buffer);
++ assert(buffer_fd > 0);
++ unsigned int buffer_age = sc->gbm_buffer_ext->age(buffer);
++ uint32_t buffer_stride = sc->gbm_buffer_ext->stride(buffer);
++ buf_slot = find_cached_buffer_with_fd(dri2_surf, buffer_fd);
++
++ if (buf_slot != -1) {
++ /*
++ * If we get a new buffer with an fd of a previously cached buffer,
++ * replace the old buffer in the cache...
++ */
++ if (buffer_age == 0)
++ cache_buffer(dri2_surf, buf_slot, buffer_fd, buffer_width, buffer_height, buffer_stride);
++ /* ... otherwise just reuse the existing cached buffer */
++ }
++ else {
++ /* We got a new buffer with an fd that's not in the cache, so add it */
++ buf_slot = find_best_cache_slot(dri2_surf);
++ cache_buffer(dri2_surf, buf_slot, buffer_fd, buffer_width, buffer_height, buffer_stride);
++ }
++
++ update_cached_buffer_ages(dri2_surf, buf_slot);
++
++ dri2_surf->back = &dri2_surf->color_buffers[buf_slot];
++ dri2_surf->back->buffer_age = buffer_age;
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->name = 0;
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->fd = buffer_fd;
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->pitch = buffer_stride;
++
++ return EGL_TRUE;
++}
++
++static _EGLSurface *
++dri2_rs_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
++ _EGLConfig *conf, EGLNativeWindowType window,
++ const EGLint *attrib_list)
++{
++ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
++ struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
++ struct dri2_egl_surface *dri2_surf;
++ const __DRIconfig *config;
++ MirRenderSurface* surface = window;
++ SwapChain *sc = calloc(1, sizeof(SwapChain));
++ int width = 0, height = 0;
++ uint32_t num_buffers = 0;
++
++ if (!mir_render_surface_is_valid(surface))
++ {
++ _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_rs_create_window_surface: surface is bad");
++ return NULL;
++ }
++
++ sc->surface = surface;
++ sc->format = dri2_conf->base.NativeVisualID;
++ _eglLog(_EGL_INFO, "Mir pixel format requested : %d", sc->format);
++ sc->gbm_format = mir_format_to_gbm_format(sc->format);
++
++ if (sc->gbm_format == UINT32_MAX)
++ {
++ _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_rs_create_window_surface: bad format");
++ return NULL;
++ }
++
++ mir_render_surface_get_size(surface, &width, &height);
++ _eglLog(_EGL_INFO, "render surface of size : %dx%d", width, height);
++
++ sc->chain = mir_render_surface_get_presentation_chain(surface);
++ if (!mir_presentation_chain_is_valid(sc->chain))
++ {
++ _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_rs_create_window_surface: pc is bad");
++ return NULL;
++ }
++
++ pthread_mutex_init(&sc->lock, NULL);
++ pthread_cond_init(&sc->cv, NULL);
++
++ char* str_num = getenv("MIR_EGL_CLIENT_BUFFERS");
++ if (str_num)
++ num_buffers = atoi(str_num);
++ if ((num_buffers < 2) || (num_buffers > MAX_BUFFERS))
++ num_buffers = NUM_DEFAULT_BUFFERS;
++
++ _eglLog(_EGL_INFO, "Allocating %d buffers", num_buffers);
++ sc->gbm_buffer_ext = mir_extension_gbm_buffer_v2(dri2_dpy->mir_conn);
++ assert(sc->gbm_buffer_ext);
++ assert(sc->gbm_buffer_ext->allocate_buffer_gbm_sync);
++ assert(sc->gbm_buffer_ext->fd);
++ assert(sc->gbm_buffer_ext->stride);
++ assert(sc->gbm_buffer_ext->age);
++
++ for (unsigned int i = 0; i < num_buffers; i++)
++ {
++ sc->buffers[i] =
++ sc->gbm_buffer_ext->allocate_buffer_gbm_sync(dri2_dpy->mir_conn,
++ width, height,
++ sc->gbm_format,
++ GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
++ assert(sc->state[i] == buffer_state_none);
++ sc->state[i] = buffer_state_available;
++ sc->buffer_count++;
++ }
++
++ _eglLog(_EGL_INFO, "Presentation chain : %p", sc->chain);
++ _eglLog(_EGL_INFO, "\tcontains %d buffers", sc->buffer_count);
++ for (uint32_t i=0; ibuffer_count; i++) {
++ _eglLog(_EGL_INFO, "Buffer #%d %dx%d: %p",
++ i,
++ mir_buffer_get_width(sc->buffers[i]),
++ mir_buffer_get_height(sc->buffers[i]),
++ sc->buffers[i]);
++ }
++
++ dri2_surf = calloc(1, sizeof *dri2_surf);
++ if (!dri2_surf) {
++ _eglError(EGL_BAD_ALLOC, "dri2_rs_create_window_surface");
++ return NULL;
++ }
++
++ if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
++ goto cleanup_surf;
++
++ dri2_surf->sc = sc;
++
++ dri2_surf->base.Width = width;
++ dri2_surf->base.Height = height;
++
++ dri2_surf->dri_buffers[__DRI_BUFFER_FRONT_LEFT] =
++ calloc(sizeof(*dri2_surf->dri_buffers[0]), 1);
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT] =
++ calloc(sizeof(*dri2_surf->dri_buffers[0]), 1);
++
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->attachment =
++ __DRI_BUFFER_BACK_LEFT;
++
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]->cpp = get_format_bpp(sc->format);
++
++ clear_cached_buffers(dri2_surf);
++
++ if(!mir_acquire_buffer(dri2_dpy, dri2_surf))
++ goto cleanup_surf;
++
++ config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
++ dri2_surf->base.GLColorspace);
++
++ if (dri2_dpy->gbm_dri) {
++ struct gbm_dri_surface *surf = malloc(sizeof *surf);
++
++ dri2_surf->gbm_surf = surf;
++ surf->base.gbm = &dri2_dpy->gbm_dri->base.base;
++ surf->base.width = dri2_surf->base.Width;
++ surf->base.height = dri2_surf->base.Height;
++ surf->base.format = sc->gbm_format;
++ surf->base.flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
++ surf->dri_private = dri2_surf;
++
++ dri2_surf->dri_drawable =
++ (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
++ config,
++ dri2_surf->gbm_surf);
++ }
++ else {
++ dri2_surf->dri_drawable =
++ (*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
++ config,
++ dri2_surf);
++ }
++
++ if (dri2_surf->dri_drawable == NULL) {
++ _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
++ }
++
++ return &dri2_surf->base;
++
++cleanup_surf:
++ free(dri2_surf);
++ return NULL;
++}
++
++static _EGLSurface *
++dri2_rs_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
++ _EGLConfig *conf, void *native_window,
++ const EGLint *attrib_list)
++{
++ _eglError(EGL_BAD_PARAMETER, "EGL pixmap surfaces are unsupported on Mir (RS)");
++ return NULL;
++}
++
++static EGLBoolean
++dri2_rs_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
++{
++ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
++ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
++ int i;
++
++ (void) drv;
++
++ if (!_eglPutSurface(surf))
++ return EGL_TRUE;
++
++ clear_cached_buffers(dri2_surf);
++
++ (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
++
++ for (i = 0; i < __DRI_BUFFER_COUNT; ++i) {
++ if (dri2_surf->dri_buffers[i]) {
++ if ((i == __DRI_BUFFER_FRONT_LEFT) ||
++ (i == __DRI_BUFFER_BACK_LEFT)) {
++ free(dri2_surf->dri_buffers[i]);
++ }
++ else {
++ dri2_dpy->dri2->releaseBuffer(dri2_dpy->dri_screen,
++ dri2_surf->dri_buffers[i]);
++ }
++ }
++ }
++
++ free(dri2_surf->gbm_surf);
++
++ SwapChain *sc = (SwapChain *)dri2_surf->sc;
++ dri2_surf->sc = NULL;
++
++ bool wait_for_buffers;
++ do
++ {
++ sleep(0);
++ wait_for_buffers = false;
++
++ for (uint32_t i = 0; i < sc->buffer_count; i++)
++ {
++ if (sc->state[i] > buffer_state_available)
++ wait_for_buffers = true;
++ }
++ } while(wait_for_buffers);
++
++ for (uint32_t i = 0; i < sc->buffer_count; i++) {
++ if(sc->buffers[i])
++ {
++ mir_buffer_release(sc->buffers[i]);
++ sc->buffers[i] = NULL;
++ }
++ }
++
++ pthread_mutex_destroy(&sc->lock);
++ pthread_cond_destroy(&sc->cv);
++
++ free(sc);
++ free(surf);
++
++ return EGL_TRUE;
++}
++
++static _EGLImage *
++dri2_rs_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
++ _EGLContext *ctx, EGLenum target,
++ EGLClientBuffer buffer, const EGLint *attr_list)
++{
++ (void) drv;
++
++ switch (target) {
++ case EGL_NATIVE_PIXMAP_KHR:
++ _eglError(EGL_BAD_PARAMETER, "Mir has no native pixmaps");
++ return NULL;
++ default:
++ return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
++ }
++}
++
++static EGLBoolean
++dri2_rs_swap_interval(_EGLDriver *drv, _EGLDisplay *disp,
++ _EGLSurface *surf, EGLint interval)
++{
++ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
++ SwapChain* sc = (SwapChain *)dri2_surf->sc;
++ MirPresentationChain* chain = sc->chain;
++ MirPresentMode mode;
++
++ switch (interval) {
++ case 0:
++ mode = mir_present_mode_mailbox;
++ break;
++ case 1:
++ mode = mir_present_mode_fifo;
++ break;
++ default:
++ _eglError(EGL_BAD_PARAMETER, "Mir only supports swap interval 0 and 1");
++ return EGL_FALSE;
++ }
++
++ mir_presentation_chain_set_mode(chain, mode);
++ return EGL_TRUE;
++}
++
++static EGLBoolean
++dri2_rs_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
++{
++ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
++ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
++ int rc;
++
++ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
++
++ rc = mir_submit_buffer(dri2_surf);
++
++ if (rc)
++ rc = mir_acquire_buffer(dri2_dpy, dri2_surf);
++
++ (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
++
++ return rc;
++}
++
++static EGLint
++dri2_rs_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy,
++ _EGLSurface *surf)
++{
++ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
++ if (dri2_surf->back)
++ {
++ return dri2_surf->back->buffer_age;
++ }
++ return 0;
++}
++
++static __DRIbuffer*
++dri2_rs_get_buffers_with_format(__DRIdrawable *driDrawable,
++ int *width,
++ int *height,
++ unsigned int *attachments,
++ int count,
++ int *out_count,
++ void *data)
++{
++ struct dri2_egl_surface *dri2_surf = data;
++ struct dri2_egl_display *dri2_dpy =
++ dri2_egl_display(dri2_surf->base.Resource.Display);
++ int i;
++
++ dri2_surf->buffer_count = 0;
++ for (i = 0; i < 2*count; i+=2) {
++ assert(attachments[i] < __DRI_BUFFER_COUNT);
++ assert(dri2_surf->buffer_count < 5);
++
++ if (dri2_surf->dri_buffers[attachments[i]] == NULL) {
++ /* Our frame callback must keep these buffers valid */
++ assert(attachments[i] != __DRI_BUFFER_FRONT_LEFT);
++ assert(attachments[i] != __DRI_BUFFER_BACK_LEFT);
++
++ dri2_surf->dri_buffers[attachments[i]] =
++ dri2_dpy->dri2->allocateBuffer(dri2_dpy->dri_screen,
++ attachments[i], attachments[i+1],
++ dri2_surf->base.Width, dri2_surf->base.Height);
++
++ if (!dri2_surf->dri_buffers[attachments[i]])
++ continue;
++ }
++
++ memcpy(&dri2_surf->buffers[dri2_surf->buffer_count],
++ dri2_surf->dri_buffers[attachments[i]],
++ sizeof(__DRIbuffer));
++
++ dri2_surf->buffer_count++;
++ }
++
++ assert(dri2_surf->base.Type == EGL_PIXMAP_BIT ||
++ dri2_surf->dri_buffers[__DRI_BUFFER_BACK_LEFT]);
++
++ *out_count = dri2_surf->buffer_count;
++ if (dri2_surf->buffer_count == 0)
++ return NULL;
++
++ *width = dri2_surf->base.Width;
++ *height = dri2_surf->base.Height;
++
++ return dri2_surf->buffers;
++}
++
++static __DRIbuffer*
++dri2_rs_get_buffers(__DRIdrawable *driDrawable,
++ int *width,
++ int *height,
++ unsigned int *attachments,
++ int count,
++ int *out_count,
++ void *data)
++{
++ unsigned int *attachments_with_format;
++ __DRIbuffer *buffer;
++ const unsigned int format = 32;
++ int i;
++
++ attachments_with_format = calloc(count * 2, sizeof(unsigned int));
++ if (!attachments_with_format) {
++ *out_count = 0;
++ return NULL;
++ }
++
++ for (i = 0; i < count; ++i) {
++ attachments_with_format[2*i] = attachments[i];
++ attachments_with_format[2*i + 1] = format;
++ }
++
++ buffer =
++ dri2_rs_get_buffers_with_format(driDrawable,
++ width, height,
++ attachments_with_format, count,
++ out_count, data);
++
++ free(attachments_with_format);
++
++ return buffer;
++}
++
++static void
++dri2_rs_flush_front_buffer(__DRIdrawable *driDrawable, void *data)
++{
++ (void) driDrawable;
++
++ /* FIXME: Does EGL support front buffer rendering at all? */
++
++#if 0
++ struct dri2_egl_surface *dri2_surf = data;
++
++ dri2WaitGL(dri2_surf);
++#else
++ (void) data;
++#endif
++}
++
++static int
++dri2_rs_image_get_buffers(__DRIdrawable *driDrawable,
++ unsigned int format,
++ uint32_t *stamp,
++ void *loaderPrivate,
++ uint32_t buffer_mask,
++ struct __DRIimageList *buffers)
++{
++ struct dri2_egl_surface *dri2_surf = loaderPrivate;
++
++ if (buffer_mask & __DRI_IMAGE_BUFFER_BACK) {
++ if (!dri2_surf->back)
++ return 0;
++
++ buffers->back = ((struct gbm_dri_bo *)dri2_surf->back->bo)->image;
++ buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
++
++ return 1;
++ }
++
++ return 0;
++}
++
++static struct dri2_egl_display_vtbl dri2_rs_display_vtbl = {
++ .authenticate = dri2_rs_authenticate,
++ .create_window_surface = dri2_rs_create_window_surface,
++ .create_pixmap_surface = dri2_rs_create_pixmap_surface,
++ .create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
++ .destroy_surface = dri2_rs_destroy_surface,
++ .create_image = dri2_rs_create_image_khr,
++ .swap_interval = dri2_rs_swap_interval,
++ .swap_buffers = dri2_rs_swap_buffers,
++ .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
++ .swap_buffers_region = dri2_fallback_swap_buffers_region,
++ .post_sub_buffer = dri2_fallback_post_sub_buffer,
++ .copy_buffers = dri2_fallback_copy_buffers,
++ .query_buffer_age = dri2_rs_query_buffer_age,
++ .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
++ .get_sync_values = dri2_fallback_get_sync_values,
++ .get_dri_drawable = dri2_surface_get_dri_drawable,
++};
++
++static void set_auth_fd(int auth_fd, void* context)
++{
++ struct dri2_egl_display *dri2_dpy = context;
++ int dup_fd = dup(auth_fd);
++ _eglLog(_EGL_INFO, "Initial fd=%d with dup=%d", auth_fd, dup_fd);
++
++ pthread_mutex_lock(&dri2_dpy->lock);
++ dri2_dpy->fd = dup_fd;
++ pthread_mutex_unlock(&dri2_dpy->lock);
++ pthread_cond_broadcast(&dri2_dpy->cv);
++}
++
++static EGLBoolean
++mir_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
++{
++ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
++ static const struct {
++ int format;
++ unsigned int rgba_masks[4];
++ } visuals[] = {
++ { mir_pixel_format_rgb_565, { 0xf800, 0x7e0, 0x1f, 0x0 } },
++ { mir_pixel_format_argb_8888, { 0xff0000, 0xff00, 0xff, 0xff000000 } },
++ { mir_pixel_format_abgr_8888, { 0xff, 0xff00, 0xff0000, 0xff000000 } },
++ { mir_pixel_format_xbgr_8888, { 0xff, 0xff00, 0xff0000, 0x0 } },
++ { mir_pixel_format_xrgb_8888, { 0xff0000, 0xff00, 0xff, 0x0 } },
++ };
++ EGLint config_attrs[] = {
++ EGL_NATIVE_VISUAL_ID, 0,
++ EGL_NATIVE_VISUAL_TYPE, 0,
++ EGL_NONE
++ };
++ unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
++ int count, i, j;
++
++ count = 0;
++ for (i = 0; dri2_dpy->driver_configs[i]; i++) {
++ const EGLint surface_type = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
++ struct dri2_egl_config *dri2_conf;
++
++ for (j = 0; j < ARRAY_SIZE(visuals); j++) {
++ config_attrs[1] = visuals[j].format;
++ config_attrs[3] = visuals[j].format;
++
++ dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i],
++ count + 1, surface_type, config_attrs, visuals[j].rgba_masks);
++ if (dri2_conf) {
++ _eglLog(_EGL_INFO, "Added config for %d", visuals[j].format);
++ count++;
++ format_count[j]++;
++ }
++ }
++ }
++
++ for (i = 0; i < ARRAY_SIZE(format_count); i++) {
++ if (!format_count[i]) {
++ _eglLog(_EGL_DEBUG, "No DRI config supports mir format %d",
++ visuals[i].format);
++ }
++ }
++
++ return (count != 0);
++}
++
++EGLBoolean
++dri2_initialize_rs(_EGLDriver *drv, _EGLDisplay *disp)
++{
++ struct dri2_egl_display *dri2_dpy;
++ struct gbm_device *gbm = NULL;
++
++ loader_set_logger(_eglLog);
++
++ dri2_dpy = calloc(1, sizeof *dri2_dpy);
++ if (!dri2_dpy)
++ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
++
++ disp->DriverData = (void *) dri2_dpy;
++ dri2_dpy->mir_conn = disp->PlatformDisplay;
++
++ pthread_mutex_init(&dri2_dpy->lock, NULL);
++ pthread_cond_init(&dri2_dpy->cv, NULL);
++
++ MirExtensionMesaDRMAuthV1 const* ext =
++ mir_extension_mesa_drm_auth_v1(dri2_dpy->mir_conn);
++ if (!ext)
++ goto cleanup_dpy;
++ ext->drm_auth_fd(dri2_dpy->mir_conn, set_auth_fd, dri2_dpy);
++
++ pthread_mutex_lock(&dri2_dpy->lock);
++ while (!dri2_dpy->fd)
++ pthread_cond_wait(&dri2_dpy->cv, &dri2_dpy->lock);
++ pthread_mutex_unlock(&dri2_dpy->lock);
++
++ pthread_mutex_destroy(&dri2_dpy->lock);
++ pthread_cond_destroy(&dri2_dpy->cv);
++
++ dri2_dpy->own_device = 1;
++ gbm = gbm_create_device(dri2_dpy->fd);
++ if (gbm == NULL)
++ goto cleanup_dpy;
++
++ if (gbm) {
++ struct gbm_dri_device *gbm_dri = gbm_dri_device(gbm);
++
++ dri2_dpy->gbm_dri = gbm_dri;
++ dri2_dpy->driver_name = strdup(gbm_dri->base.driver_name);
++ dri2_dpy->dri_screen = gbm_dri->screen;
++ dri2_dpy->core = gbm_dri->core;
++ dri2_dpy->dri2 = gbm_dri->dri2;
++ dri2_dpy->image = gbm_dri->image;
++ dri2_dpy->flush = gbm_dri->flush;
++ dri2_dpy->driver_configs = gbm_dri->driver_configs;
++
++ gbm_dri->lookup_image = dri2_lookup_egl_image;
++ gbm_dri->lookup_user_data = disp;
++
++ gbm_dri->get_buffers = dri2_rs_get_buffers;
++ gbm_dri->flush_front_buffer = dri2_rs_flush_front_buffer;
++ gbm_dri->get_buffers_with_format = dri2_rs_get_buffers_with_format;
++ gbm_dri->image_get_buffers = dri2_rs_image_get_buffers;
++
++ dri2_setup_screen(disp);
++ }
++
++ if (!mir_add_configs_for_visuals(drv, disp)) {
++ _eglLog(_EGL_FATAL, "DRI2: failed to add configs");
++ goto cleanup_dpy;
++ }
++
++ disp->Extensions.EXT_buffer_age = EGL_TRUE;
++/*
++ disp->Extensions.EXT_swap_buffers_with_damage = EGL_FALSE;
++ disp->Extensions.KHR_image_pixmap = EGL_FALSE;
++*/
++ dri2_dpy->vtbl = &dri2_rs_display_vtbl;
++
++ return EGL_TRUE;
++
++cleanup_dpy:
++ free(dri2_dpy);
++ disp->DriverData = NULL;
++
++ return EGL_FALSE;
++}
+--- a/src/egl/main/egldisplay.c
++++ b/src/egl/main/egldisplay.c
+@@ -62,6 +62,9 @@
+ #include
+ #include
+ #endif
++#ifdef HAVE_RS_PLATFORM
++#include
++#endif
+
+ /**
+ * Map --with-egl-platforms names to platform types.
+@@ -76,7 +79,8 @@ static const struct {
+ { _EGL_PLATFORM_ANDROID, "android" },
+ { _EGL_PLATFORM_HAIKU, "haiku" },
+ { _EGL_PLATFORM_SURFACELESS, "surfaceless" },
+- { _EGL_PLATFORM_MIR, "mir" }
++ { _EGL_PLATFORM_MIR, "mir" },
++ { _EGL_PLATFORM_RS, "rs" }
+ };
+
+
+@@ -187,9 +191,14 @@ _eglNativePlatformDetectNativeDisplay(vo
+ if (nativeDisplay == EGL_DEFAULT_DISPLAY)
+ return _EGL_INVALID_PLATFORM;
+
++#ifdef HAVE_RS_PLATFORM
++ if (mir_connection_is_valid(nativeDisplay))
++ return _EGL_PLATFORM_RS;
++#endif
++
+ #ifdef HAVE_MIR_PLATFORM
+ if (_mir_display_is_valid(nativeDisplay))
+- return _EGL_PLATFORM_MIR;
++ return _EGL_PLATFORM_MIR;
+ #endif
+
+ if (_eglPointerIsDereferencable(nativeDisplay)) {
+--- a/src/egl/main/egldisplay.h
++++ b/src/egl/main/egldisplay.h
+@@ -51,6 +51,7 @@ enum _egl_platform_type {
+ _EGL_PLATFORM_HAIKU,
+ _EGL_PLATFORM_SURFACELESS,
+ _EGL_PLATFORM_MIR,
++ _EGL_PLATFORM_RS,
+
+ _EGL_NUM_PLATFORMS,
+ _EGL_INVALID_PLATFORM = -1
diff -Nru mesa-12.0.6/debian/patches/khr_platform_mir.patch mesa-17.0.7/debian/patches/khr_platform_mir.patch
--- mesa-12.0.6/debian/patches/khr_platform_mir.patch 1970-01-01 00:00:00.000000000 +0000
+++ mesa-17.0.7/debian/patches/khr_platform_mir.patch 2017-06-26 12:58:29.000000000 +0000
@@ -0,0 +1,82 @@
+--- a/src/egl/main/eglapi.c
++++ b/src/egl/main/eglapi.c
+@@ -398,6 +398,11 @@ _eglGetPlatformDisplayCommon(EGLenum pla
+ dpy = _eglGetSurfacelessDisplay(native_display, attrib_list);
+ break;
+ #endif
++#ifdef HAVE_RS_PLATFORM
++ case EGL_PLATFORM_MIR_KHR:
++ dpy = _eglGetMirDisplay(native_display, attrib_list);
++ break;
++#endif
+ default:
+ RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, NULL);
+ }
+--- a/src/egl/main/egldisplay.c
++++ b/src/egl/main/egldisplay.c
+@@ -620,3 +620,22 @@ _eglGetSurfacelessDisplay(void *native_d
+ return _eglFindDisplay(_EGL_PLATFORM_SURFACELESS, native_display);
+ }
+ #endif /* HAVE_SURFACELESS_PLATFORM */
++
++#ifdef HAVE_RS_PLATFORM
++_EGLDisplay*
++_eglGetMirDisplay(MirConnection *mir_connection,
++ const EGLint *attrib_list)
++{
++ if (!mir_connection_is_valid(mir_connection)) {
++ _eglError(EGL_BAD_PARAMETER, "eglGetPlatformDisplay");
++ }
++
++ /* EGL_KHR_platform_mir recognizes no attributes. */
++ if (attrib_list != NULL && attrib_list[0] != EGL_NONE) {
++ _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
++ return NULL;
++ }
++
++ return _eglFindDisplay(_EGL_PLATFORM_RS, mir_connection);
++}
++#endif /* HAVE_RS_PLATFORM */
+--- a/src/egl/main/egldisplay.h
++++ b/src/egl/main/egldisplay.h
+@@ -284,6 +284,14 @@ _eglGetSurfacelessDisplay(void *native_d
+ const EGLint *attrib_list);
+ #endif
+
++#ifdef HAVE_RS_PLATFORM
++typedef struct MirConnection MirConnection;
++
++_EGLDisplay*
++_eglGetMirDisplay(MirConnection *mir_connection,
++ const EGLint *attrib_list);
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/src/egl/main/eglglobals.c
++++ b/src/egl/main/eglglobals.c
+@@ -65,6 +65,9 @@ struct _egl_global _eglGlobal =
+ #ifdef HAVE_SURFACELESS_PLATFORM
+ " EGL_MESA_platform_surfaceless"
+ #endif
++#ifdef HAVE_RS_PLATFORM
++ " EGL_KHR_platform_mir"
++#endif
+ " EGL_KHR_client_get_all_proc_addresses"
+ " EGL_KHR_debug",
+
+--- a/include/EGL/eglext.h
++++ b/include/EGL/eglext.h
+@@ -290,6 +290,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSetDama
+ #define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6
+ #endif /* EGL_KHR_platform_x11 */
+
++#ifndef EGL_KHR_platform_mir
++#define EGL_KHR_platform_mir 1
++#define EGL_PLATFORM_MIR_KHR 0x31D9
++#endif /* EGL_KHR_platform_mir */
++
+ #ifndef EGL_KHR_reusable_sync
+ #define EGL_KHR_reusable_sync 1
+ #ifdef KHRONOS_SUPPORT_INT64
diff -Nru mesa-12.0.6/debian/patches/series mesa-17.0.7/debian/patches/series
--- mesa-12.0.6/debian/patches/series 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/patches/series 2017-06-26 12:58:29.000000000 +0000
@@ -1,9 +1,9 @@
07_gallium-fix-build-failure-on-powerpcspe.diff
-
-
-
# Ubuntu patches.
egl-platform-mir.patch
i915-dont-default-to-2.1.patch
+egl-platform-rs.patch
+vulkan-mir.patch
+khr_platform_mir.patch
diff -Nru mesa-12.0.6/debian/patches/vulkan-mir.patch mesa-17.0.7/debian/patches/vulkan-mir.patch
--- mesa-12.0.6/debian/patches/vulkan-mir.patch 1970-01-01 00:00:00.000000000 +0000
+++ mesa-17.0.7/debian/patches/vulkan-mir.patch 2017-06-26 12:58:29.000000000 +0000
@@ -0,0 +1,1065 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2164,6 +2164,7 @@ fi
+
+ AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$egl_platforms" | grep -q 'x11')
+ AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$egl_platforms" | grep -q 'wayland')
++AM_CONDITIONAL(HAVE_PLATFORM_RS, echo "$egl_platforms" | grep -q 'rs')
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
+ AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
+--- a/src/intel/vulkan/Makefile.am
++++ b/src/intel/vulkan/Makefile.am
+@@ -133,6 +133,17 @@ VULKAN_LIB_DEPS += \
+ $(WAYLAND_LIBS)
+ endif
+
++if HAVE_PLATFORM_RS
++AM_CPPFLAGS += \
++ $(RS_CFLAGS) \
++ -DVK_USE_PLATFORM_MIR_KHR
++
++VULKAN_SOURCES += $(VULKAN_WSI_MIR_FILES)
++
++VULKAN_LIB_DEPS += \
++ $(RS_LIBS)
++endif
++
+ noinst_LTLIBRARIES += libvulkan_common.la
+ libvulkan_common_la_SOURCES = $(VULKAN_SOURCES)
+
+--- a/src/intel/vulkan/Makefile.sources
++++ b/src/intel/vulkan/Makefile.sources
+@@ -51,6 +51,9 @@ VULKAN_WSI_WAYLAND_FILES := \
+ VULKAN_WSI_X11_FILES := \
+ anv_wsi_x11.c
+
++VULKAN_WSI_MIR_FILES := \
++ anv_wsi_mir.c
++
+ VULKAN_GEM_FILES := \
+ anv_gem.c
+
+--- a/src/intel/vulkan/anv_device.c
++++ b/src/intel/vulkan/anv_device.c
+@@ -253,6 +253,12 @@ static const VkExtensionProperties globa
+ .specVersion = 5,
+ },
+ #endif
++#ifdef VK_USE_PLATFORM_MIR_KHR
++ {
++ .extensionName = VK_KHR_MIR_SURFACE_EXTENSION_NAME,
++ .specVersion = 4,
++ },
++#endif
+ };
+
+ static const VkExtensionProperties device_extensions[] = {
+@@ -293,6 +299,69 @@ static const VkAllocationCallbacks defau
+ .pfnFree = default_free_func,
+ };
+
++static VkResult
++anv_bo_import_prime_fd(struct anv_bo *bo, struct anv_device *device, uint64_t size, int fd)
++{
++ bo->gem_handle = anv_gem_fd_to_handle(device, fd);
++ if (!bo->gem_handle)
++ return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY);
++
++ bo->map = NULL;
++ bo->index = 0;
++ bo->offset = 0;
++ bo->size = size;
++ bo->is_winsys_bo = false;
++
++ return VK_SUCCESS;
++}
++
++VkResult anv_ImportAllocatedMemory(
++ VkDevice _device,
++ int fd,
++ const VkMemoryAllocateInfo* pAllocateInfo,
++ const VkAllocationCallbacks* pAllocator,
++ VkDeviceMemory* pMem)
++{
++ ANV_FROM_HANDLE(anv_device, device, _device);
++ struct anv_device_memory *mem;
++ VkResult result;
++
++ assert(pAllocateInfo->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO);
++
++ if (pAllocateInfo->allocationSize == 0) {
++ /* Apparently, this is allowed */
++ *pMem = VK_NULL_HANDLE;
++ return VK_SUCCESS;
++ }
++
++ /* We support exactly one memory heap. */
++ assert(pAllocateInfo->memoryTypeIndex == 0 ||
++ (!device->info.has_llc && pAllocateInfo->memoryTypeIndex < 2));
++
++ mem = vk_alloc2(&device->alloc, pAllocator, sizeof(*mem), 8,
++ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
++ if (mem == NULL)
++ return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
++
++ /* The kernel is going to give us whole pages anyway */
++ uint64_t alloc_size = align_u64(pAllocateInfo->allocationSize, 4096);
++
++ result = anv_bo_import_prime_fd(&mem->bo, device, alloc_size, fd);
++ if (result != VK_SUCCESS)
++ goto fail;
++
++ mem->type_index = pAllocateInfo->memoryTypeIndex;
++
++ *pMem = anv_device_memory_to_handle(mem);
++
++ return VK_SUCCESS;
++
++fail:
++ vk_free2(&device->alloc, pAllocator, mem);
++
++ return result;
++}
++
+ VkResult anv_CreateInstance(
+ const VkInstanceCreateInfo* pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
+--- a/src/intel/vulkan/anv_private.h
++++ b/src/intel/vulkan/anv_private.h
+@@ -72,6 +72,13 @@ struct gen_l3_config;
+ extern "C" {
+ #endif
+
++VkResult anv_ImportAllocatedMemory(
++ VkDevice _device,
++ int fd,
++ const VkMemoryAllocateInfo* pAllocateInfo,
++ const VkAllocationCallbacks* pAllocator,
++ VkDeviceMemory* pMem);
++
+ /* Allowing different clear colors requires us to perform a depth resolve at
+ * the end of certain render passes. This is because while slow clears store
+ * the clear color in the HiZ buffer, fast clears (without a resolve) don't.
+--- a/src/intel/vulkan/anv_wsi.c
++++ b/src/intel/vulkan/anv_wsi.c
+@@ -54,12 +54,28 @@ anv_init_wsi(struct anv_physical_device
+ }
+ #endif
+
++#ifdef VK_USE_PLATFORM_MIR_KHR
++ result = wsi_mir_init_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
++ if (result != VK_SUCCESS) {
++#ifdef VK_USE_PLATFORM_WAYLAND_KHR
++ wsi_wl_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
++#endif
++#ifdef VK_USE_PLATFORM_XCB_KHR
++ wsi_x11_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
++#endif
++ return result;
++ }
++#endif
++
+ return VK_SUCCESS;
+ }
+
+ void
+ anv_finish_wsi(struct anv_physical_device *physical_device)
+ {
++#ifdef VK_USE_PLATFORM_MIR_KHR
++ wsi_mir_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
++#endif
+ #ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ wsi_wl_finish_wsi(&physical_device->wsi_device, &physical_device->instance->alloc);
+ #endif
+@@ -142,6 +158,7 @@ static VkResult
+ x11_anv_wsi_image_create(VkDevice device_h,
+ const VkSwapchainCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks* pAllocator,
++ bool import_fd,
+ VkImage *image_p,
+ VkDeviceMemory *memory_p,
+ uint32_t *size,
+@@ -186,6 +203,18 @@ x11_anv_wsi_image_create(VkDevice device
+
+ VkDeviceMemory memory_h;
+ struct anv_device_memory *memory;
++ if (import_fd) {
++ result = anv_ImportAllocatedMemory(anv_device_to_handle(device),
++ *fd_p,
++ &(VkMemoryAllocateInfo) {
++ .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
++ .allocationSize = image->size,
++ .memoryTypeIndex = 0,
++ },
++ pAllocator,
++ &memory_h);
++ }
++ else {
+ result = anv_AllocateMemory(anv_device_to_handle(device),
+ &(VkMemoryAllocateInfo) {
+ .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
+@@ -194,13 +223,21 @@ x11_anv_wsi_image_create(VkDevice device
+ },
+ NULL /* XXX: pAllocator */,
+ &memory_h);
++ }
+ if (result != VK_SUCCESS)
+ goto fail_create_image;
+
+ memory = anv_device_memory_from_handle(memory_h);
+- memory->bo.is_winsys_bo = true;
+
+- anv_BindImageMemory(device_h, image_h, memory_h, 0);
++ if (import_fd) {
++ // Do we need to do more of what anv_BindImageMemory() does here?
++ image->bo = &memory->bo;
++ image->offset = 0;
++ }
++ else {
++ memory->bo.is_winsys_bo = true;
++ anv_BindImageMemory(device_h, image_h, memory_h, 0);
++ }
+
+ struct anv_surface *surface = &image->color_surface;
+ assert(surface->isl.tiling == ISL_TILING_X);
+@@ -215,13 +252,18 @@ x11_anv_wsi_image_create(VkDevice device
+ goto fail_alloc_memory;
+ }
+
+- int fd = anv_gem_handle_to_fd(device, memory->bo.gem_handle);
+- if (fd == -1) {
+- /* FINISHME: Choose a better error. */
+- result = vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY,
+- "handle_to_fd failed: %m");
+- goto fail_alloc_memory;
++ int fd;
++ if (!import_fd) {
++ fd = anv_gem_handle_to_fd(device, memory->bo.gem_handle);
++ if (fd == -1) {
++ /* FINISHME: Choose a better error. */
++ result = vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY,
++ "handle_to_fd failed: %m");
++ goto fail_alloc_memory;
++ }
+ }
++ else
++ fd = *fd_p;
+
+ *image_p = image_h;
+ *memory_p = memory_h;
+@@ -240,12 +282,14 @@ fail_create_image:
+ static void
+ x11_anv_wsi_image_free(VkDevice device,
+ const VkAllocationCallbacks* pAllocator,
++ bool imported_fd,
+ VkImage image_h,
+ VkDeviceMemory memory_h)
+ {
+ anv_DestroyImage(device, image_h, pAllocator);
+
+- anv_FreeMemory(device, memory_h, pAllocator);
++ if (!imported_fd)
++ anv_FreeMemory(device, memory_h, pAllocator);
+ }
+
+ static const struct wsi_image_fns anv_wsi_image_fns = {
+--- /dev/null
++++ b/src/intel/vulkan/anv_wsi_mir.c
+@@ -0,0 +1,53 @@
++/*
++ * Copyright © 2017 Canonical Ltd.
++ *
++ * 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, sublicense,
++ * 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 NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS 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.
++ */
++
++#include "wsi_common_mir.h"
++#include "anv_private.h"
++
++VkBool32 anv_GetPhysicalDeviceMirPresentationSupportKHR(
++ VkPhysicalDevice physicalDevice,
++ uint32_t queueFamilyIndex,
++ MirConnection* connection)
++{
++ ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice);
++
++ return wsi_get_mir_presentation_support(&physical_device->wsi_device, connection);
++}
++
++VkResult anv_CreateMirSurfaceKHR(
++ VkInstance _instance,
++ const VkMirSurfaceCreateInfoKHR* pCreateInfo,
++ const VkAllocationCallbacks* pAllocator,
++ VkSurfaceKHR* pSurface)
++{
++ ANV_FROM_HANDLE(anv_instance, instance, _instance);
++ const VkAllocationCallbacks *alloc;
++ assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR);
++
++ if (pAllocator)
++ alloc = pAllocator;
++ else
++ alloc = &instance->alloc;
++
++ return wsi_create_mir_surface(alloc, pCreateInfo, pSurface);
++}
+--- a/src/vulkan/wsi/Makefile.am
++++ b/src/vulkan/wsi/Makefile.am
+@@ -46,4 +46,16 @@ VULKAN_LIB_DEPS += \
+ $(WAYLAND_LIBS)
+ endif
+
++if HAVE_PLATFORM_RS
++AM_CPPFLAGS += \
++ -I$(top_srcdir)/src/gbm/main \
++ $(RS_CFLAGS) \
++ -DVK_USE_PLATFORM_MIR_KHR
++
++VULKAN_WSI_SOURCES += $(VULKAN_WSI_MIR_FILES)
++
++VULKAN_LIB_DEPS += \
++ $(RS_LIBS)
++endif
++
+ libvulkan_wsi_la_SOURCES = $(VULKAN_WSI_SOURCES)
+--- a/src/vulkan/wsi/Makefile.sources
++++ b/src/vulkan/wsi/Makefile.sources
+@@ -9,4 +9,8 @@ VULKAN_WSI_WAYLAND_FILES := \
+
+ VULKAN_WSI_X11_FILES := \
+ wsi_common_x11.c \
+- wsi_common_x11.h
+\ No newline at end of file
++ wsi_common_x11.h
++
++VULKAN_WSI_MIR_FILES := \
++ wsi_common_mir.c \
++ wsi_common_mir.h
+--- a/src/vulkan/wsi/wsi_common.h
++++ b/src/vulkan/wsi/wsi_common.h
+@@ -35,6 +35,7 @@ struct wsi_image_fns {
+ VkResult (*create_wsi_image)(VkDevice device_h,
+ const VkSwapchainCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
++ bool import_fd,
+ VkImage *image_p,
+ VkDeviceMemory *memory_p,
+ uint32_t *size_p,
+@@ -43,6 +44,7 @@ struct wsi_image_fns {
+ int *fd_p);
+ void (*free_wsi_image)(VkDevice device,
+ const VkAllocationCallbacks *pAllocator,
++ bool imported_fd,
+ VkImage image_h,
+ VkDeviceMemory memory_h);
+ };
+@@ -147,6 +149,9 @@ VkResult wsi_wl_init_wsi(struct wsi_devi
+ const struct wsi_callbacks *cbs);
+ void wsi_wl_finish_wsi(struct wsi_device *wsi_device,
+ const VkAllocationCallbacks *alloc);
+-
++VkResult wsi_mir_init_wsi(struct wsi_device *wsi_device,
++ const VkAllocationCallbacks *alloc);
++void wsi_mir_finish_wsi(struct wsi_device *wsi_device,
++ const VkAllocationCallbacks *alloc);
+
+ #endif
+--- /dev/null
++++ b/src/vulkan/wsi/wsi_common_mir.c
+@@ -0,0 +1,583 @@
++/*
++ * Copyright © 2017 Canonical Ltd.
++ *
++ * 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, sublicense,
++ * 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 NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS 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.
++ */
++
++#include
++#include
++#include
++#include
++
++#include
++
++#include "wsi_common_mir.h"
++
++#define TRACE printf("%s()\n", __func__);
++
++#define typed_memcpy(dest, src, count) ({ \
++ STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
++ memcpy((dest), (src), (count) * sizeof(*(src))); \
++})
++
++struct wsi_mir {
++ struct wsi_interface base;
++
++// pthread_mutex_t mutex;
++ /* Hash table of MirConnection* -> wsi_mir_connection mappings */
++// struct hash_table *connections;
++};
++
++static const VkSurfaceFormatKHR formats[] = {
++ { .format = VK_FORMAT_B8G8R8A8_UNORM, },
++};
++
++static const VkPresentModeKHR present_modes[] = {
++ VK_PRESENT_MODE_FIFO_KHR,
++};
++
++struct wsi_mir_image {
++ VkImage image;
++ VkDeviceMemory memory;
++ MirBuffer* buffer;
++ bool busy;
++ pthread_mutex_t lock;
++ pthread_cond_t cv;
++};
++
++struct wsi_mir_swapchain {
++ struct wsi_swapchain base;
++
++ MirConnection *connection;
++ MirRenderSurface *surface;
++ MirPresentationChain *presentation_chain;
++
++ struct MirExtensionGbmBufferV1 const* gbm_buffer_ext;
++
++ VkExtent2D extent;
++ VkFormat vk_format;
++
++ VkPresentModeKHR present_mode;
++ bool fifo_ready;
++ pthread_mutex_t lock;
++ pthread_cond_t cv;
++
++ uint32_t image_count;
++ uint32_t next_image_to_use;
++ struct wsi_mir_image images[0];
++};
++
++static VkResult
++wsi_mir_surface_get_support(VkIcdSurfaceBase *surface,
++ struct wsi_device *wsi_device,
++ const VkAllocationCallbacks *alloc,
++ uint32_t queueFamilyIndex,
++ VkBool32* pSupported)
++{
++ TRACE
++
++ *pSupported = true;
++
++ return VK_SUCCESS;
++}
++
++static VkResult
++wsi_mir_surface_get_capabilities(VkIcdSurfaceBase *surface,
++ VkSurfaceCapabilitiesKHR *pSurfaceCapabilities)
++{
++ TRACE
++
++ pSurfaceCapabilities->minImageCount = 2;
++ pSurfaceCapabilities->maxImageCount = 0; // 0 to force to maximum supported
++ pSurfaceCapabilities->currentExtent = (VkExtent2D) { -1, -1 };
++ pSurfaceCapabilities->minImageExtent = (VkExtent2D) { 1, 1 };
++ pSurfaceCapabilities->maxImageExtent = (VkExtent2D) { INT16_MAX, INT16_MAX };
++ pSurfaceCapabilities->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
++ pSurfaceCapabilities->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
++ pSurfaceCapabilities->maxImageArrayLayers = 1;
++
++ pSurfaceCapabilities->supportedCompositeAlpha =
++ VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR /*|
++ VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR*/;
++
++ pSurfaceCapabilities->supportedUsageFlags =
++/* VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
++ VK_IMAGE_USAGE_SAMPLED_BIT |*/
++ VK_IMAGE_USAGE_TRANSFER_DST_BIT |
++ VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
++
++ return VK_SUCCESS;
++}
++
++static VkResult
++wsi_mir_surface_get_formats(VkIcdSurfaceBase *surface,
++ struct wsi_device *wsi_device,
++ uint32_t* pSurfaceFormatCount,
++ VkSurfaceFormatKHR* pSurfaceFormats)
++{
++ TRACE
++
++ if (pSurfaceFormats == NULL) {
++ *pSurfaceFormatCount = ARRAY_SIZE(formats);
++ return VK_SUCCESS;
++ }
++
++ *pSurfaceFormatCount = MIN2(*pSurfaceFormatCount, ARRAY_SIZE(formats));
++ typed_memcpy(pSurfaceFormats, formats, *pSurfaceFormatCount);
++
++ return *pSurfaceFormatCount < ARRAY_SIZE(formats) ?
++ VK_INCOMPLETE : VK_SUCCESS;
++}
++
++static VkResult
++wsi_mir_surface_get_present_modes(VkIcdSurfaceBase *surface,
++ uint32_t* pPresentModeCount,
++ VkPresentModeKHR* pPresentModes)
++{
++ TRACE
++
++ if (pPresentModes == NULL) {
++ *pPresentModeCount = ARRAY_SIZE(present_modes);
++ return VK_SUCCESS;
++ }
++
++ *pPresentModeCount = MIN2(*pPresentModeCount, ARRAY_SIZE(present_modes));
++ typed_memcpy(pPresentModes, present_modes, *pPresentModeCount);
++
++ return *pPresentModeCount < ARRAY_SIZE(present_modes) ?
++ VK_INCOMPLETE : VK_SUCCESS;
++}
++
++static VkResult
++wsi_mir_swapchain_destroy(struct wsi_swapchain *swapchain,
++ const VkAllocationCallbacks *pAllocator)
++{
++ TRACE
++ struct wsi_mir_swapchain *chain = (struct wsi_mir_swapchain *)swapchain;
++
++ for (uint32_t i = 0; i < chain->image_count; i++) {
++ if (chain->images[i].buffer)
++ {
++ chain->base.image_fns->free_wsi_image(chain->base.device,
++ pAllocator, true,
++ chain->images[i].image,
++ chain->images[i].memory);
++ mir_buffer_release(chain->images[i].buffer);
++ }
++ }
++
++ pthread_mutex_destroy(&chain->lock);
++ pthread_cond_destroy(&chain->cv);
++
++ vk_free(pAllocator, chain);
++
++ return VK_SUCCESS;
++}
++
++static VkResult
++wsi_mir_swapchain_get_images(struct wsi_swapchain *swapchain,
++ uint32_t *pCount, VkImage *pSwapchainImages)
++{
++ TRACE
++
++ struct wsi_mir_swapchain *chain = (struct wsi_mir_swapchain *)swapchain;
++ uint32_t ret_count;
++ VkResult result;
++
++ if (pSwapchainImages == NULL) {
++ *pCount = chain->image_count;
++ return VK_SUCCESS;
++ }
++
++ result = VK_SUCCESS;
++ ret_count = chain->image_count;
++ if (chain->image_count > *pCount) {
++ ret_count = *pCount;
++ result = VK_INCOMPLETE;
++ }
++
++ for (uint32_t i = 0; i < ret_count; i++)
++ pSwapchainImages[i] = chain->images[i].image;
++
++ return result;
++}
++
++static VkResult
++wsi_mir_swapchain_acquire_next_image(struct wsi_swapchain *swap_chain,
++ uint64_t timeout,
++ VkSemaphore semaphore,
++ uint32_t *image_index)
++{
++// TRACE
++ assert(semaphore == VK_NULL_HANDLE);
++ assert(timeout == UINT64_MAX);
++/*
++ printf("\tsemaphore is %snull\n",
++ (semaphore != VK_NULL_HANDLE) ? "non-" : "");
++
++ switch (timeout)
++ {
++ case 0:
++ printf("\tWill not block\n");
++ break;
++ case UINT64_MAX:
++ printf("\tWill block indefinitely\n");
++ break;
++ default:
++ printf("\tWill block %lu nsecs\n", timeout);
++ break;
++ }
++*/
++
++ struct wsi_mir_swapchain *chain = (struct wsi_mir_swapchain *)swap_chain;
++ uint32_t wrap = (chain->next_image_to_use-1)%(chain->image_count);
++ bool found = false;
++
++ do {
++ uint32_t const next_image = chain->next_image_to_use;
++ if (!chain->images[next_image].busy) {
++ found = true;
++ chain->images[next_image].busy = true;
++ *image_index = next_image;
++ }
++ else if (next_image == wrap) {
++ pthread_mutex_lock(&chain->lock);
++ pthread_cond_wait(&chain->cv, &chain->lock);
++ pthread_mutex_unlock(&chain->lock);
++ }
++
++ chain->next_image_to_use = (next_image+1)%(chain->image_count);
++ }
++ while(!found);
++
++ return VK_SUCCESS;
++}
++
++static void
++buffer_submit_callback(MirBuffer* buffer, void* context)
++{
++// TRACE
++ struct wsi_mir_swapchain* chain = (struct wsi_mir_swapchain*) context;
++
++ for (uint32_t i = 0; i < chain->image_count; i++)
++ if (chain->images[i].buffer == buffer) {
++ pthread_mutex_lock(&chain->lock);
++ chain->images[i].busy = false;
++ pthread_mutex_unlock(&chain->lock);
++ pthread_cond_broadcast(&chain->cv);
++ return;
++ }
++}
++
++static VkResult
++wsi_mir_swapchain_queue_present(struct wsi_swapchain *swap_chain,
++ uint32_t image_index)
++{
++// TRACE
++ struct wsi_mir_swapchain *chain = (struct wsi_mir_swapchain *)swap_chain;
++ assert(chain->present_mode == VK_PRESENT_MODE_FIFO_KHR);
++
++ mir_presentation_chain_submit_buffer(chain->presentation_chain,
++ chain->images[image_index].buffer,
++ buffer_submit_callback,
++ chain);
++
++/* printf("\tBuffer %d queued to server\n", image_index);*/
++ return VK_SUCCESS;
++}
++
++
++static void
++buffer_create_callback(MirBuffer* buffer, void* context)
++{
++ struct wsi_mir_image* image = (struct wsi_mir_image*)context;
++
++ printf("alloc'ed buffer\n");
++ pthread_mutex_lock(&image->lock);
++ image->buffer = buffer;
++ pthread_cond_broadcast(&image->cv);
++ pthread_mutex_unlock(&image->lock);
++}
++
++static VkResult
++wsi_mir_image_init(struct wsi_mir_swapchain *chain,
++ struct wsi_mir_image *mir_image,
++ const VkSwapchainCreateInfoKHR *pCreateInfo,
++ const VkAllocationCallbacks* pAllocator)
++{
++ TRACE
++
++ VkResult result;
++
++ pthread_cond_init(&mir_image->cv, NULL);
++ pthread_mutex_init(&mir_image->lock, NULL);
++
++ printf("to alloc buffer\n");
++ chain->gbm_buffer_ext->allocate_buffer_gbm(
++ chain->connection,
++ chain->extent.width,
++ chain->extent.height,
++ GBM_FORMAT_ARGB8888, // TODO: map the actual vk format
++ GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING,
++ buffer_create_callback,
++ mir_image);
++
++ pthread_mutex_lock(&mir_image->lock);
++ while(!mir_image->buffer)
++ pthread_cond_wait(&mir_image->cv, &mir_image->lock);
++ pthread_mutex_unlock(&mir_image->lock);
++
++ MirBufferPackage* mbp = mir_buffer_get_buffer_package(mir_image->buffer);
++/* DUMP_MirBufferPackage(mbp);
++*/
++ uint32_t size;
++ uint32_t row_pitch;
++ uint32_t offset;
++ VkDevice vk_device = chain->base.device;
++
++ printf("to wrap buffer\n");
++ result = chain->base.image_fns->create_wsi_image(vk_device,
++ pCreateInfo,
++ pAllocator,
++ true,
++ &mir_image->image,
++ &mir_image->memory,
++ &size,
++ &offset,
++ &row_pitch,
++ &mbp->fd[0]);
++
++ printf("wrapped buffer\n");
++ return result;
++}
++
++static VkResult
++wsi_mir_surface_create_swapchain(VkIcdSurfaceBase *surface,
++ VkDevice device,
++ struct wsi_device *wsi_device,
++ const VkSwapchainCreateInfoKHR* pCreateInfo,
++ const VkAllocationCallbacks* pAllocator,
++ const struct wsi_image_fns *image_fns,
++ struct wsi_swapchain **swapchain)
++{
++ TRACE
++
++ VkIcdSurfaceMir *mir_surface = (VkIcdSurfaceMir *)surface;
++ struct wsi_mir_swapchain *chain;
++ VkResult result;
++
++ assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR);
++
++ int num_images = pCreateInfo->minImageCount;
++
++ size_t size = sizeof(*chain) + num_images * sizeof(chain->images[0]);
++ chain = vk_alloc(pAllocator, size, 8,
++ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
++ if (chain == NULL)
++ return VK_ERROR_OUT_OF_HOST_MEMORY;
++
++ chain->base.device = device;
++ chain->base.destroy = wsi_mir_swapchain_destroy;
++ chain->base.get_images = wsi_mir_swapchain_get_images;
++ chain->base.acquire_next_image = wsi_mir_swapchain_acquire_next_image;
++ chain->base.queue_present = wsi_mir_swapchain_queue_present;
++ chain->base.image_fns = image_fns;
++ chain->base.present_mode = pCreateInfo->presentMode;
++ chain->connection = mir_surface->connection;
++ chain->surface = mir_surface->mirSurface;
++ chain->extent = pCreateInfo->imageExtent;
++ chain->vk_format = pCreateInfo->imageFormat;
++
++ chain->fifo_ready = true;
++
++ chain->image_count = num_images;
++ chain->next_image_to_use = 0;
++
++ /* Mark a bunch of stuff as NULL. This way we can just call
++ * destroy_swapchain for cleanup.
++ */
++ for (uint32_t i = 0; i < chain->image_count; i++)
++ chain->images[i].buffer = NULL;
++
++ int ret = pthread_mutex_init(&chain->lock, NULL);
++ if (ret != 0) {
++ if (ret == ENOMEM) {
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ } else {
++ /* FINISHME: Choose a better error. */
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ }
++
++ goto fail;
++ }
++
++ ret = pthread_cond_init(&chain->cv, NULL);
++ if (ret != 0) {
++ if (ret == ENOMEM) {
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ } else {
++ /* FINISHME: Choose a better error. */
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ }
++
++ goto fail_cv;
++ }
++
++ if (!mir_render_surface_is_valid(chain->surface))
++ {
++ result = VK_ERROR_INITIALIZATION_FAILED;
++ goto fail_lock;
++ }
++
++ chain->presentation_chain = mir_render_surface_get_presentation_chain(chain->surface);
++ if (!mir_presentation_chain_is_valid(chain->presentation_chain))
++ {
++ result = VK_ERROR_INITIALIZATION_FAILED;
++ goto fail_lock;
++ }
++
++ chain->gbm_buffer_ext = mir_extension_gbm_buffer_v1(chain->connection);
++ assert(chain->gbm_buffer_ext);
++ assert(chain->gbm_buffer_ext->allocate_buffer_gbm);
++
++ for (uint32_t i = 0; i < chain->image_count; i++) {
++ result = wsi_mir_image_init(chain, &chain->images[i],
++ pCreateInfo, pAllocator);
++ if (result != VK_SUCCESS)
++ goto fail_lock;
++ chain->images[i].busy = false;
++ }
++
++ *swapchain = &chain->base;
++
++ return VK_SUCCESS;
++
++fail_lock:
++ pthread_mutex_destroy(&chain->lock);
++fail_cv:
++ pthread_cond_destroy(&chain->cv);
++fail:
++ wsi_mir_swapchain_destroy(&chain->base, pAllocator);
++
++ return result;
++}
++
++VkBool32
++wsi_get_mir_presentation_support(struct wsi_device *wsi_device,
++ MirConnection *connection)
++{
++ TRACE
++
++ return mir_connection_is_valid(connection);
++}
++
++VkResult
++wsi_create_mir_surface(const VkAllocationCallbacks *pAllocator,
++ const VkMirSurfaceCreateInfoKHR *pCreateInfo,
++ VkSurfaceKHR *pSurface)
++{
++ TRACE
++
++ VkIcdSurfaceMir *surface;
++
++ surface = vk_alloc(pAllocator, sizeof *surface, 8,
++ VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
++ if (surface == NULL)
++ return VK_ERROR_OUT_OF_HOST_MEMORY;
++
++ surface->base.platform = VK_ICD_WSI_PLATFORM_MIR;
++ surface->connection = pCreateInfo->connection;
++ surface->mirSurface = pCreateInfo->mirSurface;
++
++ *pSurface = VkIcdSurfaceBase_to_handle(&surface->base);
++ return VK_SUCCESS;
++}
++
++VkResult
++wsi_mir_init_wsi(struct wsi_device *wsi_device,
++ const VkAllocationCallbacks *alloc)
++{
++ TRACE
++
++ struct wsi_mir *wsi;
++ VkResult result;
++
++ wsi = vk_alloc(alloc, sizeof(*wsi), 8,
++ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
++ if (!wsi) {
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ goto fail;
++ }
++
++#if 0
++ int ret = pthread_mutex_init(&wsi->mutex, NULL);
++ if (ret != 0) {
++ if (ret == ENOMEM) {
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ } else {
++ /* FINISHME: Choose a better error. */
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ }
++
++ goto fail_alloc;
++ }
++
++ wsi->connections = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
++ _mesa_key_pointer_equal);
++ if (!wsi->connections) {
++ result = VK_ERROR_OUT_OF_HOST_MEMORY;
++ goto fail_mutex;
++ }
++#endif
++ wsi->base.get_support = wsi_mir_surface_get_support;
++ wsi->base.get_capabilities = wsi_mir_surface_get_capabilities;
++ wsi->base.get_formats = wsi_mir_surface_get_formats;
++ wsi->base.get_present_modes = wsi_mir_surface_get_present_modes;
++ wsi->base.create_swapchain = wsi_mir_surface_create_swapchain;
++
++ wsi_device->wsi[VK_ICD_WSI_PLATFORM_MIR] = &wsi->base;
++
++ return VK_SUCCESS;
++
++#if 0
++fail_mutex:
++ pthread_mutex_destroy(&wsi->mutex);
++fail_alloc:
++ vk_free(alloc, wsi);
++#endif
++fail:
++ wsi_device->wsi[VK_ICD_WSI_PLATFORM_MIR] = NULL;
++
++ return result;
++}
++
++void
++wsi_mir_finish_wsi(struct wsi_device *wsi_device,
++ const VkAllocationCallbacks *alloc)
++{
++ TRACE
++ struct wsi_mir *wsi =
++ (struct wsi_mir*)wsi_device->wsi[VK_ICD_WSI_PLATFORM_MIR];
++
++ if (wsi) {
++ vk_free(alloc, wsi);
++ }
++ wsi_device->wsi[VK_ICD_WSI_PLATFORM_MIR] = NULL;
++}
+--- /dev/null
++++ b/src/vulkan/wsi/wsi_common_mir.h
+@@ -0,0 +1,37 @@
++/*
++ * Copyright © 2017 Canonical Ltd.
++ *
++ * 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, sublicense,
++ * 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 NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS 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 WSI_COMMON_MIR_H
++#define WSI_COMMON_MIR_H
++
++#include "wsi_common.h"
++
++VkBool32 wsi_get_mir_presentation_support(
++ struct wsi_device *wsi_device,
++ MirConnection *connection);
++
++VkResult wsi_create_mir_surface(
++ const VkAllocationCallbacks *pAllocator,
++ const VkMirSurfaceCreateInfoKHR *pCreateInfo,
++ VkSurfaceKHR *pSurface);
++
++#endif
+--- a/src/vulkan/wsi/wsi_common_wayland.c
++++ b/src/vulkan/wsi/wsi_common_wayland.c
+@@ -660,6 +660,7 @@ wsi_wl_image_init(struct wsi_wl_swapchai
+ result = chain->base.image_fns->create_wsi_image(vk_device,
+ pCreateInfo,
+ pAllocator,
++ false,
+ &image->image,
+ &image->memory,
+ &size,
+@@ -687,7 +688,7 @@ wsi_wl_image_init(struct wsi_wl_swapchai
+ return VK_SUCCESS;
+
+ fail_image:
+- chain->base.image_fns->free_wsi_image(vk_device, pAllocator,
++ chain->base.image_fns->free_wsi_image(vk_device, pAllocator, false,
+ image->image, image->memory);
+
+ return result;
+@@ -702,7 +703,7 @@ wsi_wl_swapchain_destroy(struct wsi_swap
+ for (uint32_t i = 0; i < chain->image_count; i++) {
+ if (chain->images[i].buffer) {
+ wl_buffer_destroy(chain->images[i].buffer);
+- chain->base.image_fns->free_wsi_image(chain->base.device, pAllocator,
++ chain->base.image_fns->free_wsi_image(chain->base.device, pAllocator, false,
+ chain->images[i].image,
+ chain->images[i].memory);
+ }
+--- a/src/vulkan/wsi/wsi_common_x11.c
++++ b/src/vulkan/wsi/wsi_common_x11.c
+@@ -853,6 +853,7 @@ x11_image_init(VkDevice device_h, struct
+ result = chain->base.image_fns->create_wsi_image(device_h,
+ pCreateInfo,
+ pAllocator,
++ false,
+ &image->image,
+ &image->memory,
+ &size,
+@@ -902,7 +903,7 @@ fail_pixmap:
+ cookie = xcb_free_pixmap(chain->conn, image->pixmap);
+ xcb_discard_reply(chain->conn, cookie.sequence);
+
+- chain->base.image_fns->free_wsi_image(device_h, pAllocator,
++ chain->base.image_fns->free_wsi_image(device_h, pAllocator, false,
+ image->image, image->memory);
+
+ return result;
+@@ -922,7 +923,7 @@ x11_image_finish(struct x11_swapchain *c
+ cookie = xcb_free_pixmap(chain->conn, image->pixmap);
+ xcb_discard_reply(chain->conn, cookie.sequence);
+
+- chain->base.image_fns->free_wsi_image(chain->base.device, pAllocator,
++ chain->base.image_fns->free_wsi_image(chain->base.device, pAllocator, false,
+ image->image, image->memory);
+ }
+
diff -Nru mesa-12.0.6/debian/rules mesa-17.0.7/debian/rules
--- mesa-12.0.6/debian/rules 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/rules 2017-06-26 12:58:29.000000000 +0000
@@ -8,22 +8,21 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
- confflags += --build=$(DEB_HOST_GNU_TYPE)
-else
- confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-endif
-ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
+ifeq (,$(filter $(DEB_HOST_ARCH), armhf ppc64el))
buildflags = \
- $(shell DEB_CFLAGS_MAINT_APPEND="-Wall -O2" DEB_CXXFLAGS_MAINT_APPEND="-Wall -O2" dpkg-buildflags --export=configure)
+ $(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_CXXFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure)
else
-# Workaround for a variant of LP: #725126
-buildflags = \
+ ifeq (,$(filter $(DEB_HOST_ARCH), armhf))
+ # Force -O2 on ppc64el
+ buildflags = \
+ $(shell DEB_CFLAGS_MAINT_APPEND="-Wall -O2" DEB_CXXFLAGS_MAINT_APPEND="-Wall -O2" dpkg-buildflags --export=configure)
+ else
+ # Workaround for a variant of LP: #725126
+ buildflags = \
$(shell DEB_CFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" DEB_CXXFLAGS_MAINT_APPEND="-Wall -fno-optimize-sibling-calls" dpkg-buildflags --export=configure)
+ endif
endif
# keep a list of files we don't install (yet), but since it's a bit
@@ -33,13 +32,14 @@
DRI_DRIVERS =
GALLIUM_DRIVERS =
VULKAN_DRIVERS =
-EGL_DISPLAYS = x11
+EGL_PLATFORMS = x11
confflags_DRI3 = --disable-dri3
# hurd doesn't do direct rendering
ifeq ($(DEB_HOST_ARCH_OS), hurd)
confflags_DIRECT_RENDERING = --disable-driglx-direct
+ confflags_GBM = --disable-gbm
DRI_DRIVERS = swrast
else
ifeq ($(DEB_HOST_ARCH_OS), linux)
@@ -57,14 +57,19 @@
GALLIUM_DRIVERS += vc4
endif
+ # etnaviv kernel support is currently only available on armhf
+ ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
+ GALLIUM_DRIVERS += etnaviv imx
+ endif
+
# svga needs xa state tracker
confflags_GALLIUM += --enable-xa
# Non-Linux ports also lack *_CLOEXEC and epoll, so wayland isn't ready yet:
- EGL_DISPLAYS += wayland
+ EGL_PLATFORMS += wayland
# Likewise, Mir makes no attempt to be portable to random kernels.
- EGL_DISPLAYS += mir
-
+ EGL_PLATFORMS += mir
+ EGL_PLATFORMS += rs
ifeq (,$(filter $(DEB_HOST_ARCH), s390 s390x))
DRI_DRIVERS += nouveau
endif
@@ -73,7 +78,7 @@
endif
endif
- EGL_DISPLAYS += drm
+ EGL_PLATFORMS += drm
# Build intel drivers on archs where libdrm-intel is installed
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386 x32))
@@ -84,30 +89,42 @@
DRI_DRIVERS += r200 radeon
GALLIUM_DRIVERS += r600 r300
endif
- ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 arm64 armhf))
- # opencl needs gallium-pipe-loader which needs udev,
- # so no opencl on kfreebsd.
- # opencl needs LLVM and Clang, so only build it on the subset
- # of arches where we have LLVM enabled.
- confflags_GALLIUM += --enable-opencl --enable-opencl-icd
- endif
- # LLVM is required for r300g, radeonsi and llvmpipe:
- ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386 arm64 armhf ppc64el))
+ # LLVM is required for building r300g, radeonsi and llvmpipe drivers.
+ # It's also required for building OpenCL support.
+ ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el))
GALLIUM_DRIVERS += radeonsi
confflags_GALLIUM += --enable-gallium-llvm
- confflags_GALLIUM += ac_cv_path_LLVM_CONFIG=llvm-config-3.8
+ confflags_GALLIUM += --enable-opencl --enable-opencl-icd
+ confflags_GALLIUM += ac_cv_path_LLVM_CONFIG=llvm-config-4.0
GALLIUM_DRIVERS += swrast
else
DRI_DRIVERS += swrast
+ confflags_GALLIUM += --disable-gallium-llvm
+ endif
+
+ # radv needs LLVM and the Vulkan loader, so only build on the subset of
+ # arches where we have LLVM enabled and where the Vulkan loader is built.
+ ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64 sparc64 ppc64el))
+ VULKAN_DRIVERS += radeon
endif
+
confflags_DIRECT_RENDERING = --enable-driglx-direct
+ confflags_GBM = --enable-gbm
confflags_GALLIUM += --enable-vdpau
confflags_GALLIUM += --enable-va
+ confflags_GALLIUM += --enable-gallium-extra-hud
+ confflags_GALLIUM += --enable-lmsensors
+endif
+
+# Disable assembly usage on x32 otherwise Mesa defaults to x86_64 assembly
+# which doesn't work on x32 (see #758094)
+ifneq (,$(filter $(DEB_HOST_ARCH), x32))
+ confflags += --disable-asm
endif
-confflags_EGL = --with-egl-platforms="$(EGL_DISPLAYS)"
-confflags_GLES = --enable-gles1 --enable-gles2
+confflags_EGL = --with-egl-platforms="$(EGL_PLATFORMS)"
+confflags_GLES = --disable-gles1 --enable-gles2
confflags_GALLIUM += --with-gallium-drivers="$(GALLIUM_DRIVERS)"
confflags += \
@@ -123,6 +140,7 @@
--disable-xvmc \
--disable-omx \
$(confflags_DIRECT_RENDERING) \
+ $(confflags_GBM) \
$(confflags_DRI3) \
$(confflags_EGL) \
$(confflags_GALLIUM) \
@@ -145,7 +163,6 @@
override_dh_auto_configure:
dh_auto_configure -- \
- --disable-silent-rules \
$(confflags)
override_dh_auto_install:
@@ -180,11 +197,9 @@
# Remove vulkan headers only where they get installed in tmp
# We ship those headers via src:vulkan / libvulkan-dev
- ifeq ($(DEB_HOST_ARCH_OS), linux)
- ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32))
- set -e; for file in vk_platform.h vulkan.h vulkan_intel.h; do rm debian/tmp/usr/include/vulkan/$$file; done
+ ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32))
+ rm debian/tmp/usr/include/vulkan/vulkan_intel.h
rmdir debian/tmp/usr/include/vulkan
- endif
endif
ifneq ($(DEB_HOST_ARCH_OS), hurd)
diff -Nru mesa-12.0.6/debian/source/format mesa-17.0.7/debian/source/format
--- mesa-12.0.6/debian/source/format 1970-01-01 00:00:00.000000000 +0000
+++ mesa-17.0.7/debian/source/format 2017-06-26 12:58:29.000000000 +0000
@@ -0,0 +1 @@
+1.0
diff -Nru mesa-12.0.6/debian/upstream/signing-key.asc mesa-17.0.7/debian/upstream/signing-key.asc
--- mesa-12.0.6/debian/upstream/signing-key.asc 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/upstream/signing-key.asc 2017-06-26 12:58:29.000000000 +0000
@@ -616,3 +616,79 @@
T0rEAQLWU7eq9U6nd4BXMkokiuzlOKWqsDyXibR3wkhI80kAJw==
=XSpT
-----END PGP PUBLIC KEY BLOCK-----
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFc/b7YBEACkr2uZ+LcW7s8C/TxeyPpk6HFCoNkRvPbEzuDYuNZIIvN4tfxq
+i+lyng5P4w6beEi0Us2au43KYXnibIkde/rrhVCnrUQQqG32oHLbTky+gRvJJ+kq
+yheoh1UVjs8v5eGSNYshbIjwivMXLWxlay8G4AGmauFwMJx876ANcBCydeYvuEel
+BY8GFdkbjIdd4hqXNEy4SNlf5wzCIZDK8B4v/sAXa/HUO0HCE4Ebq7lPSxtUdKzX
+2bf19HgA6Y6btkMEA7NoKPoCiKPueznGvi2YY3w7Os/IYwnCfG3Q3TCEZhtT/MFY
+/aVD/VyjyrwJRreOfqkUZbeVE7MGlXojRw/Pf/Mb+vqHkpk/x5fwPlHNhf2EtuaD
+wdekUI/TYchlS42GdcdxP3n3jXxbWYhJZlCtK7tKK53iiyIkv2OnRfKt/OMczg6X
+/qSiV72OwJgy+opn+lyp0HcyzphUHbm5fyd6mu5z5GUUyPJYPb9Bq2iaIXr157ci
+0SqzV8Z+ToAPoWlDScPDZBIgON2tyCXV1dV/XP+8NNHXbVBFXcKw3czhaK3dYYnQ
+Tgt83/kQpulPO4xflQDVK3S74wVhoIoPYz83UcOYAJ2XLIKVzq2aViNPrJ+BgHfz
+hGzeokza8H6L5LcW0qXFC4j16C95cWbM7RO/fsWsRe4y0S68O0UKFPIXcwARAQAB
+tB9BbmRyZXMgR29tZXogPHRhbnR5MEBnbWFpbC5jb20+iQI3BBMBCAAhBQJXP2+2
+AhsDBQsJCAcCBhUICQoLAgQWAgMBAh4BAheAAAoJENlhxZanIDRWi8IP/ReArS+k
+OCgw22qjcrsCEqCeYynaoAqJ+TQ3q1tN1x50ywZreI7tzKkgx+AHobvINSjzF/6J
+oayJfWyL+vkwYiXtwJyHSBGPmOgPWlmESk+/GzIPYyvts+Pg2zLsKAymYVCvFcZv
+3eurQ9xhLsmtos59cNDS7BixtHq+HlJ5bQb976MbL5NL5UcBAHwfLr0qtRxQNOH6
+xAk7HK/S1d+2KS7LOfKh2vHDwJIJ4RSI0v7w/VBvV5w9o6iAWDIJM8a8+yn+kQsE
+NrhG7RsEiNTvYrLO+Yj2p568ndekMWrkBRP2eRnpDv/11qExn1oOHr92Q0pRFtGE
+1VdQ0HNHxB0edTRizUYt7m1OCRgXdhcDkDOtpv0L56iF+fM/dsbYw+RYhj4KDte7
+1PR0jBvaAHKfTqUSXWoLVFI4wCqWtLPC7bj1ltZoUs+9xfFwJ3O3/cYHcwUIiOhE
+AWHhriH2BkHrJsM1fXIBPuAuZ3TEysX+RWQ3OEDvdY6+WtgNMoPW4lXbyItkFubA
+9O/nC5ZBqbtTC3HZXfdOQJ2ZQcd/N91gjiIIZPDieNb9Lf6BA0/XkDA98S5VLuFa
+NWyrWHVxFBMZaIbijNUhPFUiY+x8Nbl7CNUrLm5dR6VIitpGzE+gjw5fPVbitNZo
+KjSRTcLfyQoRReLM81jZlAEGmvSO0SEPIdNstB9BbmRyZXMgR29tZXogPHRhbnR5
+QGlnYWxpYS5jb20+iQJOBBMBCAA4FiEElG0JteTJhF5jB1/x2WHFlqcgNFYFAljR
+HJQCGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQ2WHFlqcgNFbvnhAAopLt
+WyWc1jmEZNgKbpp/dww5UDpAPZTKLvy1kwoWPQOnMABzAb14lbc0YJ7PUHqw8TSI
+lS9jHS+43HIVl7fHCnTIQtg6+mjOyBI8il92AFuklC/Q+hg/G4RVf3uCIX5TlkPN
+2yx/KanfQ9fsTZfmqAN/GI6jy2ObgbqJoeF14Njaiw2Dkmkiqvkv+GpmWe4K81GK
+DUUFI+Ck+fu3EWHEe7rSN3tjRnYnbshHkLn7uwR9FbkGqZC+wRDynxoVF314IbGJ
+yTrCh1KnTJzLEM+HF5Dcn64ykPhUXohzjFJoQJ/nuQlzgTWy1ZyniPhbE4g2qG6/
+UVWpRm+4ZhGUKSr6+ekIRlN7fvUtwRsFo0fBgLtbgYNSFFxVe4tFwaYxEwraffqp
+p1XO3kGCfVPhbvHDWuSgu3jk5bixBjgNSx7U8o/iW/alZLqq9aUlRByq7qdxyuhI
+UBvZP6pyghW6WhY0GRc5/n5/c77KpYkOA0oETxfwmA14MroqhuS1rd4vZAlsXaFZ
+142GH/r/hx9YwoAEviBiJ8G2xdErjKWvxRtvS+GridOdvQ0JIg1WWrV7zj8ytxc4
+40P2Z65krhSPV5rzCnbkfa3ASk/BnqfKCHKUifLNzP9c/oYiOLdYrLD+Ns5B56OE
+cn0hDFtJ3kCmFXu/kXqJYGd6J0Rm6nqQu1ziSg20IEFuZHJlcyBHb21leiA8YWdv
+bWV6QGlnYWxpYS5jb20+iQI3BBMBCAAhBQJXP3PRAhsDBQsJCAcCBhUICQoLAgQW
+AgMBAh4BAheAAAoJENlhxZanIDRW70YP/jE/YqOzv1/ioqwF4+5MP3KfCwlxAt3W
+1ed6OXCZcHUPFsobY8TgcTc4K3mw7LGG7wSg08OOg9yapE4DFjrSzPaaow3sM2+G
+o+g2xKrq52NUsmrJladrkdbNuIRUYS2VarkDjwX5B+v8eZk0DO1h1iD68jp6z0qz
+942FEUnCuANmHfpK/R/dvUchHwuZGYfB7DcqcH6etVzCDNDD0bsHY3s/Qea9xjDs
+EXgCymyFXgqTLk9876LRC748X0RUk2Xse9s5nRq2eCJ6Twp2uL7VA7b4Kbk9mzh3
+Gu5fre4pVA/zfBaA211tLJTdTfBp2acWsjUH+9k+SoRrYY4513UnVtR+pNpT7vGM
+cD42WqC7qUFaenTZIySp0FFxx9q3Y6WeCYvWALNbeZiVjAc7mcuRUfUUiYK8ahp7
+MJz7t9d5MzMGu4WQ1BqEKxpZdulWA2oiS2wOPD7x9a5DtpElDZ3vHPvCqIrKIkTH
++k5sKOHbOZXCZFCp4bZzIhq0vnYWHls0D86OJ86oMRHj+YHJ60N7KG4qzhI78mSJ
+AH8ZiFIgvcolXml2G2VQfzdS8SpErl4797Lzk8SXysvUtdoQEFXVqoUkLSkQBCaL
+EZ5dOLT3q4Bf2hudQ2cC6BtvOMGimoXNgSCFFZKfypqH7eB+GZU23xNQxI3oq7Wr
+tjKlCz0gQ884uQINBFc/b7YBEADKASZJp8uZbAvlcU7v1Vifqoi5wmD44S6hCyIr
+nulbdI+RKeqELTQ0ruvje6W7GwMcJRNWx836TiH7V5IxBgXCn4IN/nzqZpBAVC/8
+q9Ni688zOATZ040XOFyg9wAuaH/Cwo85CiH7W5+Eufusjs8WIc0N5tvnB53UbrqB
+GRHAUUuaKnxecefgm+DEkTA0jCbHV35qPzKdm2g/bn1xanpe0nxTPLOB00IzPD45
+rWBeuBoP13LEOhqOsvCkysl0iFdqhrxwEO6nTZSBPY8MU1XHYVJHZpSBYF16QrNa
+x4/IJQMDwdvzMWS64YBwqkK0XSrkg94yackNSMNduRz9kLTFLlWGeIFh/ff0Womd
+3crrhNsrjEUh0mLqvs0fXq+i0GiMVV8/7cIg06aYeck9A0cMIUnVyYiPfXzietAM
+6sP2UoDZlXAXTh3l7iN0UC79S+Bik30G5DGsk2O4nAT/EDJ0TWm8s3N+A8tf669Z
+Wy4npfR6+9y3tGAAlYzU8e+tZCrRfXKJgDTAcc+sC0qUS5McIFZ243QVvWYVDRhb
+e5ePOAsDhuaZdadKkBX4AsVScpsCQcQD/3J0CquPxVtgsFglmJfHc9olvgCI5HSc
+Lpl6pQn9/5udtz5VBNShROmvKCz60PE6chLLNdWOdWrx+RaSu09g/5Nc6Wl+gmFe
+Na39ywARAQABiQIfBBgBCAAJBQJXP2+2AhsMAAoJENlhxZanIDRWSmQP/17dBjiQ
+kLy0haS5NQJrzDFCMlqbDrM9IGjuzy8oS4IVgowCERYjA0yKQ8WAxV+yUVelvSqg
+hWBZwWX6yHWRgqw8RQT5/8j1D96IvM1k+fPbC5fBja3cptPB+fuW7YIWZIPvhDRn
+tfFMnhEKvIjmwd7DUJn4mU9DNzSQSPadpSUsFkgX2IVi5MUvd93DIUeU2IcrpAd3
+VDDGY3gUW9EOIUpgMSeAIoojnsdZS8TeHbEznviZmOFHAQ3HUrxQUIjYbkdEUKLT
+z5RPejFKSkdxVtXAvqExOMtrnT9PkX2Dw5nP2O3escfPvZaNoDIKTlUwiublA80k
+QyaCEbBkKOqU/YzvbqoSBhapo8yp3CU93pWWIF9YPHofprD/krml5UES2eVhqYEJ
+7tVbwZNaszXX2j9I3uaZe1tlc/sT5lZ/sJ0kIVJ84VikTmz4LEqYHwRFV+62p3Be
+CG33g/9wCeN9QkxWHWeUSAtT/r7tjW+mQdLON41w4Q7zwtYhSmxjGyo2PP0vpR79
+oYQ8CDPreyTxWFJuOsqu8NbGhlj/B3TEzl3+0XQQlAfejerN9olT+KlOjssKzrvF
+OLtkGL9E+0n7qvCcp0yjw5d3DdCrCnhHtsGCJyMpRJVkNdpRyAEk17Sbt8g36TSV
+yc3LzJA+b6/cPamySsetyO6jSkApaLbAOl99
+=FK/k
+-----END PGP PUBLIC KEY BLOCK-----
diff -Nru mesa-12.0.6/debian/watch mesa-17.0.7/debian/watch
--- mesa-12.0.6/debian/watch 2017-06-26 12:58:28.000000000 +0000
+++ mesa-17.0.7/debian/watch 2017-06-26 12:58:29.000000000 +0000
@@ -1,4 +1,4 @@
#git=git://anongit.freedesktop.org/mesa/mesa
version=3
opts="uversionmangle=s/-rc/~rc/,dversionmangle=s/\+repack//,pgpsigurlmangle=s/$/.sig/,pasv" \
-https://mesa.freedesktop.org/archive/([\d\.]*)/ mesa-(.*)\.tar\.gz
+https://mesa.freedesktop.org/archive/mesa-(.*)\.tar\.gz
diff -Nru mesa-12.0.6/docs/autoconf.html mesa-17.0.7/docs/autoconf.html
--- mesa-12.0.6/docs/autoconf.html 2017-01-24 01:41:27.000000000 +0000
+++ mesa-17.0.7/docs/autoconf.html 2017-06-01 10:37:10.000000000 +0000
@@ -55,7 +55,7 @@
-This will produce libGL.so and several other libraries depending on the
+This will produce libGL.so and/or several other libraries depending on the
options you have chosen. Later, if you want to rebuild for a different
configuration run make realclean before rebuilding.
@@ -133,9 +133,11 @@
--enable-debug
-This option will enable compiler
-options and macros to aid in debugging the Mesa libraries.
-
+This option will set the compiler debug/optimisation levels (if the user
+hasn't already set them via the CFLAGS/CXXFLAGS) and macros to aid in
+debugging the Mesa libraries.
+
+Note that enabling this option can lead to noticable loss of performance.
--disable-asm
There are assembly routines
@@ -174,27 +176,22 @@
-2. Driver Options
+2. GL Driver Options
There are several different driver modes that Mesa can use. These are
described in more detail in the basic
installation instructions. The Mesa driver is controlled through the
-configure options --enable-xlib-glx, --enable-osmesa,
-and --enable-dri.
+configure options --enable-glx and --enable-osmesa
Xlib
It uses Xlib as a software renderer to do all rendering. It corresponds
-to the option --enable-xlib-glx. The libX11 and libXext
-libraries, as well as the X11 development headers, will be need to
-support the Xlib driver.
+to the option --enable-glx=xlib or --enable-glx=gallium-xlib.
DRI
This mode uses the DRI hardware drivers for
-accelerated OpenGL rendering. Enable the DRI drivers with the option
---enable-dri. See the basic
-installation instructions for details on prerequisites for the DRI
-drivers.
+accelerated OpenGL rendering. To enable use --enable-glx=dri
+--enable-dri.
@@ -252,10 +249,8 @@
3. Library Options
-The configure script provides more fine grained control over the GL
-libraries that will be built. More details on the specific GL libraries
-can be found in the basic installation
-instructions.
+The configure script provides more fine grained control over the libraries
+that will be built.
+
+
+
+
+
+
+
Coding Style
+
+
+Mesa is over 20 years old and the coding style has evolved over time.
+Some old parts use a style that's a bit out of date.
+
+Different sections of mesa can use different coding style as set in the local
+EditorConfig (.editorconfig) and/or Emacs (.dir-locals.el) file.
+
+Alternatively the following is applicable.
+
+If the guidelines below don't cover something, try following the format of
+existing, neighboring code.
+
+
+
+Basic formatting guidelines
+
+
+
+- 3-space indentation, no tabs.
+
- Limit lines to 78 or fewer characters. The idea is to prevent line
+wrapping in 80-column editors and terminals. There are exceptions, such
+as if you're defining a large, static table of information.
+
- Opening braces go on the same line as the if/for/while statement.
+For example:
+
+ if (condition) {
+ foo;
+ } else {
+ bar;
+ }
+
+
+ - Put a space before/after operators. For example, a = b + c;
+and not a=b+c;
+
+
- This GNU indent command generally does the right thing for formatting:
+
+ indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
+
+
+ - Use comments wherever you think it would be helpful for other developers.
+Several specific cases and style examples follow. Note that we roughly
+follow Doxygen conventions.
+
+
+Single-line comments:
+
+ /* null-out pointer to prevent dangling reference below */
+ bufferObj = NULL;
+
+Or,
+
+ bufferObj = NULL; /* prevent dangling reference below */
+
+Multi-line comment:
+
+ /* If this is a new buffer object id, or one which was generated but
+ * never used before, allocate a buffer object now.
+ */
+
+We try to quote the OpenGL specification where prudent:
+
+ /* Page 38 of the PDF of the OpenGL ES 3.0 spec says:
+ *
+ * "An INVALID_OPERATION error is generated for any of the following
+ * conditions:
+ *
+ * * is zero."
+ *
+ * Additionally, page 94 of the PDF of the OpenGL 4.5 core spec
+ * (30.10.2014) also says this, so it's no longer allowed for desktop GL,
+ * either.
+ */
+
+Function comment example:
+
+ /**
+ * Create and initialize a new buffer object. Called via the
+ * ctx->Driver.CreateObject() driver callback function.
+ * \param name integer name of the object
+ * \param type one of GL_FOO, GL_BAR, etc.
+ * \return pointer to new object or NULL if error
+ */
+ struct gl_object *
+ _mesa_create_object(GLuint name, GLenum type)
+ {
+ /* function body */
+ }
+
+
+ - Put the function return type and qualifiers on one line and the function
+name and parameters on the next, as seen above. This makes it easy to use
+
grep ^function_name dir/* to find function definitions. Also,
+the opening brace goes on the next line by itself (see above.)
+
+ - Function names follow various conventions depending on the type of function:
+
+ glFooBar() - a public GL entry point (in glapi_dispatch.c)
+ _mesa_FooBar() - the internal immediate mode function
+ save_FooBar() - retained mode (display list) function in dlist.c
+ foo_bar() - a static (private) function
+ _mesa_foo_bar() - an internal non-static Mesa function
+
+
+ - Constants, macros and enumerant names are ALL_UPPERCASE, with _ between
+words.
+
- Mesa usually uses camel case for local variables (Ex: "localVarname")
+while gallium typically uses underscores (Ex: "local_var_name").
+
- Global variables are almost never used because Mesa should be thread-safe.
+
+
- Booleans. Places that are not directly visible to the GL API
+should prefer the use of bool, true, and
+false over GLboolean, GL_TRUE, and
+GL_FALSE. In C code, this may mean that
+#include <stdbool.h> needs to be added. The
+try_emit_* methods in src/mesa/program/ir_to_mesa.cpp and
+src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
+
+
+
+
+
+
diff -Nru mesa-12.0.6/docs/codingstyle.html mesa-17.0.7/docs/codingstyle.html
--- mesa-12.0.6/docs/codingstyle.html 1970-01-01 00:00:00.000000000 +0000
+++ mesa-17.0.7/docs/codingstyle.html 2017-06-01 10:37:10.000000000 +0000
@@ -0,0 +1,142 @@
+
+
+