pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

MesaLib-dfbsd: Update wip/MesaLib-dfbsd to 17.0.0



Module Name:	pkgsrc-wip
Committed By:	David Shao <davshao%gmail.com@localhost>
Pushed By:	dshao
Date:		Mon Feb 13 22:21:28 2017 -0800
Changeset:	5ec2589a913a17a105595b596e9a410b1f2b5f91

Modified Files:
	MesaLib-dfbsd/Makefile
	MesaLib-dfbsd/distinfo
	MesaLib-dfbsd/options.mk
	MesaLib-dfbsd/patches/patch-configure
	MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
	MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
	MesaLib-dfbsd/patches/patch-src_gallium_targets_dri_Makefile.in
	MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
	MesaLib-dfbsd/patches/patch-src_mapi_entry__x86-64__tls.h
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
	MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h
Added Files:
	MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_brw__context.h

Log Message:
MesaLib-dfbsd: Update wip/MesaLib-dfbsd to 17.0.0

Changes:
* mesa 17.0.0 is basically 13.1.0 after a change in naming scheme.
* Added MESA_ALIGN for future use since defining single-argument
  ALIGN in sys/param.h ain't winning in the long-run against the
  Linux world's insistence on a two-argument ALIGN.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5ec2589a913a17a105595b596e9a410b1f2b5f91

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 MesaLib-dfbsd/Makefile                             |  2 +-
 MesaLib-dfbsd/distinfo                             | 27 ++++++++---------
 MesaLib-dfbsd/options.mk                           |  7 ++---
 MesaLib-dfbsd/patches/patch-configure              | 34 +++++-----------------
 ...llium_auxiliary_pipe-loader_pipe__loader__drm.c | 10 +++----
 ...lium_state__trackers_clover_llvm_invocation.cpp |  4 +--
 .../patch-src_gallium_targets_dri_Makefile.in      | 16 ++++++----
 .../patches/patch-src_intel_tools_aubinator.c      |  6 ++--
 .../patches/patch-src_mapi_entry__x86-64__tls.h    | 12 ++++----
 ...patch-src_mesa_drivers_dri_i915_intel__screen.c | 25 +++++++++-------
 .../patch-src_mesa_drivers_dri_i965_brw__context.h | 15 ++++++++++
 ...patch-src_mesa_drivers_dri_i965_intel__screen.c | 25 +++++++++-------
 MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h | 24 +++++++++++++--
 13 files changed, 118 insertions(+), 89 deletions(-)

diffs:
diff --git a/MesaLib-dfbsd/Makefile b/MesaLib-dfbsd/Makefile
index 9f8c00f93f..20138d1f9a 100644
--- a/MesaLib-dfbsd/Makefile
+++ b/MesaLib-dfbsd/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.129 2016/10/20 12:06:06 wiz Exp $
 
-DISTNAME=	mesa-13.0.2
+DISTNAME=	mesa-17.0.0
 PKGNAME=	${DISTNAME:S/mesa/MesaLib/}
 CATEGORIES=	graphics x11
 MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/${PKGVERSION_NOREV}/
diff --git a/MesaLib-dfbsd/distinfo b/MesaLib-dfbsd/distinfo
index 1bebb5b91b..6c736a7829 100644
--- a/MesaLib-dfbsd/distinfo
+++ b/MesaLib-dfbsd/distinfo
@@ -1,16 +1,16 @@
 $NetBSD: distinfo,v 1.117 2016/05/18 12:55:28 wiz Exp $
 
