diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -29,7 +29,7 @@ .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ALL_DRI_DRIVERS= I915 I965 R100 R200 -ALL_GALLIUM_DRIVERS= IRIS R300 R600 RADEONSI SVGA SWRAST +ALL_GALLIUM_DRIVERS= CROCUS IRIS R300 R600 RADEONSI SVGA SWRAST ALL_VULKAN_DRIVERS= INTEL AMD GALLIUM_DRIVERS+= SWRAST # llvmpipe @@ -50,7 +50,7 @@ .endif .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS+= I915 I965 -GALLIUM_DRIVERS+= IRIS SVGA +GALLIUM_DRIVERS+= CROCUS IRIS SVGA VULKAN_DRIVERS+= INTEL .endif diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common --- a/graphics/mesa-dri/Makefile.common +++ b/graphics/mesa-dri/Makefile.common @@ -12,7 +12,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 21.1.8 +MESABASEVERSION= 21.3.4 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= @@ -25,6 +25,9 @@ MAINTAINER= x11@FreeBSD.org +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/docs/license.rst + COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs \ @@ -85,7 +88,7 @@ BINARY_ALIAS+= python3=${PYTHON_VERSION} -LLVM_DEFAULT= 12 +LLVM_DEFAULT= 13 BUILD_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} .if ${COMPONENT} != libs RUN_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} diff --git a/graphics/mesa-dri/distinfo b/graphics/mesa-dri/distinfo --- a/graphics/mesa-dri/distinfo +++ b/graphics/mesa-dri/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1633514529 -SHA256 (mesa-21.1.8.tar.xz) = 5cd32f5d089dca75300578a3d771a656eaed652090573a2655fe4e7022d56bfc -SIZE (mesa-21.1.8.tar.xz) = 15410504 +TIMESTAMP = 1642339994 +SHA256 (mesa-21.3.4.tar.xz) = 77104fd4a93bce69da3b0982f8ee88ba7c4fb98cfc491a669894339cdcd4a67d +SIZE (mesa-21.3.4.tar.xz) = 16497248 diff --git a/graphics/mesa-dri/files/patch-meson.build b/graphics/mesa-dri/files/patch-meson.build deleted file mode 100644 --- a/graphics/mesa-dri/files/patch-meson.build +++ /dev/null @@ -1,28 +0,0 @@ ---- meson.build.orig 2021-06-30 18:18:55 UTC -+++ meson.build -@@ -161,7 +161,7 @@ if dri_drivers.contains('auto') - if system_has_kms_drm - # TODO: PPC, Sparc - if ['x86', 'x86_64'].contains(host_machine.cpu_family()) -- dri_drivers = ['i915', 'i965', 'r100', 'r200', 'nouveau'] -+ dri_drivers = ['i915', 'i965', 'r100', 'r200'] - elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) - dri_drivers = [] - elif ['mips', 'mips64'].contains(host_machine.cpu_family()) -@@ -193,7 +193,7 @@ if gallium_drivers.contains('auto') - # TODO: PPC, Sparc - if ['x86', 'x86_64'].contains(host_machine.cpu_family()) - gallium_drivers = [ -- 'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast', -+ 'r300', 'r600', 'radeonsi', 'virgl', 'svga', 'swrast', - 'iris' - ] - elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) -@@ -1041,7 +1041,6 @@ else - '-Werror=incompatible-pointer-types', - '-Werror=int-conversion', - '-Wimplicit-fallthrough', -- '-Werror=thread-safety', - '-Wno-missing-field-initializers', - '-Wno-format-truncation', - '-fno-math-errno', diff --git a/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h b/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h new file mode 100644 --- /dev/null +++ b/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h @@ -0,0 +1,11 @@ +--- src/gallium/include/pipe/p_compiler.h.orig 2022-01-16 11:29:08 UTC ++++ src/gallium/include/pipe/p_compiler.h +@@ -170,7 +170,7 @@ typedef unsigned char boolean; + * aligned, but we only want to align the field. + */ + #define EXCLUSIVE_CACHELINE(decl) \ +- union { char __cl_space[CACHE_LINE_SIZE]; \ ++ union { char __cl_space[MESA_CACHE_LINE_SIZE]; \ + decl; } + + #if defined(__GNUC__) diff --git a/graphics/mesa-dri/files/patch-src_intel_compiler_brw__nir__lower__shader__calls.c b/graphics/mesa-dri/files/patch-src_intel_compiler_brw__nir__lower__shader__calls.c deleted file mode 100644 --- a/graphics/mesa-dri/files/patch-src_intel_compiler_brw__nir__lower__shader__calls.c +++ /dev/null @@ -1,15 +0,0 @@ ---- src/intel/compiler/brw_nir_lower_shader_calls.c.orig 2021-06-30 18:18:55 UTC -+++ src/intel/compiler/brw_nir_lower_shader_calls.c -@@ -151,6 +151,12 @@ instr_is_shader_call(nir_instr *instr) - intrin->intrinsic == nir_intrinsic_execute_callable; - } - -+#ifdef __FreeBSD__ -+/* brw_nir_rt.h -> glthread.h -> u_thread.h -> pthread_np.h -> sys/cpuset.h -> sys/_bitset.h -+ * - defines `struct bitset` which clashes with the following -+ */ -+#define bitset mesa_bitset -+#endif - struct bitset { - BITSET_WORD *set; - unsigned size; diff --git a/graphics/mesa-dri/files/patch-src_loader_meson.build b/graphics/mesa-dri/files/patch-src_loader_meson.build deleted file mode 100644 --- a/graphics/mesa-dri/files/patch-src_loader_meson.build +++ /dev/null @@ -1,11 +0,0 @@ ---- src/loader/meson.build.orig 2020-12-03 18:59:28.209491000 +0100 -+++ src/loader/meson.build 2020-12-03 18:59:40.685431000 +0100 -@@ -41,7 +41,7 @@ - '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path), - ] - --if with_gallium_iris and get_option('prefer-iris') -+if get_option('prefer-iris') - loader_c_args += ['-DPREFER_IRIS'] - endif - diff --git a/graphics/mesa-dri/files/patch-src_util_macros.h b/graphics/mesa-dri/files/patch-src_util_macros.h new file mode 100644 --- /dev/null +++ b/graphics/mesa-dri/files/patch-src_util_macros.h @@ -0,0 +1,10 @@ +--- src/util/macros.h.orig 2022-01-16 11:28:56 UTC ++++ src/util/macros.h +@@ -478,6 +478,6 @@ typedef int lock_cap_t; + #endif + + /* TODO: this could be different on non-x86 architectures. */ +-#define CACHE_LINE_SIZE 64 ++#define MESA_CACHE_LINE_SIZE 64 + + #endif /* UTIL_MACROS_H */ diff --git a/graphics/mesa-dri/files/patch-src_util_os__file.c b/graphics/mesa-dri/files/patch-src_util_os__file.c deleted file mode 100644 --- a/graphics/mesa-dri/files/patch-src_util_os__file.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/util/os_file.c.orig 2021-06-30 18:18:56 UTC -+++ src/util/os_file.c -@@ -89,7 +89,7 @@ typedef ptrdiff_t ssize_t; - static ssize_t - readN(int fd, char *buf, size_t len) - { -- int err = -ENODATA; -+ int err = -1; - size_t total = 0; - do { - ssize_t ret = read(fd, buf + total, len - total); diff --git a/graphics/mesa-dri/pkg-plist b/graphics/mesa-dri/pkg-plist --- a/graphics/mesa-dri/pkg-plist +++ b/graphics/mesa-dri/pkg-plist @@ -4,6 +4,8 @@ include/GL/internal/dri_interface.h @comment include/KHR/khrplatform.h @comment include/gbm.h +%%CROCUS_GDRIVER%%lib/dri/crocus_dri.so +%%I915_DRIVER%%lib/dri/i830_dri.so %%I915_DRIVER%%lib/dri/i915_dri.so %%I965_DRIVER%%lib/dri/i965_dri.so %%IRIS_GDRIVER%%lib/dri/iris_dri.so