diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2021-07-03 10:13:48 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2021-07-20 07:36:39 +0000 |
commit | 22a85734ff71983126a94a1970c534a45a9e730e (patch) | |
tree | 1fead8e389fc1250a7972554b55ec810663954eb /graphics/mesa-dri/files | |
parent | 1c02555442edf5e255e65af6aa72e579987481d7 (diff) | |
download | ports-22a85734ff71983126a94a1970c534a45a9e730e.tar.gz ports-22a85734ff71983126a94a1970c534a45a9e730e.zip |
Diffstat (limited to 'graphics/mesa-dri/files')
13 files changed, 71 insertions, 252 deletions
diff --git a/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build b/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build deleted file mode 100644 index 230ca96e4901..000000000000 --- a/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build +++ /dev/null @@ -1,18 +0,0 @@ ---- src/gallium/auxiliary/meson.build.orig 2020-09-23 21:05:28 UTC -+++ src/gallium/auxiliary/meson.build -@@ -440,7 +440,6 @@ files_libgalliumvl = files( - 'vl/vl_compositor_cs.h', - 'vl/vl_csc.c', - 'vl/vl_csc.h', -- 'vl/vl_decoder.c', - 'vl/vl_decoder.h', - 'vl/vl_defines.h', - 'vl/vl_deint_filter.c', -@@ -461,7 +460,6 @@ files_libgalliumvl = files( - 'vl/vl_types.h', - 'vl/vl_vertex_buffers.c', - 'vl/vl_vertex_buffers.h', -- 'vl/vl_video_buffer.c', - 'vl/vl_video_buffer.h', - 'vl/vl_vlc.h', - 'vl/vl_zscan.c', diff --git a/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c b/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c deleted file mode 100644 index 1b55b4fa564a..000000000000 --- a/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c +++ /dev/null @@ -1,17 +0,0 @@ ---- src/gallium/auxiliary/vl/vl_stubs.c.orig 2020-09-23 21:12:53 UTC -+++ src/gallium/auxiliary/vl/vl_stubs.c -@@ -140,6 +140,14 @@ vl_create_mpeg12_decoder(struct pipe_context *pipe, - return NULL; - } - -+struct pipe_video_buffer * -+vl_video_buffer_create_as_resource(struct pipe_context *pipe, -+ const struct pipe_video_buffer *tmpl) -+{ -+ assert(0); -+ return NULL; -+} -+ - /* - * vl_zscan - */ diff --git a/graphics/mesa-dri/files/patch-meson.build b/graphics/mesa-dri/files/patch-meson.build index 32f813141864..9cad06faaead 100644 --- a/graphics/mesa-dri/files/patch-meson.build +++ b/graphics/mesa-dri/files/patch-meson.build @@ -1,42 +1,28 @@ ---- meson.build.orig 2020-10-06 07:15:26 UTC +--- meson.build.orig 2021-06-30 18:18:55 UTC +++ meson.build -@@ -1108,9 +1108,9 @@ else - endif - - # Check for GCC style atomics --dep_atomic = null_dep -+dep_atomic = cc.find_library('atomic', required : false) - --if cc.compiles('''#include <stdint.h> -+if cc.links('''#include <stdint.h> - int main() { - struct { - uint64_t *v; -@@ -1119,26 +1119,9 @@ if cc.compiles('''#include <stdint.h> - (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); - - }''', -+ dependencies : dep_atomic, - name : 'GCC atomic builtins') - pre_args += '-DUSE_GCC_ATOMIC_BUILTINS' -- -- # Not all atomic calls can be turned into lock-free instructions, in which -- # GCC will make calls into the libatomic library. Check whether we need to -- # link with -latomic. -- # -- # This can happen for 64-bit atomic operations on 32-bit architectures such -- # as ARM. -- if not cc.links('''#include <stdint.h> -- int main() { -- struct { -- uint64_t *v; -- } x; -- return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & -- (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); -- }''', -- name : 'GCC atomic builtins required -latomic') -- dep_atomic = cc.find_library('atomic') -- endif - endif - if not cc.links('''#include <stdint.h> - uint64_t v; +@@ -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_amd_vulkan_radv__device.c b/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c deleted file mode 100644 index 342ade9fd1ca..000000000000 --- a/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/amd/vulkan/radv_device.c.orig 2020-09-28 22:52:10 UTC -+++ src/amd/vulkan/radv_device.c -@@ -56,6 +56,10 @@ - #include "compiler/glsl_types.h" - #include "util/driconf.h" - -+#if DETECT_OS_FREEBSD -+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST -+#endif -+ - static struct radv_timeline_point * - radv_timeline_find_point_at_least_locked(struct radv_device *device, - struct radv_timeline *timeline, diff --git a/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c b/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c deleted file mode 100644 index df98dd775c5c..000000000000 --- a/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__rast__tri.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/gallium/drivers/llvmpipe/lp_rast_tri.c.orig 2020-09-28 22:52:10 UTC -+++ src/gallium/drivers/llvmpipe/lp_rast_tri.c -@@ -465,6 +465,11 @@ lp_rast_triangle_32_3_4(struct lp_rasterizer_task *tas - - #if defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN - -+#ifdef __clang__ -+#undef vector -+#undef pixel -+#undef bool -+#endif - #include <altivec.h> - #include "util/u_pwr8.h" - diff --git a/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c b/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c deleted file mode 100644 index d1b66fb52af0..000000000000 --- a/graphics/mesa-dri/files/patch-src_gallium_drivers_llvmpipe_lp__setup__tri.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/gallium/drivers/llvmpipe/lp_setup_tri.c.orig 2020-10-22 23:39:01 UTC -+++ src/gallium/drivers/llvmpipe/lp_setup_tri.c -@@ -47,6 +47,11 @@ - #if defined(PIPE_ARCH_SSE) - #include <emmintrin.h> - #elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN -+#ifdef __clang__ -+#undef vector -+#undef pixel -+#undef bool -+#endif - #include <altivec.h> - #include "util/u_pwr8.h" - #endif 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 new file mode 100644 index 000000000000..f68c1e1acf18 --- /dev/null +++ b/graphics/mesa-dri/files/patch-src_intel_compiler_brw__nir__lower__shader__calls.c @@ -0,0 +1,15 @@ +--- 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_intel_vulkan_anv__device.c b/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c deleted file mode 100644 index 18958115c77c..000000000000 --- a/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/intel/vulkan/anv_device.c.orig 2020-09-28 22:52:12 UTC -+++ src/intel/vulkan/anv_device.c -@@ -48,6 +48,10 @@ - - #include "genxml/gen7_pack.h" - -+#if DETECT_OS_FREEBSD -+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST -+#endif -+ - static const char anv_dri_options_xml[] = - DRI_CONF_BEGIN - DRI_CONF_SECTION_PERFORMANCE 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 index 14ef872d46f4..000000000000 --- 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_build__id.c b/graphics/mesa-dri/files/patch-src_util_build__id.c deleted file mode 100644 index 4b7b69d6b8ee..000000000000 --- a/graphics/mesa-dri/files/patch-src_util_build__id.c +++ /dev/null @@ -1,15 +0,0 @@ -# Elf_ doesn't exist, use Elf32_ or Elf64_ -# ---- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC -+++ src/util/build_id.c -@@ -38,6 +38,10 @@ - #define ElfW(type) Elf_##type - #endif - -+#if defined(__FreeBSD__) && __FreeBSD__ < 12 -+typedef Elf_Note Elf_Nhdr; -+#endif -+ - struct build_id_note { - ElfW(Nhdr) nhdr; - diff --git a/graphics/mesa-dri/files/patch-src_util_os__file.c b/graphics/mesa-dri/files/patch-src_util_os__file.c index 5003fd740c2a..fce8aaa4bcd9 100644 --- a/graphics/mesa-dri/files/patch-src_util_os__file.c +++ b/graphics/mesa-dri/files/patch-src_util_os__file.c @@ -1,50 +1,11 @@ ---- src/util/os_file.c.orig 2020-10-05 09:57:28 UTC +--- src/util/os_file.c.orig 2021-06-30 18:18:56 UTC +++ src/util/os_file.c -@@ -80,7 +80,7 @@ os_dupfd_cloexec(int fd) - #endif - - --#if DETECT_OS_LINUX -+#if DETECT_OS_LINUX || DETECT_OS_FREEBSD - - #include <fcntl.h> - #include <sys/stat.h> -@@ -93,7 +93,11 @@ os_dupfd_cloexec(int fd) +@@ -89,7 +89,7 @@ typedef ptrdiff_t ssize_t; static ssize_t readN(int fd, char *buf, size_t len) { -+#if DETECT_OS_LINUX - int err = -ENODATA; -+#elif DETECT_OS_FREEBSD +- int err = -ENODATA; + int err = -1; -+#endif size_t total = 0; do { ssize_t ret = read(fd, buf + total, len - total); -@@ -185,6 +189,7 @@ os_read_file(const char *filename, size_t *size) - return buf; - } - -+#if DETECT_OS_LINUX - int - os_same_file_description(int fd1, int fd2) - { -@@ -196,6 +201,18 @@ os_same_file_description(int fd1, int fd2) - - return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2); - } -+#else -+int -+os_same_file_description(int fd1, int fd2) -+{ -+ /* Same file descriptor trivially implies same file description */ -+ if (fd1 == fd2) -+ return 0; -+ -+ /* Otherwise we can't tell */ -+ return -1; -+} -+#endif - - #else - diff --git a/graphics/mesa-dri/files/patch-src_util_os__misc.c b/graphics/mesa-dri/files/patch-src_util_os__misc.c deleted file mode 100644 index 425a0c2d3fb8..000000000000 --- a/graphics/mesa-dri/files/patch-src_util_os__misc.c +++ /dev/null @@ -1,26 +0,0 @@ ---- src/util/os_misc.c.orig 2020-09-28 22:52:13 UTC -+++ src/util/os_misc.c -@@ -58,7 +58,7 @@ - # include <log/log.h> - #elif DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || DETECT_OS_HURD - # include <unistd.h> --#elif DETECT_OS_OPENBSD -+#elif DETECT_OS_OPENBSD || DETECT_OS_FREEBSD - # include <sys/resource.h> - # include <sys/sysctl.h> - #elif DETECT_OS_APPLE || DETECT_OS_BSD -@@ -213,9 +213,13 @@ os_get_available_system_memory(uint64_t *size) - - free(meminfo); - return false; --#elif DETECT_OS_OPENBSD -+#elif defined(DETECT_OS_OPENBSD) || defined(DETECT_OS_FREEBSD) - struct rlimit rl; -+#if DETECT_OS_OPENBSD - int mib[] = { CTL_HW, HW_USERMEM64 }; -+#elif DETECT_OS_FREEBSD -+ int mib[] = { CTL_HW, HW_USERMEM }; -+#endif - int64_t mem_available; - size_t len = sizeof(mem_available); - diff --git a/graphics/mesa-dri/files/patch-src_util_u__process.c b/graphics/mesa-dri/files/patch-src_util_u__process.c index 540eda348cdb..542b48ca8633 100644 --- a/graphics/mesa-dri/files/patch-src_util_u__process.c +++ b/graphics/mesa-dri/files/patch-src_util_u__process.c @@ -1,29 +1,27 @@ ---- src/util/u_process.c.orig 2020-10-05 09:53:46 UTC +--- src/util/u_process.c.orig 2021-06-30 18:18:56 UTC +++ src/util/u_process.c -@@ -44,6 +44,11 @@ - #include <mach-o/dyld.h> - #endif - -+#if DETECT_OS_FREEBSD -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#endif -+ - #if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME) - - static char *path = NULL; -@@ -175,6 +180,14 @@ util_get_process_exec_path(char* process_path, size_t - int result = _NSGetExecutablePath(process_path, &bufSize); - - return (result == 0) ? strlen(process_path) : 0; -+#elif DETECT_OS_FREEBSD -+ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; -+ size_t read_len = len; -+ -+ (void) sysctl(mib, 4, process_path, &read_len, NULL, 0); -+ process_path[len - 1] = '\0'; -+ -+ return read_len; - #elif DETECT_OS_UNIX - ssize_t r; - +@@ -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 <osreldate.h> +-# 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 <sys/param.h> + # 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() */ |