Index: graphics/mesa-dri/Makefile =================================================================== --- graphics/mesa-dri/Makefile +++ graphics/mesa-dri/Makefile @@ -27,33 +27,28 @@ .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -ALL_DRI_DRIVERS= I915 I965 R100 R200 -ALL_GALLIUM_DRIVERS= CROCUS IRIS PANFROST R300 R600 RADEONSI SVGA SWRAST +ALL_GALLIUM_DRIVERS= CROCUS IRIS PANFROST R300 R600 RADEONSI SVGA SWRAST ZINK ALL_VULKAN_DRIVERS= INTEL AMD SWRAST -GALLIUM_DRIVERS+= SWRAST # llvmpipe +GALLIUM_DRIVERS+= SWRAST \ + ZINK VULKAN_DRIVERS+= SWRAST # lavapipe -.if ${ARCH:Marm*} -DRI_DRIVERS+= R100 -.endif - .if ${ARCH} == aarch64 GALLIUM_DRIVERS+= PANFROST .endif .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH:Mpowerpc*} || ${ARCH} == riscv64 -DRI_DRIVERS+= R100 R200 GALLIUM_DRIVERS+= R300 R600 RADEONSI VULKAN_DRIVERS+= AMD +BUILD_DEPENDS+= glslangValidator:graphics/glslang . if ${PORT_OPTIONS:MPLATFORM_X11} USE_XORG+= xv xvmc MESON_ARGS+= -Dgallium-xvmc=enabled . endif .endif .if ${ARCH} == amd64 || ${ARCH} == i386 -DRI_DRIVERS+= I915 I965 GALLIUM_DRIVERS+= CROCUS IRIS SVGA VULKAN_DRIVERS+= INTEL .endif @@ -72,8 +67,7 @@ MESA_PLATFORMS+= wayland .endif -MESON_ARGS+= -Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \ - -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ +MESON_ARGS+= -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \ -Dplatforms="${MESA_PLATFORMS:ts,:tl}" @@ -84,17 +78,7 @@ -Dgles1=disabled \ -Dgles2=disabled \ -Dglx=disabled \ - -Degl=disabled \ - -Dosmesa=false \ - -Dtools="" - -.for _d in ${ALL_DRI_DRIVERS} -. if defined(DRI_DRIVERS) && ${DRI_DRIVERS:M${_d}} -PLIST_SUB+= ${_d}_DRIVER="" -. else -PLIST_SUB+= ${_d}_DRIVER="@comment " -. endif -.endfor + -Dosmesa=false .for _gd in ${ALL_GALLIUM_DRIVERS} . if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} Index: graphics/mesa-dri/Makefile.common =================================================================== --- graphics/mesa-dri/Makefile.common +++ graphics/mesa-dri/Makefile.common @@ -12,7 +12,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 21.3.8 +MESABASEVERSION= 22.2.1 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= Index: graphics/mesa-dri/distinfo =================================================================== --- graphics/mesa-dri/distinfo +++ graphics/mesa-dri/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1647770617 -SHA256 (mesa-21.3.8.tar.xz) = e70d273bdc53a4e931871bb5550ba3900e6a3deab2fff64184107c33e92d9da7 -SIZE (mesa-21.3.8.tar.xz) = 16593540 +TIMESTAMP = 1665746519 +SHA256 (mesa-22.2.1.tar.xz) = 0079beac0a33f45e7e0aec59e6913eafbc4268a3f1e2e330017440494f91b13c +SIZE (mesa-22.2.1.tar.xz) = 16408240 Index: graphics/mesa-dri/files/patch-meson.build =================================================================== --- graphics/mesa-dri/files/patch-meson.build +++ graphics/mesa-dri/files/patch-meson.build @@ -1,12 +1,14 @@ ---- meson.build.orig 2022-03-18 19:26:47 UTC +--- meson.build.orig 2022-10-11 18:53:31 UTC +++ meson.build -@@ -1414,11 +1414,42 @@ foreach f : ['strtof', 'mkostemp', 'timespec_get', 'me - endforeach +@@ -1436,7 +1436,6 @@ functions_to_detect = { + 'flock': '', + 'strtok_r': '', + 'getrandom': '', +- 'qsort_r': '', + 'qsort_s': '', + } - foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', -- 'flock', 'strtok_r', 'getrandom', 'qsort_r', 'qsort_s'] -+ 'flock', 'strtok_r', 'getrandom', 'qsort_s'] - if cc.has_function(f) +@@ -1445,6 +1444,37 @@ endforeach pre_args += '-DHAVE_@0@'.format(f.to_upper()) endif endforeach @@ -42,5 +44,5 @@ + pre_args += '-DHAVE_BSD_QSORT_R' +endif - if cc.has_header_symbol('errno.h', 'program_invocation_name', - args : '-D_GNU_SOURCE') + if cc.has_header_symbol('time.h', 'struct timespec') + pre_args += '-DHAVE_STRUCT_TIMESPEC' Index: graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c +++ graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c @@ -1,6 +1,6 @@ ---- src/gallium/drivers/llvmpipe/lp_rast_tri.c.orig 2021-07-21 11:06:08 UTC +--- src/gallium/drivers/llvmpipe/lp_rast_tri.c.orig 2022-10-11 18:53:31 UTC +++ src/gallium/drivers/llvmpipe/lp_rast_tri.c -@@ -465,7 +465,9 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *tas +@@ -488,7 +488,9 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *tas #if defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN Index: graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c +++ graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c @@ -1,6 +1,6 @@ ---- src/gallium/drivers/llvmpipe/lp_setup_tri.c.orig 2021-07-21 11:05:23 UTC +--- src/gallium/drivers/llvmpipe/lp_setup_tri.c.orig 2022-10-11 18:53:31 UTC +++ src/gallium/drivers/llvmpipe/lp_setup_tri.c -@@ -47,7 +47,9 @@ +@@ -46,7 +46,9 @@ #if defined(PIPE_ARCH_SSE) #include #elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN Index: graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h =================================================================== --- graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h +++ graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__compiler.h @@ -1,6 +1,6 @@ ---- src/gallium/include/pipe/p_compiler.h.orig 2022-01-16 11:29:08 UTC +--- src/gallium/include/pipe/p_compiler.h.orig 2022-10-11 18:53:31 UTC +++ src/gallium/include/pipe/p_compiler.h -@@ -170,7 +170,7 @@ typedef unsigned char boolean; +@@ -125,7 +125,7 @@ typedef unsigned char boolean; * aligned, but we only want to align the field. */ #define EXCLUSIVE_CACHELINE(decl) \ @@ -8,4 +8,4 @@ + union { char __cl_space[MESA_CACHE_LINE_SIZE]; \ decl; } - #if defined(__GNUC__) + #if defined(__cplusplus) Index: graphics/mesa-dri/files/patch-src_util_macros.h =================================================================== --- graphics/mesa-dri/files/patch-src_util_macros.h +++ graphics/mesa-dri/files/patch-src_util_macros.h @@ -1,10 +1,11 @@ ---- src/util/macros.h.orig 2022-01-16 11:28:56 UTC +--- src/util/macros.h.orig 2022-10-11 18:53:31 UTC +++ src/util/macros.h -@@ -478,6 +478,6 @@ typedef int lock_cap_t; +@@ -448,7 +448,7 @@ 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 */ + #define DO_PRAGMA(X) _Pragma (#X) + Index: graphics/mesa-dri/files/patch-src_util_u__process.c =================================================================== --- graphics/mesa-dri/files/patch-src_util_u__process.c +++ /dev/null @@ -1,27 +0,0 @@ ---- src/util/u_process.c.orig 2021-06-30 18:18:56 UTC -+++ src/util/u_process.c -@@ -94,22 +94,13 @@ __getProgramName() - # define GET_PROGRAM_NAME() __getProgramName() - #elif defined(HAVE_PROGRAM_INVOCATION_NAME) - # define GET_PROGRAM_NAME() program_invocation_short_name --#elif defined(__FreeBSD__) && (__FreeBSD__ >= 2) --# include --# if (__FreeBSD_version >= 440000) --# define GET_PROGRAM_NAME() getprogname() --# endif -+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__) || defined(ANDROID) -+# define GET_PROGRAM_NAME() getprogname() - #elif defined(__NetBSD__) - # include - # if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000100) - # define GET_PROGRAM_NAME() getprogname() - # endif --#elif defined(__DragonFly__) --# define GET_PROGRAM_NAME() getprogname() --#elif defined(__APPLE__) --# define GET_PROGRAM_NAME() getprogname() --#elif defined(ANDROID) --# define GET_PROGRAM_NAME() getprogname() - #elif defined(__sun) - /* Solaris has getexecname() which returns the full path - return just - the basename to match BSD getprogname() */ Index: graphics/mesa-dri/pkg-plist =================================================================== --- graphics/mesa-dri/pkg-plist +++ graphics/mesa-dri/pkg-plist @@ -1,24 +1,24 @@ +@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/glcorearb.h @comment include/GL/glext.h -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 %%PANFROST_GDRIVER%%lib/dri/panfrost_dri.so %%PANFROST_GDRIVER%%lib/dri/rockchip_dri.so %%SWRAST_GDRIVER%%lib/dri/kms_swrast_dri.so -%%R200_DRIVER%%lib/dri/r200_dri.so %%R300_GDRIVER%%lib/dri/r300_dri.so %%R600_GDRIVER%%lib/dri/r600_dri.so -%%R100_DRIVER%%lib/dri/radeon_dri.so %%RADEONSI_GDRIVER%%lib/dri/radeonsi_dri.so %%SWRAST_GDRIVER%%lib/dri/swrast_dri.so %%SVGA_GDRIVER%%lib/dri/vmwgfx_dri.so +%%ZINK_GDRIVER%%lib/dri/zink_dri.so %%PLATFORM_X11%%%%R600_GDRIVER%%lib/libXvMCr600.so %%PLATFORM_X11%%%%R600_GDRIVER%%lib/libXvMCr600.so.1 %%PLATFORM_X11%%%%R600_GDRIVER%%lib/libXvMCr600.so.1.0 @@ -33,6 +33,7 @@ %%AMD_VDRIVER%%lib/libvulkan_radeon.so %%SWRAST_VDRIVER%%lib/libvulkan_lvp.so libdata/pkgconfig/dri.pc +@comment libdata/pkgconfig/egl.pc @comment libdata/pkgconfig/gbm.pc share/drirc.d/00-mesa-defaults.conf %%AMD_VDRIVER%%share/drirc.d/00-radv-defaults.conf Index: graphics/mesa-libs/Makefile =================================================================== --- graphics/mesa-libs/Makefile +++ graphics/mesa-libs/Makefile @@ -29,8 +29,7 @@ .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -MESON_ARGS+= -Dgallium-drivers="" \ - -Dgallium-vdpau=disabled \ +MESON_ARGS+= -Dgallium-vdpau=disabled \ -Dgallium-xvmc=disabled \ -Dgallium-omx=disabled \ -Dgallium-va=disabled \ @@ -41,10 +40,9 @@ -Degl=enabled \ -Dgbm=enabled \ -Dvulkan-drivers="" \ - -Dglvnd=true \ - -Dprefer-iris=true -# Building EGL and GBM requires a dri driver so add r100 -MESON_ARGS+= -Ddri-drivers="r100" + -Dglvnd=true +# Building EGL and GBM requires a driver so add r300 +MESON_ARGS+= -Dgallium-drivers="r300" .if ${PORT_OPTIONS:MPLATFORM_X11} MESA_PLATFORMS+= x11