-SHA1 (mesa-13.0.2.tar.xz) = 457331f16b229e02594477307604b0a92a155fd2
-RMD160 (mesa-13.0.2.tar.xz) = 107d2b33f5199bf14a61775c01ddaa2556b4b9dd
-SHA512 (mesa-13.0.2.tar.xz) = e4e2b9d685910f9b1d70958c50f54d059263623865571a92c3aa185914f4f7aa745d74afc9706b64ecd1f8d04c603ad03a78365d976382e2664284dc6a8351be
-Size (mesa-13.0.2.tar.xz) = 9159100 bytes
-SHA1 (patch-configure) = 71d621a23e895d828ef3be348df44574d6c8e2fe
+SHA1 (mesa-17.0.0.tar.xz) = a3b4f51e8749bab142cbec4591b2136e652b354e
+RMD160 (mesa-17.0.0.tar.xz) = 48f4bc5903c4af2cf9dcce6286e30c44d67e31dd
+SHA512 (mesa-17.0.0.tar.xz) = 880364d63fc252efff27fb324a5a9c037f7197819db0b543f695687849db15deabbb4433d1850d005c2c2436d1c1a01f8533f0d79c71c08aaf79d562b35a753d
+Size (mesa-17.0.0.tar.xz) = 9442580 bytes
+SHA1 (patch-configure) = 8ec2040e8ab6925753ce58a5c7fd9fa25a65f66f
 SHA1 (patch-include_GL_glxext.h) = 830902f2d38a8395cda682c059fc5223e1b0e89e
 SHA1 (patch-src_compiler_glsl_glsl__parser__extras.cpp) = c5046ce848d0b1ea428e29611b6822d4f4ab970d
 SHA1 (patch-src_egl_drivers_dri2_platform__drm.c) = 75144a5c2cbcda3f7ccd708ff2ac03c823c045d7
 SHA1 (patch-src_egl_drivers_dri2_platform__x11.c) = 04b6ef8e755f226fbe3e6f2bea6c9e2a56a783ca
 SHA1 (patch-src_egl_main_eglglobals.c) = 194954826564d1053544a88c771019faf4d07df2
-SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = e190c9bc287b2f81ce13e641980fed3ec0ecfacb
+SHA1 (patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c) = fef19b60f00e6450ca48eebd6e3625e177fef689
 SHA1 (patch-src_gallium_auxiliary_util_u__format__tests.c) = 4d5e4677c2825778c43440ab131b8807f6840975
 SHA1 (patch-src_gallium_auxiliary_util_u__math.h) = 812e4a5291aea47e06505f09891e0434c4d9c34d
 SHA1 (patch-src_gallium_auxiliary_util_u__network.c) = 283f505af780071dc9fd7914f8065e3fb7d8a4fd
@@ -18,18 +18,18 @@ SHA1 (patch-src_gallium_auxiliary_util_u__network.h) = c6106d67b4fa9db0d79047418
 SHA1 (patch-src_gallium_drivers_nouveau_codegen_nv50__ir__peephole.cpp) = 5fc2ef7eafac3006896af96bac8176c79b17cfdc
 SHA1 (patch-src_gallium_drivers_nouveau_nouveau__vp3__video.c) = ae1b6eb4df3e4db0f37e44118cdf69b16f3c471e
 SHA1 (patch-src_gallium_drivers_nouveau_nv50_nv84__video.c) = 1b4239fe053523835ecac006894bdb0cde0ee626
-SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = f283ec2fa88bf3a542343db7205ff63d9b5c871f
+SHA1 (patch-src_gallium_state__trackers_clover_llvm_invocation.cpp) = ab15bae0162ad6d25218d5992de0329a99cafc51
 SHA1 (patch-src_gallium_state__trackers_clover_llvm_metadata.hpp) = 21973190b9b9521c2c4df20a1982ca4da3c8e90b
-SHA1 (patch-src_gallium_targets_dri_Makefile.in) = a9a8265d97297040a3e3260b362ca920ec852280
+SHA1 (patch-src_gallium_targets_dri_Makefile.in) = 2306f133b89adf8deddfe0f8085af91768e57975
 SHA1 (patch-src_gallium_winsys_radeon_drm_radeon__drm__winsys.c) = 94e05c38ab2a8d2bcc25dd477cbd1fd5d681182a
 SHA1 (patch-src_gallium_winsys_svga_drm_vmw__screen__ioctl.c) = e4b891e8b4ebe5b8e8c7b8c2c1dbed11b9c417df
 SHA1 (patch-src_glsl_ralloc.c) = 63c8e40b9f74404033c20c5c9a00c5f6d8df6433
 SHA1 (patch-src_glx_apple_apple__glapi.c) = df70afc24759978f954ac3a774a14e6518dde97a
 SHA1 (patch-src_glx_glxclient.h) = e15256851559dafb7a86e1eb7e9d6afc86de581b
 SHA1 (patch-src_glx_glxcurrent.c) = 713f75bcafb186c7123d19a6aae3deaed9d5fa69
