View | Details | Raw Unified | Return to bug 227685 | Differences between
and this patch

Collapse All | Expand All

(-)graphics/mesa-dri/Makefile.common (-1 / +1 lines)
Lines 14-20 Link Here
14
MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
14
MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
15
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
15
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
16
16
17
MESABASEVERSION=	18.0.4
17
MESABASEVERSION=	18.1.0
18
# if there is a subversion, don't include the '-' between 7.11-rc2.
18
# if there is a subversion, don't include the '-' between 7.11-rc2.
19
MESASUBVERSION=
19
MESASUBVERSION=
20
20
(-)graphics/mesa-dri/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1526581104
1
TIMESTAMP = 1526720775
2
SHA256 (mesa-18.0.4.tar.xz) = 1f3bcfe7cef0a5c20dae2b41df5d7e0a985e06be0183fa4d43b6068fcba2920f
2
SHA256 (mesa-18.1.0.tar.xz) = c855c5b67ef993b7621f76d8b120769ec0415f1c3616eaff44ef7f7f300aceba
3
SIZE (mesa-18.0.4.tar.xz) = 10939356
3
SIZE (mesa-18.1.0.tar.xz) = 11118776
(-)graphics/mesa-dri/files/patch-src_gallium_auxiliary_util_u__cpu__detect.c (+70 lines)
Line 0 Link Here
1
Assume NEON if targeting NEON-capable hardware, detect otherwise
2
Don't rely on SIGILL but use sysctl to detect AltiVec on powerpc*
3
4
--- src/gallium/auxiliary/util/u_cpu_detect.c.orig	2017-10-02 15:49:02 UTC
5
+++ src/gallium/auxiliary/util/u_cpu_detect.c
6
@@ -53,8 +53,9 @@
7
 #endif
8
 
9
 #if defined(PIPE_OS_FREEBSD) || defined(PIPE_OS_DRAGONFLY)
10
-#include <sys/types.h>
11
+#include <sys/param.h>
12
 #include <sys/sysctl.h>
13
+#include <elf.h>
14
 #endif
15
 
16
 #if defined(PIPE_OS_LINUX)
17
@@ -112,13 +113,21 @@ sigill_handler(int sig)
18
 static void
19
 check_os_altivec_support(void)
