Index: head/graphics/mesa-dri/Makefile.common =================================================================== --- head/graphics/mesa-dri/Makefile.common (revision 490569) +++ head/graphics/mesa-dri/Makefile.common (revision 490570) @@ -1,105 +1,105 @@ # Makefile.common - shared code between MesaLib ports. # # !!! Here be dragons !!! (they seem to be everywhere these days) # # Remember to upgrade the following ports everytime you bump MESAVERSION: # # - graphics/libosmesa # - graphics/mesa-dri # - graphics/mesa-libs # - lang/clover # # $FreeBSD$ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 18.2.8 +MESABASEVERSION= 18.3.2 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= MASTER_SITES= https://mesa.freedesktop.org/archive/ \ https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ ftp://ftp.freedesktop.org/pub/mesa/ \ ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} MAINTAINER= x11@FreeBSD.org COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs LIB_DEPENDS+= libexpat.so:textproc/expat2 .if ${COMPONENT} != osmesa LIB_DEPENDS+= libdrm.so:graphics/libdrm .endif .if ${COMPONENT} != libs LIB_DEPENDS+= libglapi.so:graphics/mesa-libs .endif .if ${ARCH} == amd64 || ${ARCH} == i386 LIB_DEPENDS+= libunwind.so:devel/libunwind .endif .if ${OPSYS} == DragonFly LIB_DEPENDS+= libelf.so:devel/libelf .endif USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ localbase pathfix pkgconfig python:2.7,build shebangfix tar:xz USE_LDCONFIG= yes GNU_CONFIGURE= yes # only have one port to check with portscout. .if ${PORTNAME} != mesa-dri PORTSCOUT= ignore:1 .endif python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ src/util/xmlpool/gen_xmlpool.py \ src/mesa/main/get_*.py src/util/format_srgb.py \ src/amd/*/*.py src/intel/genxml/gen_pack_header.py MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri PATCHDIR= ${MASTERDIR}/files WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} DESCR= ${.CURDIR}/pkg-descr PLIST= ${.CURDIR}/pkg-plist PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall INSTALL_TARGET= install-strip .include # need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium .if ${CHOSEN_COMPILER_TYPE} == clang \ || (${COMPONENT} == libs && ${ARCH} != sparc64) # no working LLVM MESA_LLVM_VER?= 60 .endif .if "${MESA_LLVM_VER}" != "" BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} .if ${COMPONENT} != libs RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} .endif CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib CONFIGURE_ARGS+= --enable-llvm .else CONFIGURE_ARGS+= --disable-llvm .endif # There are issues that need to be fixed to use TLS model "initial-exec" # So stick with "global-dynamic"'s model for now. kan@ is working on a # patch for rtld. We might want to backport global-dynamic or # pthread_setspecific which it uses now by default. But since this # configure switch is going away ... # https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html CONFIGURE_ARGS+= --disable-glx-tls # we don't care about GLes v1 CONFIGURE_ARGS+= --disable-gles1 Index: head/graphics/mesa-dri/distinfo =================================================================== --- head/graphics/mesa-dri/distinfo (revision 490569) +++ head/graphics/mesa-dri/distinfo (revision 490570) @@ -1,3 +1,3 @@ -TIMESTAMP = 1545926521 -SHA256 (mesa-18.2.8.tar.xz) = 1d2ed9fd435d86d95b7215b287258d3e6b1180293a36f688e5a2efc18298d863 -SIZE (mesa-18.2.8.tar.xz) = 11385224 +TIMESTAMP = 1547724382 +SHA256 (mesa-18.3.2.tar.xz) = f7ce7181c07b6d8e0132da879af1729523a6c8aa87f79a9d59dfd064024cfb35 +SIZE (mesa-18.3.2.tar.xz) = 11868440 Index: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (revision 490569) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c (nonexistent) @@ -1,34 +0,0 @@ -- Partially implement memfd_create() via mkostemp() - ---- src/intel/tools/aubinator.c.orig 2018-08-02 15:41:20 UTC -+++ src/intel/tools/aubinator.c -@@ -52,7 +52,29 @@ - static inline int - memfd_create(const char *name, unsigned int flags) - { -+#if defined(__linux__) - return syscall(SYS_memfd_create, name, flags); -+#elif defined(__FreeBSD__) -+ return shm_open(SHM_ANON, flags | O_RDWR | O_CREAT, 0600); -+#else /* DragonFly, NetBSD, OpenBSD, Solaris */ -+ char template[] = "/tmp/shmfd-XXXXXX"; -+#ifdef HAVE_MKOSTEMP -+ int fd = mkostemp(template, flags); -+#else -+ int fd = mkstemp(template); -+ if (flags & O_CLOEXEC) { -+ int flags = fcntl(fd, F_GETFD); -+ if (flags != -1) { -+ flags |= FD_CLOEXEC; -+ (void) fcntl(fd, F_SETFD, &flags); -+ } -+ } -+#endif /* HAVE_MKOSTEMP */ -+ if (fd >= 0) -+ unlink(template); -+ -+ return fd; -+#endif /* __linux__ */ - } - #endif - Property changes on: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/configure.ac =================================================================== --- head/graphics/mesa-dri/files/configure.ac (revision 490569) +++ head/graphics/mesa-dri/files/configure.ac (revision 490570) @@ -1,53 +1,66 @@ ---- configure.ac.orig 2017-04-01 15:33:36 UTC +--- configure.ac.orig 2018-11-09 11:03:00 UTC +++ configure.ac -@@ -894,7 +894,7 @@ case "$host_os" in +@@ -931,7 +931,7 @@ case "$host_os" in darwin*) ;; *) - AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], + AC_CHECK_FUNCS([clock_gettime clock_nanosleep], [CLOCK_LIB=], [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], [AC_MSG_ERROR([Could not find clock_gettime])])]) AC_SUBST([CLOCK_LIB]) -@@ -942,7 +942,10 @@ if test "x$pthread_stubs_possible" = xyes; then - fi +@@ -982,8 +982,12 @@ save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS" + AC_MSG_CHECKING(whether pthread_setaffinity_np is supported) + AC_LINK_IFELSE([AC_LANG_SOURCE([[ ++ #if defined(__DragonFly__) || defined(__FreeBSD__) ++ #include ++ #else + #define _GNU_SOURCE + #include ++ #endif + int main() { + void *a = (void*) &pthread_setaffinity_np; + long b = (long) a; +@@ -995,7 +999,10 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([[ + LIBS="$save_LIBS" dnl Check for futex for fast inline simple_mtx_t. -AC_CHECK_HEADER([linux/futex.h], [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"]) +AC_CHECK_HEADERS([linux/futex.h sys/umtx.h], + [DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H"],, + [#include + #include ]) dnl SELinux awareness. AC_ARG_ENABLE([selinux], -@@ -1121,7 +1121,7 @@ fi +@@ -1278,7 +1285,7 @@ fi AC_SUBST(LIBSENSORS_LIBS) case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) -@@ -1884,9 +1884,9 @@ fi +@@ -1932,9 +1939,9 @@ fi if test x"$have_xlease" = xyes; then randr_modules="x11-xcb xcb-randr" - PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules]) + PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules],, [have_xlease=no]) xlib_randr_modules="xrandr" - PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules]) + PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules],, [have_xlease=no]) fi AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11') -@@ -2061,8 +2070,6 @@ if test "x$enable_opencl" = xyes; then +@@ -2515,8 +2522,6 @@ if test "x$enable_opencl" = xyes; 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) Index: head/graphics/mesa-dri/files/patch-compat-include-guards =================================================================== --- head/graphics/mesa-dri/files/patch-compat-include-guards (nonexistent) +++ head/graphics/mesa-dri/files/patch-compat-include-guards (revision 490570) @@ -0,0 +1,64 @@ +Partially revert https://cgit.freedesktop.org/mesa/mesa/commit/?id=f7d42ee7d319 +in order to allow ports like devel/allegro, devel/sdl{12,20}, graphics/glew, +graphics/libepoxy, x11-toolkits/qt5-gui to skip inclusion via . + +--- include/GLES2/gl2.h.orig 2018-11-09 11:03:00 UTC ++++ include/GLES2/gl2.h +@@ -1,5 +1,5 @@ +-#ifndef __gles2_gl2_h_ +-#define __gles2_gl2_h_ 1 ++#ifndef __gl2_h_ ++#define __gl2_h_ 1 + + #ifdef __cplusplus + extern "C" { +--- include/GLES2/gl2ext.h.orig 2018-11-09 11:03:00 UTC ++++ include/GLES2/gl2ext.h +@@ -1,5 +1,5 @@ +-#ifndef __gles2_gl2ext_h_ +-#define __gles2_gl2ext_h_ 1 ++#ifndef __gl2ext_h_ ++#define __gl2ext_h_ 1 + + #ifdef __cplusplus + extern "C" { +--- include/GLES3/gl3.h.orig 2018-11-09 11:03:00 UTC ++++ include/GLES3/gl3.h +@@ -1,5 +1,5 @@ +-#ifndef __gles2_gl3_h_ +-#define __gles2_gl3_h_ 1 ++#ifndef __gl3_h_ ++#define __gl3_h_ 1 + + #ifdef __cplusplus + extern "C" { +--- include/GL/glcorearb.h.orig 2018-11-09 11:03:00 UTC ++++ include/GL/glcorearb.h +@@ -1,5 +1,5 @@ +-#ifndef __gl_glcorearb_h_ +-#define __gl_glcorearb_h_ 1 ++#ifndef __glcorearb_h_ ++#define __glcorearb_h_ 1 + + #ifdef __cplusplus + extern "C" { +--- include/GL/glext.h.orig 2018-11-09 11:03:00 UTC ++++ include/GL/glext.h +@@ -1,5 +1,5 @@ +-#ifndef __gl_glext_h_ +-#define __gl_glext_h_ 1 ++#ifndef __glext_h_ ++#define __glext_h_ 1 + + #ifdef __cplusplus + extern "C" { +--- include/GL/glxext.h.orig 2018-11-09 11:03:00 UTC ++++ include/GL/glxext.h +@@ -1,5 +1,5 @@ +-#ifndef __glx_glxext_h_ +-#define __glx_glxext_h_ 1 ++#ifndef __glxext_h_ ++#define __glxext_h_ 1 + + #ifdef __cplusplus + extern "C" { Property changes on: head/graphics/mesa-dri/files/patch-compat-include-guards ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-configure =================================================================== --- head/graphics/mesa-dri/files/patch-configure (revision 490569) +++ head/graphics/mesa-dri/files/patch-configure (revision 490570) @@ -1,131 +1,144 @@ ---- configure.orig 2018-01-23 18:08:55 UTC +--- configure.orig 2018-11-09 11:03:06 UTC +++ configure -@@ -21895,12 +21895,13 @@ case "$host_os" in +@@ -22659,12 +22659,13 @@ case "$host_os" in darwin*) ;; *) - for ac_func in clock_gettime + for ac_func in clock_gettime clock_nanosleep do : - ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_CLOCK_GETTIME 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF CLOCK_LIB= else -@@ -22559,11 +22559,20 @@ $as_echo "yes" >&6; } - fi - fi +@@ -23330,8 +23331,12 @@ $as_echo_n "checking whether pthread_setaffinity_np is + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++ #if defined(__DragonFly__) || defined(__FreeBSD__) ++ #include ++ #else + #define _GNU_SOURCE + #include ++ #endif + int main() { + void *a = (void*) &pthread_setaffinity_np; + long b = (long) a; +@@ -23350,11 +23355,20 @@ rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" + -ac_fn_c_check_header_mongrel "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_futex_h" = xyes; then : - DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" +for ac_header in linux/futex.h sys/umtx.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include + #include +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + DEFINES="$DEFINES -DHAVE_LINUX_FUTEX_H" fi +done # Check whether --enable-selinux was given. -@@ -23308,7 +23308,7 @@ fi +@@ -24252,7 +24266,7 @@ fi case "$host_os" in -linux*) +linux* | freebsd*) dri3_default=yes ;; *) -@@ -26000,31 +26000,11 @@ fi +@@ -26640,31 +26654,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$XCB_RANDR_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements ($randr_modules) were not met: - -$XCB_RANDR_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_RANDR_CFLAGS -and XCB_RANDR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + have_xlease=no 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_RANDR_CFLAGS -and XCB_RANDR_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; } + have_xlease=no else XCB_RANDR_CFLAGS=$pkg_cv_XCB_RANDR_CFLAGS XCB_RANDR_LIBS=$pkg_cv_XCB_RANDR_LIBS -@@ -26092,31 +26072,11 @@ fi +@@ -26732,31 +26726,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$XLIB_RANDR_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements ($xlib_randr_modules) were not met: - -$XLIB_RANDR_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 XLIB_RANDR_CFLAGS -and XLIB_RANDR_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 + have_xlease=no 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 XLIB_RANDR_CFLAGS -and XLIB_RANDR_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; } + have_xlease=no else XLIB_RANDR_CFLAGS=$pkg_cv_XLIB_RANDR_CFLAGS XLIB_RANDR_LIBS=$pkg_cv_XLIB_RANDR_LIBS -@@ -27096,9 +27106,6 @@ rm -f core conftest.err conftest.$ac_obj +@@ -28792,9 +28766,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ 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= Index: head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c (revision 490570) @@ -0,0 +1,19 @@ +- Define CLOCK_MONOTONIC_RAW if missing + +--- src/amd/vulkan/radv_device.c.orig 2018-11-06 16:16:02 UTC ++++ src/amd/vulkan/radv_device.c +@@ -50,6 +50,14 @@ + #include "util/debug.h" + #include "util/mesa-sha1.h" + ++#ifndef CLOCK_MONOTONIC_RAW ++# ifdef CLOCK_MONOTONIC_FAST ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST ++# else ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC ++# endif ++#endif ++ + static int + radv_device_get_cache_uuid(enum radeon_family family, void *uuid) + { Property changes on: head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c (revision 490570) @@ -0,0 +1,39 @@ +- Partially implement memfd_create() via mkostemp() + +--- src/intel/tools/aub_mem.c.orig 2018-11-06 16:16:02 UTC ++++ src/intel/tools/aub_mem.c +@@ -30,11 +30,34 @@ + + #ifndef HAVE_MEMFD_CREATE + #include ++#include + + static inline int + memfd_create(const char *name, unsigned int flags) + { ++#if defined(__linux__) + return syscall(SYS_memfd_create, name, flags); ++#elif defined(__FreeBSD__) ++ return shm_open(SHM_ANON, flags | O_RDWR | O_CREAT, 0600); ++#else /* DragonFly, NetBSD, OpenBSD, Solaris */ ++ char template[] = "/tmp/shmfd-XXXXXX"; ++#ifdef HAVE_MKOSTEMP ++ int fd = mkostemp(template, flags); ++#else ++ int fd = mkstemp(template); ++ if (flags & O_CLOEXEC) { ++ int flags = fcntl(fd, F_GETFD); ++ if (flags != -1) { ++ flags |= FD_CLOEXEC; ++ (void) fcntl(fd, F_SETFD, &flags); ++ } ++ } ++#endif /* HAVE_MKOSTEMP */ ++ if (fd >= 0) ++ unlink(template); ++ ++ return fd; ++#endif /* __linux__ */ + } + #endif + Property changes on: head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c (revision 490569) +++ head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c (revision 490570) @@ -1,42 +1,50 @@ - Without sysinfo() fall back to sysconf() - Define ETIME if missing +- Define CLOCK_MONOTONIC_RAW if missing ---- src/intel/vulkan/anv_device.c.orig 2018-01-23 18:08:50 UTC +--- src/intel/vulkan/anv_device.c.orig 2018-11-06 16:16:02 UTC +++ src/intel/vulkan/anv_device.c @@ -25,7 +25,9 @@ #include #include #include +#ifdef __GLIBC__ #include +#endif #include #include #include -@@ -40,6 +42,10 @@ +@@ -44,6 +46,17 @@ #include "genxml/gen7_pack.h" +#ifndef ETIME +#define ETIME ETIMEDOUT +#endif ++#ifndef CLOCK_MONOTONIC_RAW ++# ifdef CLOCK_MONOTONIC_FAST ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST ++# else ++# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC ++# endif ++#endif + static void compiler_debug_log(void *data, const char *fmt, ...) { } -@@ -75,10 +81,15 @@ anv_compute_heap_size(int fd, uint64_t *heap_size) - } - +@@ -64,10 +73,15 @@ static VkResult + anv_compute_heap_size(int fd, uint64_t gtt_size, uint64_t *heap_size) + { /* Query the total ram from the system */ +#ifdef __GLIBC__ struct sysinfo info; sysinfo(&info); uint64_t total_ram = (uint64_t)info.totalram * (uint64_t)info.mem_unit; +#else + uint64_t total_ram = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGE_SIZE); +#endif + /* We don't want to burn too much ram with the GPU. If the user has 4GiB * or less, we use at most half. If they have more than 4GiB, we use 3/4. Index: head/graphics/mesa-dri/files/patch-src_util_u__thread.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_u__thread.h (revision 490569) +++ head/graphics/mesa-dri/files/patch-src_util_u__thread.h (revision 490570) @@ -1,39 +1,42 @@ - Implement setting thread name - Use monotonic clock for timeouts ---- src/util/u_thread.h.orig 2018-02-09 02:18:00 UTC +--- src/util/u_thread.h.orig 2018-11-09 11:03:00 UTC +++ src/util/u_thread.h -@@ -34,7 +34,11 @@ +@@ -34,7 +34,14 @@ #ifdef HAVE_PTHREAD #include +#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) +#include ++# if !defined(__DragonFly__) ++# define cpu_set_t cpuset_t ++# endif +#undef ALIGN /* Avoid conflict on FreeBSD in main/macros.h */ #endif +#endif - static inline thrd_t u_thread_create(int (*routine)(void *), void *param) -@@ -65,6 +69,12 @@ static inline void u_thread_setname( const char *name + { +@@ -64,6 +69,12 @@ static inline void u_thread_setname( const char *name (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \ defined(__linux__) pthread_setname_np(pthread_self(), name); +# elif defined(__sun) + pthread_setname_np(pthread_self(), name); +# elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) + pthread_set_name_np(pthread_self(), name); +# elif defined(__NetBSD__) + pthread_setname_np(pthread_self(), "%s", (void*)name); # endif #endif (void)name; -@@ -78,7 +88,7 @@ static inline void u_thread_setname( const char *name +@@ -134,7 +145,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned static inline int64_t u_thread_get_time_nano(thrd_t thread) { -#if defined(__linux__) && defined(HAVE_PTHREAD) +#if defined(HAVE_PTHREAD) struct timespec ts; clockid_t cid; Index: head/graphics/mesa-dri/pkg-plist =================================================================== --- head/graphics/mesa-dri/pkg-plist (revision 490569) +++ head/graphics/mesa-dri/pkg-plist (revision 490570) @@ -1,93 +1,93 @@ -etc/drirc @comment include/EGL/egl.h @comment include/EGL/eglext.h @comment include/EGL/eglextchromium.h @comment include/EGL/eglmesaext.h @comment include/EGL/eglplatform.h @comment include/GL/gl.h @comment include/GL/gl_mangle.h @comment include/GL/glcorearb.h @comment include/GL/glext.h @comment include/GL/glx.h @comment include/GL/glx_mangle.h @comment include/GL/glxext.h include/GL/internal/dri_interface.h @comment include/GL/osmesa.h @comment include/GLES2/gl2.h @comment include/GLES2/gl2ext.h @comment include/GLES2/gl2platform.h @comment include/GLES3/gl3.h @comment include/GLES3/gl31.h @comment include/GLES3/gl32.h @comment include/GLES3/gl3ext.h @comment include/GLES3/gl3platform.h @comment include/KHR/khrplatform.h @comment include/gbm.h %%INTEL_VDRIVER%%include/vulkan/vulkan_intel.h %%I915_DRIVER%%lib/dri/i915_dri.so %%I965_DRIVER%%lib/dri/i965_dri.so %%FREEDRENO_GDRIVER%%lib/dri/kgsl_dri.so %%SWRAST_GDRIVER%%lib/dri/kms_swrast_dri.so %%FREEDRENO_GDRIVER%%lib/dri/msm_dri.so %%R200_DRIVER%%lib/dri/r200_dri.so %%R300_GDRIVER%%lib/dri/r300_dri.so %%R600_GDRIVER%%lib/dri/r600_dri.so %%VAAPI%%%%R600_GDRIVER%%lib/dri/r600_drv_video.so %%RADEON_DRIVER%%lib/dri/radeon_dri.so %%RADEONSI_GDRIVER%%lib/dri/radeonsi_dri.so %%VAAPI%%%%RADEONSI_GDRIVER%%lib/dri/radeonsi_drv_video.so %%SWRAST_DRIVER%%lib/dri/swrast_dri.so %%VC4_GDRIVER%%lib/dri/vc4_dri.so %%SVGA_GDRIVER%%lib/dri/vmwgfx_dri.so @comment lib/gallium-pipe/pipe_r300.so @comment lib/gallium-pipe/pipe_r600.so @comment lib/gallium-pipe/pipe_radeonsi.so @comment lib/gallium-pipe/pipe_swrast.so @comment lib/gallium-pipe/pipe_vmwgfx.so @comment lib/libEGL.so @comment lib/libEGL.so.1 @comment lib/libEGL.so.1.0.0 @comment lib/libGL.so @comment lib/libGL.so.1 @comment lib/libGL.so.1.2.0 @comment lib/libGLESv2.so @comment lib/libGLESv2.so.2 @comment lib/libGLESv2.so.2.0.0 @comment lib/libMesaOpenCL.so @comment lib/libMesaOpenCL.so.1 @comment lib/libMesaOpenCL.so.1.0.0 @comment lib/libOSMesa.so @comment lib/libOSMesa.so.8 @comment lib/libOSMesa.so.8.0.0 %%R600_GDRIVER%%lib/libXvMCr600.so %%R600_GDRIVER%%lib/libXvMCr600.so.1 %%R600_GDRIVER%%lib/libXvMCr600.so.1.0 %%R600_GDRIVER%%lib/libXvMCr600.so.1.0.0 @comment lib/libgbm.so @comment lib/libgbm.so.1 @comment lib/libgbm.so.1.0.0 @comment lib/libglapi.so @comment lib/libglapi.so.0 @comment lib/libglapi.so.0.0.0 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1.0 %%VDPAU%%%%R300_GDRIVER%%lib/vdpau/libvdpau_r300.so.1.0.0 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1.0 %%VDPAU%%%%R600_GDRIVER%%lib/vdpau/libvdpau_r600.so.1.0.0 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1.0 %%VDPAU%%%%RADEONSI_GDRIVER%%lib/vdpau/libvdpau_radeonsi.so.1.0.0 %%INTEL_VDRIVER%%lib/libvulkan_intel.so %%RADEON_VDRIVER%%lib/libvulkan_radeon.so libdata/pkgconfig/dri.pc @comment libdata/pkgconfig/egl.pc @comment libdata/pkgconfig/gbm.pc @comment libdata/pkgconfig/gl.pc @comment libdata/pkgconfig/glesv2.pc @comment libdata/pkgconfig/osmesa.pc +share/drirc.d/00-mesa-defaults.conf %%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json %%RADEON_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json