-SHA1 (patch-src_intel_tools_aubinator.c) = 4437e19acab1de56f7335378f210a0d415c71478
+SHA1 (patch-src_intel_tools_aubinator.c) = d4176961b613e86436edec8c3d5aa066279df27d
 SHA1 (patch-src_mapi_entry.c) = b0af9f644ed5be023010b44981827bfce5986d79
-SHA1 (patch-src_mapi_entry__x86-64__tls.h) = 7653433abf2a1f972beebd20bab43f02db9a9ebf
+SHA1 (patch-src_mapi_entry__x86-64__tls.h) = b100d1dd432a00fe4df010d488491fb1367fa6d4
 SHA1 (patch-src_mapi_entry__x86__tls.h) = a763f1f1a5e4eb458f7a654266e53e6470d3a882
 SHA1 (patch-src_mapi_glapi_gen_gl__gentable.py) = 53026e520a510e54494760a3fa05af6f15dfb9d8
 SHA1 (patch-src_mapi_table.h) = 272d00c45f742303a5ff84da82c1cd585846d6e1
@@ -38,13 +38,14 @@ SHA1 (patch-src_mapi_u__current.h) = 214dd29cb0c4fe127eb1157b04b12ddfc455b4b0
 SHA1 (patch-src_mesa_drivers_dri_Makefile.in) = 2fb1471045ae88eaa4fca162bf86330b833167fd
 SHA1 (patch-src_mesa_drivers_dri_common_Makefile.in) = 5e160f7d92c2e9f3fa36e52a082a496af67e634e
 SHA1 (patch-src_mesa_drivers_dri_common_xmlconfig.c) = ad6f459e6df955c6a06cde7e03de7d0324b0281f
-SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = fd8436e4e3a69250256c2cddf8138effb16bd7b3
-SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 7c1a1e5c549f64d4c390e0c87984c44a88d4abfe
+SHA1 (patch-src_mesa_drivers_dri_i915_intel__screen.c) = 03505d0eb562fe63e50875413cce119980b41b43
+SHA1 (patch-src_mesa_drivers_dri_i965_brw__context.h) = 0af70340ffe9600932d73ee9b24202dbc3bc1967
+SHA1 (patch-src_mesa_drivers_dri_i965_intel__screen.c) = 1eebb4144c1ddf5f1d0fdde31c168d33e1ad0bee
 SHA1 (patch-src_mesa_drivers_dri_i965_intel__tiled__memcpy.c) = c0d465fb65939ead71c9d02b6f6793824dbf441d
 SHA1 (patch-src_mesa_drivers_dri_swrast_swrast.c) = b8a6cca517e1cccbdb2c59cf67a6d2481cdfebd4
 SHA1 (patch-src_mesa_main_context.c) = 695b0e04cbd08dfed46b4dae5f9602b35e21f5b3
 SHA1 (patch-src_mesa_main_extensions.c) = d650d7ddfe22ddbcd8a4c24b64feb27126521ae0
-SHA1 (patch-src_mesa_main_macros.h) = e0e98dff37bbf96fea2f3adf0dc9ef9911b711d9
+SHA1 (patch-src_mesa_main_macros.h) = a73e93653773a2c121aa8e5c14bc558cce63f94a
 SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3
 SHA1 (patch-src_mesa_tnl_t__pipeline.c) = afc7d5f27aeadacc7c6a762e5aa892e01a0c1317
 SHA1 (patch-src_mesa_x86_common__x86.c) = bdac91384d67ad0238ecd4cdcf5cfc787952a3d9
diff --git a/MesaLib-dfbsd/options.mk b/MesaLib-dfbsd/options.mk
index 0a6cf62d32..912a1077cc 100644
--- a/MesaLib-dfbsd/options.mk
+++ b/MesaLib-dfbsd/options.mk
@@ -45,10 +45,8 @@ PLIST_VARS+=	gbm wayland xatracker osmesa xvmc
 CONFIGURE_ARGS+=	--enable-dri
 CONFIGURE_ARGS+=	--enable-egl
 .if ${OPSYS} != "Darwin"
-.if ${OPSYS} != "DragonFly" && ${OPSYS} != "NetBSD"
 CFLAGS+=		-DHAVE_DRI3
 CONFIGURE_ARGS+=	--enable-dri3
-.endif
 CONFIGURE_ARGS+=	--enable-gbm
 PLIST.gbm=		yes
 .endif
@@ -118,9 +116,10 @@ GALLIUM_DRIVERS+=	i915
 PLIST.i915_dri=		yes
 DRI_DRIVERS+=		i915
 
