forked from raspberrypi/rpi-imager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildroot-mesa3d-pi5.patch
150 lines (149 loc) · 5.94 KB
/
buildroot-mesa3d-pi5.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
diff -urN buildroot/package/mesa3d.orig/0004-Fix-uClibc-build.patch buildroot/package/mesa3d/0004-Fix-uClibc-build.patch
--- buildroot/package/mesa3d.orig/0004-Fix-uClibc-build.patch 2023-10-01 23:05:28.000000000 +0200
+++ buildroot/package/mesa3d/0004-Fix-uClibc-build.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,69 +0,0 @@
-From 09ce52fe375a6fc1ccf51b6b691aaa2c3f53fbd5 Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <[email protected]>
-Date: Fri, 3 Jun 2022 16:26:03 +0200
-Subject: [PATCH] Fix uClibc build
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes build errors with uClibc and gcc-9.3.0:
-
-../src/gallium/drivers/lima/lima_texture.c:47:15: error: expected
- declaration specifiers or ‘...’ before ‘__builtin_offsetof’
- 47 | static_assert(offsetof(lima_tex_desc, va) == 24,
- "lima_tex_desc->va offset isn't 24");
-
-../src/egl/main/egldisplay.c: In function ‘_eglGetNativePlatformFromEnv’:
- ../src/egl/main/egldisplay.c:101:4: error: implicit declaration of
- function ‘static_assert’ [-Werror=implicit-function-declaration] 101 |
- static_assert(ARRAY_SIZE(egl_platforms) == _EGL_NUM_PLATFORMS,
-
-../src/util/macros.h:74:4: error: implicit declaration of function
- ‘static_assert’ [-Werror=implicit-function-declaration]
- 74 | static_assert(cond, #cond); \
- | ^~~~~~~~~~~~~
-
-Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13898
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- src/util/compiler.h | 10 ++++++++++
- src/util/macros.h | 1 +
- 2 files changed, 11 insertions(+)
-
-diff --git a/src/util/compiler.h b/src/util/compiler.h
-index d184ad455af..b5c56807acc 100644
---- a/src/util/compiler.h
-+++ b/src/util/compiler.h
-@@ -36,6 +36,16 @@
-
- #include <assert.h>
-
-+/*
-+ * C11 static_assert() macro
-+ * assert.h only defines that name for C11 and above
-+ */
-+#if !defined(__cplusplus)
-+#ifndef static_assert
-+#define static_assert _Static_assert
-+#endif
-+#endif
-+
- #include "util/macros.h"
-
-
-diff --git a/src/util/macros.h b/src/util/macros.h
-index 22b18303826..8f73ee72693 100644
---- a/src/util/macros.h
-+++ b/src/util/macros.h
-@@ -27,6 +27,7 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <stdio.h>
-+#include "util/compiler.h"
-
- /* Compute the size of an array */
- #ifndef ARRAY_SIZE
---
-2.34.1
-
diff -urN buildroot/package/mesa3d.orig/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch buildroot/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch
--- buildroot/package/mesa3d.orig/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch 2023-10-01 23:05:28.000000000 +0200
+++ buildroot/package/mesa3d/0006-meson-ensure-i915-Gallium-driver-includes-Intel-sour.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
-From cd861b7f38e448822ce765aee61304d1e0a3a8b5 Mon Sep 17 00:00:00 2001
-From: James Knight <[email protected]>
-Date: Thu, 13 Apr 2023 16:38:51 -0400
-Subject: meson: ensure i915 Gallium driver includes Intel sources
-
-Ensure builds flag the use of Intel sources when the i915 Gallium driver
-is configured (`-Dgallium-drivers=i915`). Otherwise, a build may fail if
-other Intel-based configuration options are not enabled:
-
- ./src/gallium/winsys/i915/drm/meson.build:21:0: ERROR: Unknown variable "libintel_common".
-
-Signed-off-by: James Knight <[email protected]>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22490>
-
-Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/commit/cd861b7f38e448822ce765aee61304d1e0a3a8b5
-
-Signed-off-by: Bernd Kuhls <[email protected]>
----
- meson.build | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-(limited to 'meson.build')
-
-diff --git a/meson.build b/meson.build
-index 23d2d965b37..a3e3c5478a8 100644
---- a/meson.build
-+++ b/meson.build
-@@ -245,7 +245,14 @@ with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
- with_any_vk = _vulkan_drivers.length() != 0
-
- with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk
--with_any_intel = with_intel_vk or with_intel_hasvk or with_gallium_iris or with_gallium_crocus or with_intel_tools
-+with_any_intel = [
-+ with_gallium_crocus,
-+ with_gallium_i915,
-+ with_gallium_iris,
-+ with_intel_hasvk,
-+ with_intel_tools,
-+ with_intel_vk,
-+].contains(true)
-
- if with_swrast_vk and not with_gallium_softpipe
- error('swrast vulkan requires gallium swrast')
---
-cgit v1.2.1
-
diff -urN buildroot/package/mesa3d.orig/mesa3d.hash buildroot/package/mesa3d/mesa3d.hash
--- buildroot/package/mesa3d.orig/mesa3d.hash 2023-10-01 23:05:28.000000000 +0200
+++ buildroot/package/mesa3d/mesa3d.hash 1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2023-September/000730.html
-sha256 45434ff91a709844130a3174d9c0ef39c6b50725b2bb0c13e736f36134db14ad mesa-23.1.8.tar.xz
-sha512 02dc6f8b10dd3827a2b62fba3035726b1b60ec0c3188817deea2ad14f80f332a37272e9f15c5f653f20cecb14f8ff91697d73c89afc83674c19b686a674b677d mesa-23.1.8.tar.xz
-# License
-sha256 a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75 docs/license.rst
diff -urN buildroot/package/mesa3d.orig/mesa3d.mk buildroot/package/mesa3d/mesa3d.mk
--- buildroot/package/mesa3d.orig/mesa3d.mk 2023-10-01 23:05:28.000000000 +0200
+++ buildroot/package/mesa3d/mesa3d.mk 2023-10-16 22:07:23.863228341 +0200
@@ -4,10 +4,10 @@
#
################################################################################
-# When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 23.1.8
-MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
-MESA3D_SITE = https://archive.mesa3d.org
+# gitid that has Pi 5 support
+MESA3D_VERSION = cba898a53059b12b948fba7c69634a033c6dccad
+MESA3D_SITE = https://gitlab.freedesktop.org/mesa/mesa.git
+MESA3D_SITE_METHOD = git
MESA3D_LICENSE = MIT, SGI, Khronos
MESA3D_LICENSE_FILES = docs/license.rst
MESA3D_CPE_ID_VENDOR = mesa3d