diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2022-08-31 22:18:05 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2022-08-31 22:18:05 +0200 |
commit | 908849c51f00366150e59dadc228b793bfa55ccb (patch) | |
tree | 28b848b354715a1a7b5b8a158fbec7d199fb0634 | |
parent | 50ce144bd7021faa6d76d6906ae0c4fd3e1b7258 (diff) |
graphics/mesa: tentative update to verson 22.1.7
not tested yet
-rw-r--r-- | graphics/mesa/Makefile | 31 | ||||
-rw-r--r-- | graphics/mesa/distinfo | 4 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-meson_build | 38 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_gallium_frontends_lavapipe_meson_build | 13 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c | 3 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_glx_dri_common_c | 5 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_loader_loader_c | 7 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_mesa_main_execmem_c | 26 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_util_disk_cache_os_c | 3 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_util_os_file_c | 5 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_util_u_atomic_c | 5 | ||||
-rw-r--r-- | graphics/mesa/patches/patch-src_util_u_cpu_detect_c | 12 | ||||
-rw-r--r-- | graphics/mesa/pkg/PLIST | 17 |
13 files changed, 50 insertions, 119 deletions
diff --git a/graphics/mesa/Makefile b/graphics/mesa/Makefile index 1c83a4c..db4a53f 100644 --- a/graphics/mesa/Makefile +++ b/graphics/mesa/Makefile @@ -4,7 +4,9 @@ COMMENT = the Mesa 3D Graphics Library -DISTNAME = mesa-21.1.1 +DPB_PROPERTIES = parallel + +DISTNAME = mesa-22.1.7 SHARED_LIBS = EGL 1.1 gbm 0.4 glapi 0.2 GL 17.1 GLESv1_CM 2.0 GLESv2 2.0 \ OSMesa 11.0 @@ -20,10 +22,12 @@ PERMIT_PACKAGE = Yes MODULES = devel/meson xenocara -WANTLIB = drm m pthread z expat Xau xcb X11-xcb X11 \ +WANTLIB = drm drm_intel drm_radeon m pthread z expat \ + xcb xcb-shm X11-xcb X11 \ xcb-dri3 xcb-xfixes xcb-present xcb-sync \ - xshmfence Xext Xdamage Xfixes xcb-glx xcb-dri2 \ - Xxf86vm c++ c++abi LLVM elf xcb-randr drm_amdgpu + xshmfence Xext Xfixes xcb-glx xcb-dri2 \ + Xxf86vm c++ c++abi LLVM elf xcb-randr drm_amdgpu \ + zstd MASTER_SITES = https://mesa.freedesktop.org/archive/ EXTRACT_SUFX = .tar.xz @@ -33,15 +37,14 @@ BUILD_DEPENDS = sysutils/libdrm \ www/py-mako,python3 \ devel/bison -LIB_DEPENDS = sysutils/libdrm \ +LIB_DEPENDS = archivers/zstd \ + sysutils/libdrm \ x11/libX11 \ x11/libxcb \ x11/libXext \ - x11/libXdamage \ x11/libXfixes \ x11/libXxf86vm \ - x11/libXrandr \ - x11/libxshmfence + x11/libxshmfence \ SEPARATE_BUILD = Yes @@ -50,22 +53,24 @@ GALLIUM_DRIVERS = swrast WITH_LLVM = false .if ${MACHINE} == i386 || ${MACHINE} == amd64 -DRI_DRIVERS = r100,r200,i915,i965 -GALLIUM_DRIVERS = swrast,r300,r600,radeonsi +GALLIUM_DRIVERS = swrast,r300,r600,iris,radeonsi VULKAN_DRIVERS = amd,intel WITH_LLVM = enabled .endif .if ${MACHINE} == arm64 || ${MACHINE} == loongson || \ ${MACHINE} == macppc || ${MACHINE} == sparc64 -DRI_DRIVERS = swrast,radeon,r200 +DRI_DRIVERS = r100,r200 GALLIUM_DRIVERS = swrast,r300,r600 .endif -CONFIGURE_ARGS = -Ddri-drivers=${DRI_DRIVERS} \ - -Dgallium-drivers=${GALLIUM_DRIVERS} \ +CONFIGURE_ARGS = -Dgallium-drivers=${GALLIUM_DRIVERS} \ -Dvulkan-drivers=${VULKAN_DRIVERS} \ -Dplatforms=x11 \ + -Dgallium-vdpau=disabled \ + -Dmicrosoft-clc=disabled \ + -Dintel-clc=disabled \ + -Dcpp_rtti=false \ -Dosmesa=true \ -Ddri3=enabled \ -Dllvm=${WITH_LLVM} \ diff --git a/graphics/mesa/distinfo b/graphics/mesa/distinfo index 60b15a4..58ad5fc 100644 --- a/graphics/mesa/distinfo +++ b/graphics/mesa/distinfo @@ -1,2 +1,2 @@ -SHA256 (mesa-21.1.1.tar.xz) = 7sJeo3kFTokRvF3oFq61D1gbW3CEFHJQA9LwA4azjdI= -SIZE (mesa-21.1.1.tar.xz) = 15169732 +SHA256 (mesa-22.1.7.tar.xz) = 2oOOss8R0OCNDplE9r1Nlph/3FnqKFb4xwoxqCs1XYk= +SIZE (mesa-22.1.7.tar.xz) = 16109944 diff --git a/graphics/mesa/patches/patch-meson_build b/graphics/mesa/patches/patch-meson_build index 55956d2..83ae18f 100644 --- a/graphics/mesa/patches/patch-meson_build +++ b/graphics/mesa/patches/patch-meson_build @@ -1,47 +1,27 @@ - Index: meson.build --- meson.build.orig +++ meson.build -@@ -49,6 +49,10 @@ pre_args = [ - '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"', - ] +@@ -60,6 +60,10 @@ pre_args = [ + c_args = [] + cpp_args = [] +if host_machine.system() == 'openbsd' + pre_args += '-D_ISOC11_SOURCE' +endif + + with_moltenvk_dir = get_option('moltenvk-dir') with_vulkan_icd_dir = get_option('vulkan-icd-dir') with_tests = get_option('build-tests') - with_aco_tests = get_option('build-aco-tests') -@@ -294,6 +298,7 @@ if with_aco_tests and not with_amd_vk - error('ACO tests require Radv') - endif - -+if false - dep_clang = dependency( - 'clang', - method : 'cmake', -@@ -306,6 +311,10 @@ dep_clang = dependency( - ) - with_microsoft_clc = dep_clang.found() - with_clc = dep_clang.found() -+else -+with_microsoft_clc = false -+with_clc = false -+endif - - with_spirv_to_dxil = get_option('spirv-to-dxil') - -@@ -1274,7 +1283,7 @@ foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', - endif +@@ -1411,7 +1415,7 @@ foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', endforeach --foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', 'flock', 'strtok_r', 'getrandom'] -+foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', 'flock', 'strtok_r', 'getrandom', 'arc4random_buf'] + foreach f : ['strtof', 'mkostemp', 'timespec_get', 'memfd_create', 'random_r', +- 'flock', 'strtok_r', 'getrandom', 'qsort_r', 'qsort_s'] ++ 'flock', 'strtok_r', 'getrandom', 'arc4random_buf', 'qsort_r', 'qsort_s'] if cc.has_function(f) pre_args += '-DHAVE_@0@'.format(f.to_upper()) endif -@@ -1350,6 +1359,9 @@ if cc.links('int main() { return 0; }', +@@ -1487,6 +1491,9 @@ if cc.links('int main() { return 0; }', endif ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1') diff --git a/graphics/mesa/patches/patch-src_gallium_frontends_lavapipe_meson_build b/graphics/mesa/patches/patch-src_gallium_frontends_lavapipe_meson_build index 9edad01..0f370d7 100644 --- a/graphics/mesa/patches/patch-src_gallium_frontends_lavapipe_meson_build +++ b/graphics/mesa/patches/patch-src_gallium_frontends_lavapipe_meson_build @@ -1,11 +1,12 @@ - Index: src/gallium/frontends/lavapipe/meson.build --- src/gallium/frontends/lavapipe/meson.build.orig +++ src/gallium/frontends/lavapipe/meson.build -@@ -57,5 +57,5 @@ liblavapipe_st = static_library( - c_args : [ lvp_flags ], +@@ -44,6 +44,6 @@ liblavapipe_st = static_library( + c_args : [ c_msvc_compat_args, lvp_flags ], gnu_symbol_visibility : 'hidden', - include_directories : [ inc_include, inc_src, inc_util, inc_gallium, inc_compiler, inc_gallium_aux, inc_vulkan_wsi ], -- dependencies : [ idep_nir, idep_mesautil, idep_vulkan_util, lvp_deps ] -+ dependencies : [ dep_xcb, idep_nir, idep_mesautil, idep_vulkan_util ] + include_directories : [ inc_include, inc_src, inc_util, inc_gallium, inc_compiler, inc_gallium_aux ], +- dependencies : [ dep_llvm, idep_nir, idep_mesautil, idep_vulkan_util, idep_vulkan_wsi, +- idep_vulkan_runtime, lvp_deps ] ++ dependencies : [ dep_xcb, dep_llvm, idep_nir, idep_mesautil, idep_vulkan_util, idep_vulkan_wsi, ++ idep_vulkan_runtime ] ) diff --git a/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c b/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c index 836b948..afb0edf 100644 --- a/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c +++ b/graphics/mesa/patches/patch-src_gbm_backends_dri_gbm_dri_c @@ -1,8 +1,7 @@ - Index: src/gbm/backends/dri/gbm_dri.c --- src/gbm/backends/dri/gbm_dri.c.orig +++ src/gbm/backends/dri/gbm_dri.c -@@ -313,7 +313,11 @@ dri_open_driver(struct gbm_dri_device *dri) +@@ -349,7 +349,11 @@ dri_open_driver(struct gbm_dri_device *dri) /* XXX: Library name differs on per platforms basis. Update this as * osx/cygwin/windows/bsd gets support for GBM.. */ diff --git a/graphics/mesa/patches/patch-src_glx_dri_common_c b/graphics/mesa/patches/patch-src_glx_dri_common_c index 03ec71a..ab08f47 100644 --- a/graphics/mesa/patches/patch-src_glx_dri_common_c +++ b/graphics/mesa/patches/patch-src_glx_dri_common_c @@ -1,9 +1,8 @@ - Index: src/glx/dri_common.c --- src/glx/dri_common.c.orig +++ src/glx/dri_common.c -@@ -74,7 +74,11 @@ dri_message(int level, const char *f, ...) - } +@@ -52,7 +52,11 @@ + #endif #ifndef GL_LIB_NAME +#ifdef __OpenBSD__ diff --git a/graphics/mesa/patches/patch-src_loader_loader_c b/graphics/mesa/patches/patch-src_loader_loader_c index 82a5702..f2839e3 100644 --- a/graphics/mesa/patches/patch-src_loader_loader_c +++ b/graphics/mesa/patches/patch-src_loader_loader_c @@ -1,8 +1,7 @@ - Index: src/loader/loader.c --- src/loader/loader.c.orig +++ src/loader/loader.c -@@ -474,7 +474,7 @@ loader_get_driver_for_fd(int fd) +@@ -543,7 +543,7 @@ loader_get_driver_for_fd(int fd) * user's problem, but this allows vc4 simulator to run on an i965 host, * and may be useful for some touch testing of i915 on an i965 host. */ @@ -11,8 +10,8 @@ Index: src/loader/loader.c driver = getenv("MESA_LOADER_DRIVER_OVERRIDE"); if (driver) return strdup(driver); -@@ -536,7 +536,7 @@ loader_open_driver(const char *driver_name, - const struct __DRIextensionRec **(*get_extensions)(void); +@@ -607,7 +607,7 @@ loader_open_driver_lib(const char *driver_name, + const char *search_paths, *next, *end; search_paths = NULL; - if (geteuid() == getuid() && search_path_vars) { diff --git a/graphics/mesa/patches/patch-src_mesa_main_execmem_c b/graphics/mesa/patches/patch-src_mesa_main_execmem_c deleted file mode 100644 index 441f637..0000000 --- a/graphics/mesa/patches/patch-src_mesa_main_execmem_c +++ /dev/null @@ -1,26 +0,0 @@ - -Index: src/mesa/main/execmem.c ---- src/mesa/main/execmem.c.orig -+++ src/mesa/main/execmem.c -@@ -37,7 +37,20 @@ - #include "c11/threads.h" - - --#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__) -+#if defined(__OpenBSD__) -+ -+void * -+_mesa_exec_malloc(GLuint size) -+{ -+ return NULL; -+} -+ -+void -+_mesa_exec_free(void *addr) -+{ -+} -+ -+#elif defined(__linux__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__) - - /* - * Allocate a large block of memory which can hold code then dole it out diff --git a/graphics/mesa/patches/patch-src_util_disk_cache_os_c b/graphics/mesa/patches/patch-src_util_disk_cache_os_c index caace62..3b2664d 100644 --- a/graphics/mesa/patches/patch-src_util_disk_cache_os_c +++ b/graphics/mesa/patches/patch-src_util_disk_cache_os_c @@ -1,8 +1,7 @@ - Index: src/util/disk_cache_os.c --- src/util/disk_cache_os.c.orig +++ src/util/disk_cache_os.c -@@ -772,6 +772,11 @@ disk_cache_generate_cache_dir(void *mem_ctx, const cha +@@ -861,6 +861,11 @@ disk_cache_generate_cache_dir(void *mem_ctx, const cha bool disk_cache_enabled() { diff --git a/graphics/mesa/patches/patch-src_util_os_file_c b/graphics/mesa/patches/patch-src_util_os_file_c index 041fa99..3655191 100644 --- a/graphics/mesa/patches/patch-src_util_os_file_c +++ b/graphics/mesa/patches/patch-src_util_os_file_c @@ -1,4 +1,3 @@ - Index: src/util/os_file.c --- src/util/os_file.c.orig +++ src/util/os_file.c @@ -11,7 +10,7 @@ Index: src/util/os_file.c static ssize_t readN(int fd, char *buf, size_t len) { -@@ -186,7 +188,6 @@ os_read_file(const char *filename, size_t *size) +@@ -191,7 +193,6 @@ os_read_file(const char *filename, size_t *size) return buf; } @@ -19,7 +18,7 @@ Index: src/util/os_file.c #include <sys/syscall.h> #include <unistd.h> -@@ -207,6 +208,13 @@ os_same_file_description(int fd1, int fd2) +@@ -212,6 +213,13 @@ os_same_file_description(int fd1, int fd2) } #else diff --git a/graphics/mesa/patches/patch-src_util_u_atomic_c b/graphics/mesa/patches/patch-src_util_u_atomic_c index a72ffd7..8c1bb55 100644 --- a/graphics/mesa/patches/patch-src_util_u_atomic_c +++ b/graphics/mesa/patches/patch-src_util_u_atomic_c @@ -1,4 +1,3 @@ - Index: src/util/u_atomic.c --- src/util/u_atomic.c.orig +++ src/util/u_atomic.c @@ -23,8 +22,8 @@ Index: src/util/u_atomic.c + static pthread_mutex_t sync_mutex = PTHREAD_MUTEX_INITIALIZER; - WEAK uint64_t -@@ -55,6 +70,32 @@ __sync_sub_and_fetch_8(uint64_t *ptr, uint64_t val) + #ifdef __clang__ +@@ -70,6 +85,32 @@ __sync_sub_and_fetch_8(uint64_t *ptr, uint64_t val) pthread_mutex_lock(&sync_mutex); *ptr -= val; r = *ptr; diff --git a/graphics/mesa/patches/patch-src_util_u_cpu_detect_c b/graphics/mesa/patches/patch-src_util_u_cpu_detect_c index 246013f..d90c6fb 100644 --- a/graphics/mesa/patches/patch-src_util_u_cpu_detect_c +++ b/graphics/mesa/patches/patch-src_util_u_cpu_detect_c @@ -1,17 +1,7 @@ - Index: src/util/u_cpu_detect.c --- src/util/u_cpu_detect.c.orig +++ src/util/u_cpu_detect.c -@@ -133,7 +133,7 @@ check_os_altivec_support(void) - int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC}; - #endif - int has_vu = 0; -- int len = sizeof (has_vu); -+ size_t len = sizeof (has_vu); - int err; - - err = sysctl(sels, 2, &has_vu, &len, NULL, 0); -@@ -212,10 +212,13 @@ check_os_altivec_support(void) +@@ -215,10 +215,13 @@ check_os_altivec_support(void) util_cpu_caps.has_altivec = 1; diff --git a/graphics/mesa/pkg/PLIST b/graphics/mesa/pkg/PLIST index b5bbd1e..9c2d22c 100644 --- a/graphics/mesa/pkg/PLIST +++ b/graphics/mesa/pkg/PLIST @@ -1,34 +1,27 @@ -include/EGL/ include/EGL/egl.h include/EGL/eglext.h include/EGL/eglextchromium.h include/EGL/eglmesaext.h include/EGL/eglplatform.h -include/GL/ include/GL/gl.h include/GL/glcorearb.h include/GL/glext.h include/GL/glx.h include/GL/glxext.h -include/GL/internal/ include/GL/internal/dri_interface.h include/GL/osmesa.h -include/GLES/ include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h -include/GLES2/ include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h -include/GLES3/ include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3ext.h include/GLES3/gl3platform.h -include/KHR/ include/KHR/khrplatform.h include/gbm.h @lib lib/libEGL.so.${LIBEGL_VERSION} @@ -40,15 +33,10 @@ include/gbm.h @lib lib/libglapi.so.${LIBglapi_VERSION} @so lib/libvulkan_intel.so @so lib/libvulkan_radeon.so -lib/modules/ -lib/modules/dri/ -@so lib/modules/dri/i915_dri.so -@so lib/modules/dri/i965_dri.so +@so lib/modules/dri/iris_dri.so @so lib/modules/dri/kms_swrast_dri.so -@so lib/modules/dri/r200_dri.so @so lib/modules/dri/r300_dri.so @so lib/modules/dri/r600_dri.so -@so lib/modules/dri/radeon_dri.so @so lib/modules/dri/radeonsi_dri.so @so lib/modules/dri/swrast_dri.so lib/pkgconfig/dri.pc @@ -60,7 +48,6 @@ lib/pkgconfig/glesv2.pc lib/pkgconfig/osmesa.pc share/drirc.d/ share/drirc.d/00-mesa-defaults.conf -share/vulkan/ -share/vulkan/icd.d/ +share/drirc.d/00-radv-defaults.conf share/vulkan/icd.d/intel_icd.x86_64.json share/vulkan/icd.d/radeon_icd.x86_64.json |