20
 {
21
+#if defined(PIPE_OS_APPLE) || defined(PIPE_OS_FREEBSD) || defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD)
22
 #if defined(PIPE_OS_APPLE)
23
    int sels[2] = {CTL_HW, HW_VECTORUNIT};
24
+#elif defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD)
25
+   int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
26
+#endif
27
    int has_vu = 0;
28
    int len = sizeof (has_vu);
29
    int err;
30
 
31
+#if defined(PIPE_OS_FREEBSD)
32
+   err = sysctlbyname("hw.altivec", &has_vu, &len, NULL, 0 );
33
+#else
34
    err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
35
+#endif
36
 
37
    if (err == 0) {
38
       if (has_vu != 0) {
39
@@ -311,13 +320,30 @@ check_os_arm_support(void)
40
     * used. Because of this we cannot use PIPE_OS_ANDROID here, but rather
41
     * have a separate macro that only gets enabled from respective Android.mk.
42
     */
43
-#if defined(HAS_ANDROID_CPUFEATURES)
44
+#if defined(__ARM_NEON)
45
+   util_cpu_caps.has_neon = 1;
46
+#elif defined(HAS_ANDROID_CPUFEATURES)
47
    AndroidCpuFamily cpu_family = android_getCpuFamily();
48
    uint64_t cpu_features = android_getCpuFeatures();
49
 
50
    if (cpu_family == ANDROID_CPU_FAMILY_ARM) {
51
       if (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON)
52
          util_cpu_caps.has_neon = 1;
53
+   }
54
+#elif defined(PIPE_OS_FREEBSD) && defined(HWCAP_NEON)
55
+   Elf_Auxinfo auxv[AT_COUNT];
56
+   size_t len = sizeof(auxv);
57
+   int mib[] = {
58
+      CTL_KERN,
59
+      KERN_PROC,
60
+      KERN_PROC_AUXV,
61
+      getpid(),
62
+   };
63
+
64
+   if (sysctl(mib, nitems(mib), auxv, &len, NULL, 0) != -1) {
65
+      for (size_t i = 0; i < nitems(auxv); i++)
66
+         if (auxv[i].a_type == AT_HWCAP && auxv[i].a_un.a_val & HWCAP_NEON)
67
+             util_cpu_caps.has_neon = 1;
68
    }
69
 #elif defined(PIPE_OS_LINUX)
70
     Elf32_auxv_t aux;
(-)graphics/mesa-dri/files/patch-src_gallium_auxiliary_util_u__network.c (-11 lines)
Lines 1-11 Link Here
1
--- src/gallium/auxiliary/util/u_network.c.orig	2018-01-23 18:08:49 UTC
2
+++ src/gallium/auxiliary/util/u_network.c
3
@@ -9,7 +9,7 @@
4
 #  include <winsock2.h>
5
 #  include <windows.h>
6
 #  include <ws2tcpip.h>
7
-#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \
8
+#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_HAIKU) || \
9
    defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS)
10
 #  include <sys/socket.h>
11
 #  include <netinet/in.h>
(-)graphics/mesa-dri/files/patch-src_gallium_drivers_freedreno_freedreno__screen.c (+30 lines)
Line 0 Link Here
1
- Without sysinfo() fall back to sysconf()
2
3
--- src/gallium/drivers/freedreno/freedreno_screen.c.orig	2018-04-21 05:48:24 UTC
4
+++ src/gallium/drivers/freedreno/freedreno_screen.c
5
@@ -43,7 +43,11 @@
6
 #include <errno.h>
7
 #include <stdio.h>
8
 #include <stdlib.h>
9
+#ifdef __GLIBC__
10
 #include <sys/sysinfo.h>
11
+#else
12
+#include <unistd.h>
13
+#endif
14
 
15
 #include "freedreno_screen.h"
16
 #include "freedreno_resource.h"
17
@@ -837,9 +841,13 @@ fd_screen_create(struct fd_device *dev)
18
 		screen->priority_mask = (1 << val) - 1;
19
 	}
20
 
21
+#ifdef __GLIBC__
22
 	struct sysinfo si;
23
 	sysinfo(&si);
24
 	screen->ram_size = si.totalram;
25
+#else
26
+	screen->ram_size = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGE_SIZE);
27
+#endif
28
 
29
 	DBG("Pipe Info:");
30
 	DBG(" GPU-id:          %d", screen->gpu_id);
(-)graphics/mesa-dri/files/patch-src_util_os__time.c (-10 / +1 lines)
Lines 1-16 Link Here
1
- Use monotonic clock for timeouts
1
- Use monotonic clock for timeouts
2
2
3
--- src/util/os_time.c.orig	2018-01-23 18:08:50 UTC
3
--- src/util/os_time.c.orig	2018-04-21 05:48:25 UTC
4
+++ src/util/os_time.c
4
+++ src/util/os_time.c
5
@@ -55,7 +55,7 @@
6
 int64_t
7
 os_time_get_nano(void)
8
 {
9
-#if defined(PIPE_OS_LINUX)
10
+#if defined(PIPE_OS_BSD) || defined(PIPE_OS_LINUX)
11
 
12
    struct timespec tv;
13
    clock_gettime(CLOCK_MONOTONIC, &tv);
14
@@ -95,7 +95,7 @@ os_time_get_nano(void)
5
@@ -95,7 +95,7 @@ os_time_get_nano(void)
15
 void
6
 void
16
 os_time_sleep(int64_t usecs)
7
 os_time_sleep(int64_t usecs)

Return to bug 227685