aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMatthew Rezny <rezny@FreeBSD.org>2017-06-18 14:02:35 +0000
committerMatthew Rezny <rezny@FreeBSD.org>2017-06-18 14:02:35 +0000
commitf4b4c28f25ac56ad7f30c37a7700a6a4560953b1 (patch)
tree3685084049be8e9c7a8902481eb3b68ddb2cb2b0 /graphics
parent88fe7a80fb7aa4966add4e8d042ca1eb047ba817 (diff)
downloadports-f4b4c28f25ac56ad7f30c37a7700a6a4560953b1.tar.gz
ports-f4b4c28f25ac56ad7f30c37a7700a6a4560953b1.zip
Update the Mesa ports to 17.1.2
- patch the Intel driver to re-enable hardware acceleration on 10.x [1] Reported by: cpm [1] Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D11148
Notes
Notes: svn path=/head/; revision=443828
Diffstat (limited to 'graphics')
-rw-r--r--graphics/libosmesa/Makefile6
-rw-r--r--graphics/mesa-dri/Makefile12
-rw-r--r--graphics/mesa-dri/Makefile.common2
-rw-r--r--graphics/mesa-dri/Makefile.targets10
-rw-r--r--graphics/mesa-dri/distinfo6
-rw-r--r--graphics/mesa-dri/files/configure.ac9
-rw-r--r--graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c37
-rw-r--r--graphics/mesa-dri/files/patch-configure9
8 files changed, 62 insertions, 29 deletions
diff --git a/graphics/libosmesa/Makefile b/graphics/libosmesa/Makefile
index de324b088a60..c3d9cd79cdda 100644
--- a/graphics/libosmesa/Makefile
+++ b/graphics/libosmesa/Makefile
@@ -9,6 +9,12 @@ COMMENT= Off-Screen Mesa implementation of the OpenGL API
USE_XORG= glproto
+# As of version 17.0.5 / 17.1.2, the Gallium variant fails to build due to
+# incorrectly ordered linker flags. Fortunately, autoreconf fixes the problem.
+# Unfortunately, we must reconf before we know if we're doing a Gallium build.
+USES= autoreconf
+EXTRA_PATCHES= ${PATCHDIR}/configure.ac
+
.include <bsd.port.options.mk>
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile
index 4f16ca6253fc..beca61bc9461 100644
--- a/graphics/mesa-dri/Makefile
+++ b/graphics/mesa-dri/Makefile
@@ -42,19 +42,21 @@ GALLIUM_DRIVERS= ""
|| ${ARCH} == powerpc || ${ARCH} == powerpc64
DRI_DRIVERS+= RADEON R200
GALLIUM_DRIVERS+= R300 R600
-.if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base
+. if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base
GALLIUM_DRIVERS+= RADEONSI
-.endif
+. endif
.endif
.if ${ARCH} == amd64 || ${ARCH} == i386
DRI_DRIVERS+= I915 I965
GALLIUM_DRIVERS+= SVGA
+. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000
+EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
+. endif
.elif ${ARCH} == armv6 || ${ARCH} == aarch64
GALLIUM_DRIVERS+= FREEDRENO VC4
-.endif
-
-.if ${ARCH} == armv6
+. if ${ARCH} == armv6
EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_drivers_vc4_Makefile.in
+. endif
.endif
CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \
diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index a7e7ef53303c..eb4b6b0e0214 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -14,7 +14,7 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
-MESABASEVERSION= 17.1.1
+MESABASEVERSION= 17.1.2
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
diff --git a/graphics/mesa-dri/Makefile.targets b/graphics/mesa-dri/Makefile.targets
index ef92d271891e..fcf2ea9b9c9f 100644
--- a/graphics/mesa-dri/Makefile.targets
+++ b/graphics/mesa-dri/Makefile.targets
@@ -5,13 +5,19 @@
post-patch:
.if ${OPSYS} == FreeBSD
@${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure
+. if ${COMPONENT} == osmesa
+ @${REINPLACE_CMD} -e 's|x86_64|amd64|' ${WRKSRC}/configure.ac
+. endif
# Disable use of GCC_ATOMICs on i386 to avoid build failures
# Clang in 10.3 fails with cannot compile this atomic library call yet 'p_atomic_add'
# Clang in 11.0 fails with undefined reference to `__atomic_fetch_add_8`
-.if ${ARCH} == "i386"
+. if ${ARCH} == "i386"
@${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure
+. if ${COMPONENT} == osmesa
+ @${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure.ac
+. endif
+. endif
.endif
-.endif # ${OPSYS}
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
diff --git a/graphics/mesa-dri/distinfo b/graphics/mesa-dri/distinfo
index af98d6f0eba6..de90dce7b059 100644
--- a/graphics/mesa-dri/distinfo
+++ b/graphics/mesa-dri/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1495896958
-SHA256 (mesa-17.1.1.tar.xz) = aed503f94c0c1630a162a3e276f4ee12a86764cee4cb92338ea2dea99a04e7ef
-SIZE (mesa-17.1.1.tar.xz) = 9854480
+TIMESTAMP = 1496724371
+SHA256 (mesa-17.1.2.tar.xz) = 0937804f43746339b1f9540d8f9c8b4a1bb3d3eec0e4020eac283b8799798239
+SIZE (mesa-17.1.2.tar.xz) = 9837516
diff --git a/graphics/mesa-dri/files/configure.ac b/graphics/mesa-dri/files/configure.ac
index 1fdf8ec86794..44577f288558 100644
--- a/graphics/mesa-dri/files/configure.ac
+++ b/graphics/mesa-dri/files/configure.ac
@@ -9,15 +9,6 @@
dri3_default=yes
;;
*)
-@@ -1631,7 +1631,7 @@ dnl platform checks. Set DEFINES and LIB
- if test "x$enable_dri" = xyes; then
- # Platform specific settings and drivers to build
- case "$host_os" in
-- linux*)
-+ linux* | freebsd*)
- if test "x$enable_dri3" = xyes; then
- DEFINES="$DEFINES -DHAVE_DRI3"
- fi
@@ -2002,9 +2002,18 @@ if test "x$enable_opencl" = xyes; then
AC_MSG_ERROR([cannot enable OpenCL without Gallium])
fi
diff --git a/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c b/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c
new file mode 100644
index 000000000000..704aad20f611
--- /dev/null
+++ b/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c
@@ -0,0 +1,37 @@
+# Partial revert of the following commit because the feature check fails on 10.x
+# which disables HW accel on gen4+ (the new check occurs for gen6+ as well)
+
+From 088449487ebcb72561d73ffb91c96302583445a8 Mon Sep 17 00:00:00 2001
+From: Kenneth Graunke <kenneth@whitecape.org>
+Date: Wed, 22 Mar 2017 15:20:51 -0700
+Subject: i965: Require Kernel 3.6 for Gen4-5 platforms.
+
+We've already required Kernel 3.6 on Gen6+ since Mesa 9.2 (May 2013,
+commit 92d2f5acfadea672417b6785710c9e8b7f605e41). It seems reasonable
+to require it for Gen4-5 as well, bumping the requirement from 2.6.39.
+
+This is necessary for glClientWaitSync with a timeout to work, which
+is a feature we expose on Gen4-5. Without it, we would fall back to an
+infinite wait, which is pretty bad.
+
+See kernel commit 172cf15d18889313bf2c3bfb81fcea08369274ef in 3.6+.
+
+Reviewed-by: Matt Turner <mattst88@gmail.com>
+
+diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
+index c7f111d..bc998ab 100644
+--- src/mesa/drivers/dri/i965/intel_screen.c
++++ src/mesa/drivers/dri/i965/intel_screen.c
+@@ -1274,8 +1274,8 @@ intel_init_bufmgr(struct intel_screen *screen)
+
+ drm_intel_bufmgr_gem_enable_fenced_relocs(screen->bufmgr);
+
+- if (!intel_get_boolean(screen, I915_PARAM_HAS_WAIT_TIMEOUT)) {
+- fprintf(stderr, "[%s: %u] Kernel 3.6 required.\n", __func__, __LINE__);
++ if (!intel_get_boolean(screen, I915_PARAM_HAS_RELAXED_DELTA)) {
++ fprintf(stderr, "[%s: %u] Kernel 2.6.39 required.\n", __func__, __LINE__);
+ return false;
+ }
+
+--
+cgit v0.10.2
diff --git a/graphics/mesa-dri/files/patch-configure b/graphics/mesa-dri/files/patch-configure
index fe673a86a1a9..ea546ee330c1 100644
--- a/graphics/mesa-dri/files/patch-configure
+++ b/graphics/mesa-dri/files/patch-configure
@@ -9,15 +9,6 @@
dri3_default=yes
;;
*)
-@@ -24108,7 +24108,7 @@ fi
- if test "x$enable_dri" = xyes; then
- # Platform specific settings and drivers to build
- case "$host_os" in
-- linux*)
-+ linux* | freebsd*)
- if test "x$enable_dri3" = xyes; then
- DEFINES="$DEFINES -DHAVE_DRI3"
- fi
@@ -25972,9 +25972,19 @@ if test "x$enable_opencl" = xyes; then
as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
fi