-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
bump(main/mesa): 25.2.4 #26528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+226
−42
Merged
bump(main/mesa): 25.2.4 #26528
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
packages/mesa/0015-fix-detection-memfd_create-getrandom.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| From 42a78a1aae19f855b049462d7714cd1f07ca12e4 Mon Sep 17 00:00:00 2001 | ||
| From: Fafa Kitten <tacokoneko@gmail.com> | ||
| Date: Tue, 30 Sep 2025 01:42:57 -0500 | ||
| Subject: [PATCH] meson: detect `memfd_create()` and `getrandom()` from | ||
| headers, not system libraries | ||
|
|
||
| When compiling Mesa on Android targeting Android, under some conditions `memfd_create()` and `getrandom()` are detected as available when they are not, so they should not be assumed to be available unless they are detected by Meson as available in the appropriate header passed in the `prefix` argument to Meson's `has_function()` method. | ||
|
|
||
| `memfd_create()` is not available unless the target Android API level is 30 (Android 11) or higher and the define `_GNU_SOURCE` (which in turn sets the define `__USE_GNU`) is set, and Mesa does set `_GNU_SOURCE`, so by setting `args: pre_args` in the appropriate call to `has_function()` (which causes `-D_GNU_SOURCE` to be added to the arguments used by Meson to check the header only if it was detected as necessary for `pre_args` in the earlier condition), `memfd_create()` will be correctly detected as available when targeting (only) Android 11 or newer (and other operating systems that support `memfd_create()`) after this PR, | ||
|
|
||
| and `getrandom()` is not available unless the target Android API level is 28 (Android 9) or higher, so `getrandom()` will be detected as available when targeting (only) Android 9 or newer (and other operating systems that support `getrandom()`) after this PR. | ||
|
|
||
| Related information: | ||
|
|
||
| https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/mman.h#186 | ||
|
|
||
| https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/random.h#55 | ||
|
|
||
| https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/cdefs.h#182 | ||
|
|
||
| https://gitlab.freedesktop.org/mesa/mesa/-/blob/927f65caf359a2e0dda87dd5167fe18d153a9a32/meson.build#L1074 | ||
|
|
||
| https://github.com/mesonbuild/meson/blob/cab3b67cfe04d0e06d4e7c2f50fb4f99cd0dd7eb/docs/markdown/Compiler-properties.md#does-a-function-exist | ||
|
|
||
| Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13566 | ||
| Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37630> | ||
| --- | ||
| meson.build | 6 +++--- | ||
| 1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
|
||
| diff --git a/meson.build b/meson.build | ||
| index 4d0cf1714f234..dab44ad805786 100644 | ||
| --- a/meson.build | ||
| +++ b/meson.build | ||
| @@ -1400,11 +1400,11 @@ endforeach | ||
| functions_to_detect = { | ||
| 'strtof': '', | ||
| 'mkostemp': '', | ||
| - 'memfd_create': '', | ||
| + 'memfd_create': '#include <sys/mman.h>', | ||
| 'random_r': '', | ||
| 'flock': '', | ||
| 'strtok_r': '', | ||
| - 'getrandom': '', | ||
| + 'getrandom': '#include <sys/random.h>', | ||
| 'qsort_s': '', | ||
| 'posix_fallocate': '', | ||
| 'secure_getenv': '', | ||
| @@ -1412,7 +1412,7 @@ functions_to_detect = { | ||
| } | ||
|
|
||
| foreach f, prefix: functions_to_detect | ||
| - if cc.has_function(f, prefix: prefix) | ||
| + if cc.has_function(f, args: pre_args, prefix: prefix) | ||
| pre_args += '-DHAVE_@0@'.format(f.to_upper()) | ||
| endif | ||
| endforeach | ||
| -- | ||
| GitLab | ||
|
|
This file was deleted.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
packages/mesa/0017-unofficial_support_adreno_710_720.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| Created by, or sourced from, K11MCH1 | ||
| https://github.com/K11MCH1/freedreno_turnip-CI/commit/db9f6d0b31bbabe3fef22e3682015764cd73eb5e | ||
| Adreno 710-only variant also discovered in KreitinnSoftware's repo here: | ||
| https://github.com/KreitinnSoftware/MiceWine-RootFS-Generator/commit/6e9d54ab5d280821922c1e8a7a02d84ba1621cbc | ||
| Upstream issue: | ||
| https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036 | ||
|
|
||
| --- a/src/freedreno/common/freedreno_devices.py | ||
| +++ b/src/freedreno/common/freedreno_devices.py | ||
| @@ -1065,6 +1065,42 @@ add_gpus([ | ||
| raw_magic_regs = a730_raw_magic_regs, | ||
| )) | ||
|
|
||
| +add_gpus([ | ||
| + GPUId(chip_id=0x07010000, name="FD710"), # KGSL, no speedbin data | ||
| + GPUId(chip_id=0xffff07010000, name="FD710"), # Default no-speedbin fallback | ||
| + ], A6xxGPUInfo( | ||
| + CHIP.A7XX, | ||
| + [a7xx_base, a7xx_gen1], | ||
| + num_ccu = 4, | ||
| + tile_align_w = 64, | ||
| + tile_align_h = 32, | ||
| + num_vsc_pipes = 32, | ||
| + cs_shared_mem_size = 32 * 1024, | ||
| + wave_granularity = 2, | ||
| + fibers_per_sp = 128 * 2 * 16, | ||
| + highest_bank_bit = 16, | ||
| + magic_regs = a730_magic_regs, | ||
| + raw_magic_regs = a730_raw_magic_regs, | ||
| + )) | ||
| + | ||
| +add_gpus([ | ||
| + GPUId(chip_id=0x43020000, name="FD720"), # KGSL, no speedbin data | ||
| + GPUId(chip_id=0xffff043020000, name="FD720"), # Default no-speedbin fallback | ||
| + ], A6xxGPUInfo( | ||
| + CHIP.A7XX, | ||
| + [a7xx_base, a7xx_gen1], | ||
| + num_ccu = 4, | ||
| + tile_align_w = 64, | ||
| + tile_align_h = 32, | ||
| + num_vsc_pipes = 32, | ||
| + cs_shared_mem_size = 32 * 1024, | ||
| + wave_granularity = 2, | ||
| + fibers_per_sp = 128 * 2 * 16, | ||
| + highest_bank_bit = 16, | ||
| + magic_regs = a730_magic_regs, | ||
| + raw_magic_regs = a730_raw_magic_regs, | ||
| + )) | ||
| + | ||
| add_gpus([ | ||
| GPUId(chip_id=0x07030001, name="FD730"), # KGSL, no speedbin data | ||
| GPUId(chip_id=0xffff07030001, name="FD730"), # Default no-speedbin fallback | ||
| --- a/src/freedreno/drm-shim/freedreno_noop.c | ||
| +++ b/src/freedreno/drm-shim/freedreno_noop.c | ||
| @@ -237,6 +237,16 @@ static const struct msm_device_info device_infos[] = { | ||
| .chip_id = CHIPID(6, 6, 0, 0xff), | ||
| .gmem_size = 1024 * 1024 + 512 * 1024, | ||
| }, | ||
| + { | ||
| + .gpu_id = 710 | ||
| + .chip_id = 0x07010000, | ||
| + .gmem_size = 2 * 1024 * 1024, | ||
| + }, | ||
| + { | ||
| + .gpu_id = 720 | ||
| + .chip_id = 0x43020000, | ||
| + .gmem_size = 2 * 1024 * 1024, | ||
| + }, | ||
| { | ||
| .gpu_id = 730, | ||
| .chip_id = 0x07030001, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| mesa upstream code 'thinks' that if 'x11_dri3_open()' | ||
| has a negative retval, then DRI3 EGL acceleration in Zink with the current settings | ||
| is impossible in all cases and it disables Zink and falls back to software rendering. | ||
|
|
||
| However, Termux:X11 is a 3rd party edge case where, in actual testing, | ||
| for a very long time throughout the past year of mesa releases, | ||
| even if 'x11_dri3_open()' has a negative retval, | ||
| for some reason Zink+Tunip GPU acceleration still works if force-enabled | ||
| anytime that software rendering is not the initial default. | ||
|
|
||
| This 'Termux-unaware' upstream mesa codepath that fails to 'understand' the true | ||
| capabilities of Zink+Turnip+Termux:X11 has gradually been building up in the background | ||
| for the last several months, but in this commit: | ||
| https://gitlab.freedesktop.org/mesa/mesa/-/commit/3294cad34159bd5317e3dfb0cb4e0ba5caca9f77 | ||
| the 'switch was flipped' to the new codepath, so to speak, locking vanilla mesa's EGL | ||
| support away from the Zink+Turnip+Termux:X11 codepath unless some kind of intervention | ||
| is performed, such as this patch. | ||
|
|
||
| --- a/src/egl/drivers/dri2/platform_x11_dri3.c | ||
| +++ b/src/egl/drivers/dri2/platform_x11_dri3.c | ||
| @@ -535,7 +535,7 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy, bool swrast) | ||
| _eglLog(_EGL_WARNING, "DRI3: Failed to initialize"); | ||
| } | ||
|
|
||
| - return false; | ||
| + return true; | ||
| } | ||
|
|
||
| loader_get_user_preferred_fd(&dri2_dpy->fd_render_gpu, | ||
| --- a/src/egl/main/eglapi.c | ||
| +++ b/src/egl/main/eglapi.c | ||
| @@ -683,7 +683,7 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) | ||
| "Found 'LIBGL_ALWAYS_SOFTWARE' set, will use a CPU renderer"); | ||
|
|
||
| const char *env = os_get_option("MESA_LOADER_DRIVER_OVERRIDE"); | ||
| - disp->Options.Zink = env && !strcmp(env, "zink"); | ||
| + disp->Options.Zink = !env || !strcmp(env, "zink"); | ||
|
|
||
| const char *gallium_hud_env = os_get_option("GALLIUM_HUD"); | ||
| disp->Options.GalliumHudWarn = | ||
22 changes: 22 additions & 0 deletions
22
packages/mesa/0019-disable-general-layout-in-zink-for-turnip.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| Partially reverts https://gitlab.freedesktop.org/mesa/mesa/-/commit/622612f67ea72298c3d85dfe53c5d54ee9f98527 | ||
| because that commit causes severe artifacts in Webrender in Firefox in Termux:X11 with GLX enabled and EGL | ||
| force-disabled in Zink in Turnip on Adreno devices, while using the about:config settings | ||
| gfx.webrender.all=true and gfx.x11-egl.force-disabled=true, | ||
| and doing this prevents the artifacts from occurring. | ||
|
|
||
| --- a/src/gallium/drivers/zink/zink_screen.c | ||
| +++ b/src/gallium/drivers/zink/zink_screen.c | ||
| @@ -3044,10 +3044,12 @@ init_driver_workarounds(struct zink_screen *screen) | ||
| case VK_DRIVER_ID_MESA_LLVMPIPE: | ||
| case VK_DRIVER_ID_MESA_NVK: | ||
| case VK_DRIVER_ID_NVIDIA_PROPRIETARY: | ||
| - case VK_DRIVER_ID_MESA_TURNIP: | ||
| case VK_DRIVER_ID_QUALCOMM_PROPRIETARY: | ||
| screen->driver_workarounds.general_layout = true; | ||
| break; | ||
| + case VK_DRIVER_ID_MESA_TURNIP: | ||
| + screen->driver_workarounds.general_layout = false; | ||
| + break; | ||
| default: | ||
| screen->driver_workarounds.general_layout = screen->info.have_KHR_unified_image_layouts; | ||
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.