aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/mesa/package.az
blob: 7967e3d77305e133d9b2106ce18e36e501ae1f26 (plain)
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
package mesa {
	description = "open source implementations of OpenGL, OpenGL ES, Vulkan, OpenCL, and more";
	website = "https://mesa3d.org";
	anitya = 1970;
	latest = anityaFallback;

	version# = "26.2.1";
	source = remoteGitLab {
		domain = "gitlab.freedesktop.org";
		suffix = "mesa/mesa";
		ref = "mesa-"+version;
		checksum = "WZYAysQFZt8KMFAxQheKFZHarR1isgOeSw4LyfqAcmaHwXMCLiVao6eGuEuhJTJv";
	};
	patches = [ "include.patch" ];

	exec = meson {
		setup = {
			"platforms": "x11,wayland";
			"video-codecs": "all";

			"glvnd": "enabled";
			"gbm": "enabled";
			"egl": "enabled";

			"gallium-drivers": join {
				elems = [
					"asahi",     // Apple AGX
					"crocus",    // Intel legacy
					"etnaviv",   // Vivante GPU designs (mostly NXP/Marvell SoCs)
					"freedreno", // Qualcomm Adreno (all Qualcomm SoCs)
					"i915",      // Intel extra legacy
					"iris",      // new Intel (Broadwell+)
					"lima",      // ARM Mali 4xx
					"llvmpipe",  // software renderer
					"nouveau",   // Nvidia
					"panfrost",  // ARM Mali Midgard and up (T/G series)
					"r300",      // very old AMD
					"r600",      // less old AMD
					"radeonsi",  // new AMD (GCN+)
					"softpipe",  // older software renderer
					"svga",      // VMWare virtualized GPU
					"tegra",     // Nvidia Tegra SoCs
					"v3d",       // Broadcom VC5 (Raspberry Pi 4)
					"vc4",       // Broadcom VC4 (Raspberry Pi 0-3)
					"virgl",     // QEMU virtualized GPU (aka VirGL)
					"zink",      // generic OpenGL over Vulkan, experimental

					// d3d12: WSL emulated GPU (aka Dozen)
					// ethosu: accelerator
					// rocket: accelerator
				];
				sep = ",";
			};

			"vulkan-drivers": join {
				elems = [
					"amd",         // AMD (aka RADV)
					"broadcom",    // Broadcom VC5 (Raspberry Pi 4, aka V3D)
					"freedreno",   // Qualcomm Adreno (all Qualcomm SoCs)
					"intel",       // new Intel (aka ANV)
					"intel_hasvk", // Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
					"panfrost",    // ARM Mali Midgard and up (T/G series)
					"swrast",      // software renderer (aka Lavapipe)
					"virtio",      // QEMU virtualized GPU (aka VirGL)
					"imagination", // PowerVR Rogue
					"asahi",       // Apple AGX
					"gfxstream",   // Android virtualized GPU

					// nouveau: Nouveau (aka NVK), requires rust
					// microsoft-experimental: WSL virtualized GPU (aka DZN/Dozen)
					// kosmickrisp: macOS-specific
				];
				sep = ",";
			};

			"vulkan-layers": join {
				elems = [
					"device-select",
					"intel-nullhw",
					"overlay",
					"screenshot",
					"anti-lag",
					"vram-report-limit",
				];
				sep = ",";
			};

			"freedreno-kmds": "msm,virtio";
			"amdgpu-virtio": "true";
		};
	};

	inputs = [
		m4,
		python-packaging,
		python-mako,
		python-pyyaml,
		python-pycparser,
		glslang,
		spirv-llvm-translator,

		zlib,
		zstd,
		gzip,
		ncurses,
		libglvnd,
		libexpat,
		libva,
		libdrm,
		elfutils,
		bison,
		flex,
		lm_sensors,
		libconfig,
		libdisplay-info,
		wayland,
		wayland-protocols,
		libxshmfence,
		libXxf86vm,
		libXrandr,
		libxcb-keysyms,
		libpng,
		libarchive,
		kernel-headers,
	];

	runtime = [
		llvm,
		libdrm,
		elfutils,
		lm_sensors,
		libdisplay-info,
		wayland,
		libxshmfence,
		libXxf86vm,
		libXrandr,
		libxcb-keysyms,
		libpng,
	];
}