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 /graphics/mesa/patches | |
parent | 50ce144bd7021faa6d76d6906ae0c4fd3e1b7258 (diff) |
graphics/mesa: tentative update to verson 22.1.7
not tested yet
Diffstat (limited to 'graphics/mesa/patches')
10 files changed, 28 insertions, 89 deletions
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; |