mesa: 25.0.5 -> 25.1.1 (#399388)

authored by K900 and committed by GitHub c3cbafb1 8a07db95

+26 -207
+2 -2
pkgs/development/libraries/mesa/common.nix
··· 5 5 # nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa 6 6 rec { 7 7 pname = "mesa"; 8 - version = "25.0.6"; 8 + version = "25.1.1"; 9 9 10 10 src = fetchFromGitLab { 11 11 domain = "gitlab.freedesktop.org"; 12 12 owner = "mesa"; 13 13 repo = "mesa"; 14 14 rev = "mesa-${version}"; 15 - hash = "sha256-SuSs8rwcu3GizOFfoUQZkVfwS1gxihgnmIGnD90YS54="; 15 + hash = "sha256-Vk5sE7D8XHDOtxq0ax2a3FmQFWp7IDP4Y510EpnKWo4="; 16 16 }; 17 17 18 18 meta = {
+22 -8
pkgs/development/libraries/mesa/default.nix
··· 16 16 libdrm, 17 17 libgbm, 18 18 libglvnd, 19 + libpng, 19 20 libunwind, 20 21 libva-minimal, 21 22 libvdpau, ··· 45 46 46 47 galliumDrivers ? 47 48 [ 49 + "asahi" # Apple AGX, built on non-aarch64 for cross tools 48 50 "d3d12" # WSL emulated GPU (aka Dozen) 49 51 "iris" # new Intel (Broadwell+) 50 52 "llvmpipe" # software renderer 51 53 "nouveau" # Nvidia 54 + "panfrost" # ARM Mali Midgard and up (T/G series), built on non-ARM for cross tools 52 55 "r300" # very old AMD 53 56 "r600" # less old AMD 54 57 "radeonsi" # new AMD (GCN+) ··· 61 64 "etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs) 62 65 "freedreno" # Qualcomm Adreno (all Qualcomm SoCs) 63 66 "lima" # ARM Mali 4xx 64 - "panfrost" # ARM Mali Midgard and up (T/G series) 65 67 "vc4" # Broadcom VC4 (Raspberry Pi 0-3) 66 68 ] 67 69 ++ lib.optionals stdenv.hostPlatform.isAarch64 [ ··· 75 77 vulkanDrivers ? 76 78 [ 77 79 "amd" # AMD (aka RADV) 80 + "asahi" # Apple AGX, built on non-aarch64 for cross tools 78 81 "intel" # new Intel (aka ANV) 79 82 "microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen) 80 83 "nouveau" # Nouveau (aka NVK) ··· 103 106 ], 104 107 vulkanLayers ? [ 105 108 "device-select" 109 + "intel-nullhw" 106 110 "overlay" 107 - "intel-nullhw" 111 + "screenshot" 112 + "vram-report-limit" 108 113 ], 109 114 mesa, 110 115 mesa-gl-headers, ··· 161 166 162 167 patches = [ 163 168 ./opencl.patch 164 - ./system-gbm.patch 165 169 ]; 166 170 167 171 postPatch = '' ··· 223 227 (lib.mesonBool "libgbm-external" true) 224 228 225 229 (lib.mesonBool "gallium-nine" false) # Direct3D9 in Wine, largely supplanted by DXVK 226 - (lib.mesonBool "osmesa" false) # deprecated upstream 227 230 228 231 # Only used by xf86-video-vmware, which has more features than VMWare's KMS driver, 229 232 # so we're keeping it for now. Should be removed when that's no longer the case. ··· 245 248 246 249 # Rusticl, new OpenCL frontend 247 250 (lib.mesonBool "gallium-rusticl" true) 251 + (lib.mesonOption "gallium-rusticl-enable-drivers" "auto") 248 252 249 253 # meson auto_features enables this, but we do not want it 250 254 (lib.mesonEnable "android-libbacktrace" false) 251 255 (lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) 252 256 253 - # Build and install extra tools for cross 254 - (lib.mesonBool "install-mesa-clc" true) 255 - (lib.mesonBool "install-precomp-compiler" true) 257 + # Enable more sensors in gallium-hud 258 + (lib.mesonBool "gallium-extra-hud" true) 256 259 257 260 # Disable valgrind on targets where it's not available 258 261 (lib.mesonEnable "valgrind" withValgrind) 259 262 ] 260 263 ++ lib.optionals enablePatentEncumberedCodecs [ 261 264 (lib.mesonOption "video-codecs" "all") 265 + ] 266 + ++ lib.optionals (!needNativeCLC) [ 267 + # Build and install extra tools for cross 268 + (lib.mesonOption "tools" "asahi,panfrost") 269 + (lib.mesonBool "install-mesa-clc" true) 270 + (lib.mesonBool "install-precomp-compiler" true) 262 271 ] 263 272 ++ lib.optionals needNativeCLC [ 264 273 (lib.mesonOption "mesa-clc" "system") ··· 277 286 libdrm 278 287 libgbm 279 288 libglvnd 289 + libpng 280 290 libunwind 281 291 libva-minimal 282 292 libvdpau ··· 348 358 doCheck = false; 349 359 350 360 postInstall = '' 361 + moveToOutput bin/asahi_clc $cross_tools 351 362 moveToOutput bin/intel_clc $cross_tools 352 363 moveToOutput bin/mesa_clc $cross_tools 353 - moveToOutput bin/vtn_bindgen $cross_tools 364 + moveToOutput bin/panfrost_compile $cross_tools 365 + moveToOutput bin/panfrost_texfeatures $cross_tools 366 + moveToOutput bin/panfrostdump $cross_tools 367 + moveToOutput bin/vtn_bindgen2 $cross_tools 354 368 355 369 moveToOutput "lib/lib*OpenCL*" $opencl 356 370 # Construct our own .icd file that contains an absolute path.
+2 -2
pkgs/development/libraries/mesa/opencl.patch
··· 13 13 14 14 diff --git a/meson_options.txt b/meson_options.txt 15 15 index 82324617884..4bde97a8568 100644 16 - --- a/meson_options.txt 17 - +++ b/meson_options.txt 16 + --- a/meson.options 17 + +++ b/meson.options 18 18 @@ -738,3 +738,10 @@ option( 19 19 'none', 'dri2' 20 20 ],
-195
pkgs/development/libraries/mesa/system-gbm.patch
··· 1 - commit 69914d79c3d86b0aee80665c51074cf8cc55f660 2 - Author: K900 <me@0upti.me> 3 - Date: 2025-03-05 13:14:02 +0300 4 - 5 - meson: support building with system libgbm 6 - 7 - This is the next step towards making libgbm just a loader. 8 - 9 - diff --git a/meson.build b/meson.build 10 - index 4766ce838ba..300a6bb0cc8 100644 11 - --- a/meson.build 12 - +++ b/meson.build 13 - @@ -2377,7 +2377,7 @@ summary(egl_summary, section: 'EGL', bool_yn: true, list_sep: ' ') 14 - 15 - gbm_summary = {'Enabled': with_gbm} 16 - if with_gbm 17 - - gbm_summary += {'Backends path': gbm_backends_path} 18 - + gbm_summary += {'External libgbm': get_option('libgbm-external'), 'Backends path': gbm_backends_path} 19 - endif 20 - summary(gbm_summary, section: 'GBM', bool_yn: true, list_sep: ' ') 21 - 22 - diff --git a/meson_options.txt b/meson_options.txt 23 - index 2622cf1d235..7bf8ae8a1c5 100644 24 - --- a/meson_options.txt 25 - +++ b/meson_options.txt 26 - @@ -329,6 +329,13 @@ option( 27 - description : 'Build support for gbm platform' 28 - ) 29 - 30 - +option( 31 - + 'libgbm-external', 32 - + type: 'boolean', 33 - + value: false, 34 - + description: 'Whether to use external libgbm (default: use in-tree copy)' 35 - +) 36 - + 37 - option( 38 - 'gbm-backends-path', 39 - type : 'string', 40 - diff --git a/src/egl/meson.build b/src/egl/meson.build 41 - index a02b83419c4..ae4b0c5e063 100644 42 - --- a/src/egl/meson.build 43 - +++ b/src/egl/meson.build 44 - @@ -108,9 +108,8 @@ if with_dri 45 - endif 46 - if with_gbm and not with_platform_android 47 - files_egl += files('drivers/dri2/platform_drm.c') 48 - - link_for_egl += libgbm 49 - - incs_for_egl += [inc_gbm, include_directories('../gbm/main')] 50 - - deps_for_egl += dep_libdrm 51 - + incs_for_egl += [include_directories('../gbm/backends/dri')] 52 - + deps_for_egl += [dep_libdrm, dep_gbm] 53 - endif 54 - if with_platform_wayland 55 - deps_for_egl += [dep_wayland_client, dep_wayland_server, dep_wayland_egl_headers] 56 - diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c 57 - index 339e9376c3d..f1a0bb18ed8 100644 58 - --- a/src/gallium/targets/dril/dril_target.c 59 - +++ b/src/gallium/targets/dril/dril_target.c 60 - @@ -25,7 +25,7 @@ 61 - #include <dlfcn.h> 62 - #include <EGL/egl.h> 63 - #include <EGL/eglext.h> 64 - -#include "gbm/main/gbm.h" 65 - +#include <gbm.h> 66 - #include "drm-uapi/drm_fourcc.h" 67 - 68 - #define EGL_PLATFORM_GBM_MESA 0x31D7 69 - diff --git a/src/gallium/targets/dril/meson.build b/src/gallium/targets/dril/meson.build 70 - index 7cfa982ffe1..22b955b9074 100644 71 - --- a/src/gallium/targets/dril/meson.build 72 - +++ b/src/gallium/targets/dril/meson.build 73 - @@ -51,10 +51,10 @@ dril_dri = shared_library( 74 - link_depends : dril_link_depends, 75 - link_with : [ 76 - libgallium, 77 - - libgbm, 78 - ], 79 - dependencies : [ 80 - idep_mesautil, 81 - + dep_gbm, 82 - ], 83 - # Will be deleted during installation, see install_megadrivers.py 84 - install : true, 85 - diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c 86 - index a51e3cb3b8d..f1a5e0f7649 100644 87 - --- a/src/gbm/backends/dri/gbm_dri.c 88 - +++ b/src/gbm/backends/dri/gbm_dri.c 89 - @@ -43,7 +43,7 @@ 90 - 91 - #include "mesa_interface.h" 92 - #include "gbm_driint.h" 93 - -#include "gbmint.h" 94 - +#include <gbm_backend_abi.h> 95 - #include "loader_dri_helper.h" 96 - #include "kopper_interface.h" 97 - #include "loader.h" 98 - diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h 99 - index 9b324aeaf12..9c7588e5726 100644 100 - --- a/src/gbm/backends/dri/gbm_driint.h 101 - +++ b/src/gbm/backends/dri/gbm_driint.h 102 - @@ -31,7 +31,7 @@ 103 - #include <xf86drm.h> 104 - #include <string.h> 105 - #include <sys/mman.h> 106 - -#include "gbmint.h" 107 - +#include <gbm_backend_abi.h> 108 - #include "c11/threads.h" 109 - 110 - #include <GL/gl.h> /* mesa_interface needs GL types */ 111 - diff --git a/src/gbm/backends/dri/meson.build b/src/gbm/backends/dri/meson.build 112 - index 9b5d13e9db8..84a40656980 100644 113 - --- a/src/gbm/backends/dri/meson.build 114 - +++ b/src/gbm/backends/dri/meson.build 115 - @@ -11,10 +11,10 @@ endif 116 - shared_library( 117 - 'dri_gbm', 118 - files('gbm_dri.c', 'gbm_driint.h'), 119 - - include_directories : [incs_gbm, incs_gbm_dri, inc_st_dri, inc_gallium_aux], 120 - + include_directories : [inc_gallium, incs_gbm_dri, inc_loader, inc_st_dri, inc_gallium_aux], 121 - link_args : [ld_args_gc_sections], 122 - link_with : [libloader, libgallium_dri], 123 - - dependencies : [deps_gbm_dri, dep_dl, dep_libdrm, idep_mesautil, idep_xmlconfig], 124 - + dependencies : [deps_gbm_dri, dep_dl, dep_gbm, dep_libdrm, idep_mesautil, idep_xmlconfig], 125 - gnu_symbol_visibility : 'hidden', 126 - install : true, 127 - install_dir: join_paths(get_option('libdir'), 'gbm'), 128 - diff --git a/src/gbm/meson.build b/src/gbm/meson.build 129 - index eaed028d049..97e8d5fa044 100644 130 - --- a/src/gbm/meson.build 131 - +++ b/src/gbm/meson.build 132 - @@ -15,10 +15,6 @@ args_gbm = [ 133 - ] 134 - incs_gbm = [include_directories('main'), inc_loader, inc_gallium] 135 - 136 - -if with_dri2 137 - - subdir('backends/dri') 138 - -endif 139 - - 140 - libgbm_name = 'gbm' 141 - 142 - if with_platform_android and get_option('platform-sdk-version') >= 30 143 - @@ -43,7 +39,7 @@ if with_tests 144 - test('gbm-abi-check', abi_check, suite : ['gbm']) 145 - endif 146 - 147 - -install_headers('main/gbm.h') 148 - +install_headers('main/gbm.h', 'main/gbm_backend_abi.h') 149 - 150 - pkg.generate( 151 - name : 'gbm', 152 - @@ -67,3 +63,8 @@ if with_symbols_check 153 - suite : ['gbm'], 154 - ) 155 - endif 156 - + 157 - +dep_gbm = declare_dependency( 158 - + link_with : libgbm, 159 - + include_directories : inc_gbm, 160 - +) 161 - diff --git a/src/meson.build b/src/meson.build 162 - index d443d2b41bb..74250ed2148 100644 163 - --- a/src/meson.build 164 - +++ b/src/meson.build 165 - @@ -127,11 +127,17 @@ endif 166 - if with_glx == 'dri' 167 - subdir('glx') 168 - endif 169 - + 170 - if with_gbm 171 - - subdir('gbm') 172 - + if get_option('libgbm-external') 173 - + dep_gbm = dependency('gbm') 174 - + else 175 - + subdir('gbm') 176 - + endif 177 - else 178 - - inc_gbm = [] 179 - + dep_gbm = null_dep 180 - endif 181 - + 182 - if with_egl 183 - subdir('egl') 184 - endif 185 - @@ -141,6 +147,10 @@ if with_gallium and with_gbm 186 - endif 187 - endif 188 - 189 - +if with_gbm and with_dri2 190 - + subdir('gbm/backends/dri') 191 - +endif 192 - + 193 - # This must be after at least mesa, glx, and gallium, since libgl will be 194 - # defined in one of those subdirs depending on the glx provider. 195 - if with_glx != 'disabled' and not with_glvnd