+# ilo is being phased out in favor of Vulkan
 # Experimental Intel driver
-PLIST.ilo=		yes
-GALLIUM_DRIVERS+=	ilo
+# PLIST.ilo=		yes
+# GALLIUM_DRIVERS+=	ilo
 
 PLIST.i965_dri=		yes
 DRI_DRIVERS+=		i965
diff --git a/MesaLib-dfbsd/patches/patch-configure b/MesaLib-dfbsd/patches/patch-configure
index 2903cd901e..bc633995d6 100644
--- a/MesaLib-dfbsd/patches/patch-configure
+++ b/MesaLib-dfbsd/patches/patch-configure
@@ -1,35 +1,17 @@
 $NetBSD$
 
---- configure.orig	2016-11-28 15:16:01.000000000 +0000
+--- configure.orig	2017-01-25 13:26:43.000000000 +0000
 +++ configure
-@@ -24711,7 +24711,7 @@ if test -n "$with_vulkan_drivers"; then
-             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
-+            if test "x$with_sha1" = "x"; then
-                 as_fn_error $? "Intel Vulkan driver requires SHA1" "$LINENO" 5
-             fi
-             HAVE_INTEL_VULKAN=yes;
-@@ -24810,7 +24810,7 @@ $as_echo "yes" >&6; }
- 
- fi
-             HAVE_RADEON_VULKAN=yes;
--            if test "x$with_sha1" == "x"; then
-+            if test "x$with_sha1" = "x"; then
-                 as_fn_error $? "radv vulkan driver requires SHA1" "$LINENO" 5
-             fi
- 	    ;;
-@@ -26375,9 +26375,9 @@ fi
+@@ -22308,9 +22308,9 @@ llvm_add_target() {
  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/-march=\S*//g' \
+-        -e 's/-mtune=\S*//g' \
+-        -e 's/-mcpu=\S*//g' \
 +	-e 's/-march=[-a-zA-Z0-9]*//g' \
 +	-e 's/-mtune=[-a-zA-Z0-9]*//g' \
 +	-e 's/-mcpu=[-a-zA-Z0-9]*//g' \
- 	-e 's/-DNDEBUG\>//g' \
- 	-e 's/-D_GNU_SOURCE\>//g' \
- 	-e 's/-pedantic\>//g' \
+         -e 's/-DNDEBUG\>//g' \
+         -e 's/-D_GNU_SOURCE\>//g' \
+         -e 's/-pedantic\>//g' \
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c b/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
index 51bb045812..e6e9eddb02 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c
@@ -23,9 +23,9 @@ headless system that is used for opencl.
 
 v2: Clarify the linking topic in the commit message.
 
---- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig	2016-11-10 22:05:17.000000000 +0000
+--- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig	2017-02-06 13:49:09.000000000 +0000
 +++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
-@@ -214,6 +214,16 @@ pipe_loader_drm_probe_fd(struct pipe_loa
+@@ -224,6 +224,16 @@ pipe_loader_drm_probe_fd(struct pipe_loa
     return false;
  }
  
@@ -42,7 +42,7 @@ v2: Clarify the linking topic in the commit message.
  static int
  open_drm_render_node_minor(int minor)
  {
-@@ -226,7 +236,19 @@ open_drm_render_node_minor(int minor)
+@@ -236,7 +246,19 @@ open_drm_render_node_minor(int minor)
  int
  pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
  {
@@ -62,7 +62,7 @@ v2: Clarify the linking topic in the commit message.
  
     for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0;
          i <= DRM_RENDER_NODE_MAX_MINOR; i++) {
-@@ -241,6 +263,11 @@ pipe_loader_drm_probe(struct pipe_loader
+@@ -251,6 +273,11 @@ pipe_loader_drm_probe(struct pipe_loader
           continue;
        }
  
@@ -74,7 +74,7 @@ v2: Clarify the linking topic in the commit message.
        if (j < ndev) {
           devs[j] = dev;
        } else {
-@@ -250,6 +277,48 @@ pipe_loader_drm_probe(struct pipe_loader
+@@ -260,6 +287,48 @@ pipe_loader_drm_probe(struct pipe_loader
        j++;
     }
  
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
index 6f20d79624..f8c8d37b38 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
@@ -3,7 +3,7 @@ $NetBSD$
 From freebsd-base-ports
 https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-udev
 
---- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig	2016-11-10 22:06:40.000000000 +0000
+--- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig	2017-02-06 13:49:09.000000000 +0000
 +++ src/gallium/state_trackers/clover/llvm/invocation.cpp
 @@ -85,6 +85,14 @@ namespace {
        }
@@ -20,7 +20,7 @@ https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-
     std::unique_ptr<LLVMContext>
     create_context(std::string &r_log) {
        init_targets();
-@@ -104,8 +112,14 @@ namespace {
+@@ -105,8 +113,14 @@ namespace {
        // Parse the compiler options.  A file name should be present at the end
        // and must have the .cl extension in order for the CompilerInvocation
        // class to recognize it as an OpenCL source file.
diff --git a/MesaLib-dfbsd/patches/patch-src_gallium_targets_dri_Makefile.in b/MesaLib-dfbsd/patches/patch-src_gallium_targets_dri_Makefile.in
index e54ff8c0a2..c76bf2f63f 100644
--- a/MesaLib-dfbsd/patches/patch-src_gallium_targets_dri_Makefile.in
+++ b/MesaLib-dfbsd/patches/patch-src_gallium_targets_dri_Makefile.in
@@ -3,13 +3,17 @@ $NetBSD: patch-src_gallium_targets_dri_Makefile.in,v 1.1 2015/04/25 11:19:18 tnn
 DRI drivers need explicit linkage to glapi. FDO bug 57702. We only need to do
 this for the "mega" drivers since that's where final linking takes place.
 
---- src/gallium/targets/dri/Makefile.in.orig	2015-03-28 18:43:38.000000000 +0000
+--- src/gallium/targets/dri/Makefile.in.orig	2017-01-25 13:26:47.000000000 +0000
 +++ src/gallium/targets/dri/Makefile.in
-@@ -735,6 +735,7 @@ GALLIUM_TARGET_CFLAGS = \
+@@ -800,7 +800,10 @@ GALLIUM_TARGET_CFLAGS = \
+ 	$(LIBDRM_CFLAGS) \
  	$(VISIBILITY_CFLAGS)
  
- GALLIUM_COMMON_LIB_DEPS = \
+-GALLIUM_COMMON_LIB_DEPS = -lm $(LIBSENSORS_LIBS) $(CLOCK_LIB) \
++GALLIUM_COMMON_LIB_DEPS = \
 +	$(top_srcdir)/src/mapi/shared-glapi/libglapi.la \
- 	-lm \
- 	$(CLOCK_LIB) \
- 	$(PTHREAD_LIBS) \
++	-lm \
++	$(LIBSENSORS_LIBS) $(CLOCK_LIB) \
+ 	$(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1)
+ GALLIUM_WINSYS_CFLAGS = \
+ 	-I$(top_srcdir)/src \
diff --git a/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c b/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
index f9688b9908..d5213ac112 100644
--- a/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
+++ b/MesaLib-dfbsd/patches/patch-src_intel_tools_aubinator.c
@@ -5,12 +5,12 @@ https://github.com/FreeBSDDesktop/freebsd-ports-graphics/tree/xserver-mesa-next-
 
 Not sure if these mmap() flags are right ...
 
---- src/intel/tools/aubinator.c.orig	2016-11-10 22:06:40.000000000 +0000
+--- src/intel/tools/aubinator.c.orig	2017-01-25 13:26:34.000000000 +0000
 +++ src/intel/tools/aubinator.c
-@@ -1225,8 +1225,14 @@ int main(int argc, char *argv[])
+@@ -1298,8 +1298,14 @@ int main(int argc, char *argv[])
  
     /* mmap a terabyte for our gtt space. */
-    gtt_size = 1ul << 40;
+    gtt_size = 1ull << 40;
 +/* MAP_NORESERVE removed in FreeBSD 11 and never was implemented before */
 +#if defined(__FreeBSD__) || defined(__DragonFly__)
 +   gtt = mmap(NULL, gtt_size, PROT_READ | PROT_WRITE,
diff --git a/MesaLib-dfbsd/patches/patch-src_mapi_entry__x86-64__tls.h b/MesaLib-dfbsd/patches/patch-src_mapi_entry__x86-64__tls.h
index 2b0b5df9d1..0a4d04a87a 100644
--- a/MesaLib-dfbsd/patches/patch-src_mapi_entry__x86-64__tls.h
+++ b/MesaLib-dfbsd/patches/patch-src_mapi_entry__x86-64__tls.h
@@ -8,11 +8,11 @@ Fix --enable-glx-tls with clang. From FreeBSD.
 HACK: Renamed non-linking table_noop_array to locally created
 netbsd_table_noop_array.
 
---- src/mapi/entry_x86-64_tls.h.orig	2016-11-10 22:05:17.000000000 +0000
+--- src/mapi/entry_x86-64_tls.h.orig	2017-01-25 13:26:34.000000000 +0000
 +++ src/mapi/entry_x86-64_tls.h
-@@ -41,10 +41,19 @@ __asm__(".text\n"
-    ".balign 32\n"                                        \
-    func ":"
+@@ -43,10 +43,19 @@ __asm__(".text\n"
+ 
+ #ifndef __ILP32__
  
 +#if defined(__NetBSD__) && defined(GLX_USE_TLS)
  #define STUB_ASM_CODE(slot)                              \
@@ -28,5 +28,5 @@ netbsd_table_noop_array.
 +   "jmp *(8 * " slot ")(%r11)"
 +#endif
  
- #define MAPI_TMP_STUB_ASM_GCC
- #include "mapi_tmp.h"
+ #else
+ 
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
index 3b8aa7d268..3cb8653363 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i915_intel__screen.c
@@ -1,21 +1,26 @@
 $NetBSD: patch-src_mesa_drivers_dri_i915_intel__screen.c,v 1.2 2015/06/07 15:48:12 tnn Exp $
 
+Move sys/sysctl.h include because on NetBSD, sysctl.h includes sys/param.h,
+and sys/param.h defines a one argument ALIGN.  Allows mesa to redefine
+to a two argument ALIGN.
+
 Fix build on older NetBSD w/o _SC_PHYS_PAGES.
 
---- src/mesa/drivers/dri/i915/intel_screen.c.orig	2015-06-07 10:06:53.000000000 +0000
+--- src/mesa/drivers/dri/i915/intel_screen.c.orig	2017-01-25 13:26:34.000000000 +0000
 +++ src/mesa/drivers/dri/i915/intel_screen.c
-@@ -41,6 +41,10 @@
- #include "utils.h"
- #include "xmlpool.h"
- 
+@@ -28,6 +28,11 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <unistd.h>
++
 +#ifdef HAVE_SYS_SYSCTL_H
 +# include <sys/sysctl.h>
 +#endif
 +
- static const __DRIconfigOptionsExtension i915_config_options = {
-    .base = { __DRI_CONFIG_OPTIONS, 1 },
-    .xml =
-@@ -732,6 +736,13 @@ i915_query_renderer_integer(__DRIscreen 
+ #include "main/glheader.h"
+ #include "main/context.h"
+ #include "main/framebuffer.h"
+@@ -730,6 +735,13 @@ i915_query_renderer_integer(__DRIscreen
        const unsigned gpu_mappable_megabytes =
           (aper_size / (1024 * 1024)) * 3 / 4;
  
@@ -29,7 +34,7 @@ Fix build on older NetBSD w/o _SC_PHYS_PAGES.
        const long system_memory_pages = sysconf(_SC_PHYS_PAGES);
        const long system_page_size = sysconf(_SC_PAGE_SIZE);
  
-@@ -740,6 +751,7 @@ i915_query_renderer_integer(__DRIscreen 
+@@ -738,6 +750,7 @@ i915_query_renderer_integer(__DRIscreen
  
        const uint64_t system_memory_bytes = (uint64_t) system_memory_pages
           * (uint64_t) system_page_size;
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_brw__context.h b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_brw__context.h
new file mode 100644
index 0000000000..5211633943
--- /dev/null
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_brw__context.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Use added MESA_ALIGN to ensure no clash if OS had one-argument defined ALIGN.
+
+--- src/mesa/drivers/dri/i965/brw_context.h.orig	2017-02-13 11:55:49.000000000 +0000
++++ src/mesa/drivers/dri/i965/brw_context.h
+@@ -1595,7 +1595,7 @@ brw_program_const(const struct gl_progra
+ static inline int
+ brw_register_blocks(int reg_count)
+ {
+-   return ALIGN(reg_count, 16) / 16 - 1;
++   return MESA_ALIGN(reg_count, 16) / 16 - 1;
+ }
+ 
+ static inline uint32_t
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
index b3012113ef..c4b773ff75 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_drivers_dri_i965_intel__screen.c
@@ -1,21 +1,26 @@
 $NetBSD: patch-src_mesa_drivers_dri_i965_intel__screen.c,v 1.2 2015/06/07 15:48:12 tnn Exp $
 
+Move sys/sysctl.h include because on NetBSD, sysctl.h includes sys/param.h,
+and sys/param.h defines a one argument ALIGN.  Allows mesa to redefine
+to a two argument ALIGN.
+
 Fix build on older NetBSD w/o _SC_PHYS_PAGES.
 
---- src/mesa/drivers/dri/i965/intel_screen.c.orig	2015-06-07 10:06:53.000000000 +0000
+--- src/mesa/drivers/dri/i965/intel_screen.c.orig	2017-02-06 13:49:09.000000000 +0000
 +++ src/mesa/drivers/dri/i965/intel_screen.c
-@@ -42,6 +42,10 @@
- #include "utils.h"
- #include "xmlpool.h"
- 
+@@ -26,6 +26,11 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <unistd.h>
++
 +#ifdef HAVE_SYS_SYSCTL_H
 +# include <sys/sysctl.h>
 +#endif
 +
- static const __DRIconfigOptionsExtension brw_config_options = {
-    .base = { __DRI_CONFIG_OPTIONS, 1 },
-    .xml =
-@@ -829,6 +833,13 @@ brw_query_renderer_integer(__DRIscreen *
+ #include "main/context.h"
+ #include "main/framebuffer.h"
+ #include "main/renderbuffer.h"
+@@ -902,6 +907,13 @@ brw_query_renderer_integer(__DRIscreen *
        const unsigned gpu_mappable_megabytes =
           (aper_size / (1024 * 1024)) * 3 / 4;
  
@@ -29,7 +34,7 @@ Fix build on older NetBSD w/o _SC_PHYS_PAGES.
        const long system_memory_pages = sysconf(_SC_PHYS_PAGES);
        const long system_page_size = sysconf(_SC_PAGE_SIZE);
  
-@@ -837,6 +848,7 @@ brw_query_renderer_integer(__DRIscreen *
+@@ -910,6 +922,7 @@ brw_query_renderer_integer(__DRIscreen *
  
        const uint64_t system_memory_bytes = (uint64_t) system_memory_pages
           * (uint64_t) system_page_size;
diff --git a/MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h b/MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h
index 8b26b14287..8df0228288 100644
--- a/MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h
+++ b/MesaLib-dfbsd/patches/patch-src_mesa_main_macros.h
@@ -2,15 +2,33 @@ $NetBSD: patch-src_mesa_main_macros.h,v 1.1 2016/01/05 13:02:57 tnn Exp $
 
 ALIGN is also defined in sys/param.h on NetBSD.
 
---- src/mesa/main/macros.h.orig	2015-12-09 16:10:13.000000000 +0000
+Add MESA_ALIGN for if there are still conflicts between an
+OS-defined one-argument ALIGN and mesa defined two-argument ALIGN.
+
+--- src/mesa/main/macros.h.orig	2017-02-13 11:55:49.000000000 +0000
 +++ src/mesa/main/macros.h
-@@ -690,6 +690,9 @@ minify(unsigned value, unsigned levels)
+@@ -677,11 +677,24 @@ minify(unsigned value, unsigned levels)
   *
   * \sa ROUND_DOWN_TO()
   */
-+#if defined(__NetBSD__)
++#ifdef ALIGN
 +#undef ALIGN
 +#endif
  static inline uintptr_t
  ALIGN(uintptr_t value, int32_t alignment)
  {
+    assert((alignment > 0) && _mesa_is_pow_two(alignment));
+    return (((value) + (alignment) - 1) & ~((alignment) - 1));
++}
++
++/**
++ * Like ALIGN(), but won't clash with other OSes ALIGN.
++ */
++static inline uintptr_t
++MESA_ALIGN(uintptr_t value, int32_t alignment)
++{
++   assert((alignment > 0) && _mesa_is_pow_two(alignment));
++   return (((value) + (alignment) - 1) & ~((alignment) - 1));
+ }
+ 
+ /**


Home | Main Index | Thread Index | Old Index