-
-
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
bump(main/mesa): 25.2.4 #26528
Conversation
8455833 to
49e6058
Compare
|
I have bisected the problem with EGL and zink to this, https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014 Faith Elkstrand has heavily changed the code which allows enabling EGL with zink, which was necessary in order to support EGL in zink in nouveau in wayland on PC which previously did not work, so that is very good, but it appears to break EGL in zink in turnip in Adreno 630 in Termux:X11 on Android, causing EGL to switch to llvmpipe for me, so that is unfortunate. I will try to figure out if i can fix it in any way. |
|
As an update, I have found a change that I can make that does successfully result in GPU acceleration returning to my device in the edge case of EGL+Zink+Turnip+Termux:X11+Adreno 630, however, unfortunately, the current change I have been able to write involves hardcoding in such a way that, while it forces Zink to work, it breaks llvmpipe, and undoing my change results in llvmpipe working, but Zink being broken. I need to try to write my change in a way that can fix the dynamic detection of whether llvmpipe or zink is active and activate/deactivate itself dynamically in response at runtime. |
49e6058 to
ddc59ff
Compare
|
After several hours, I have created a patch that I believe fixes the problem on my device with all cases handled dynamically at runtime (with Turnip installed and also with Turnip uninstalled and also with environment variables set to various things and also with environment variables unset), in a way that successfully carries the current behavior of Mesa 25.1 in Termux forward into Mesa 25.2+ - at least on my device. I haven't often posted my debugging print messages before, but in this case I feel that it may be helpful, informative, important and necessary for future maintenance for me to show my temporary debugging code as documentation of how I developed my patch. tool that I created and used to develop 0018-preserve-egl-support-in-zink.patch--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -69,6 +69,7 @@
#include "util/bitscan.h"
#include "util/driconf.h"
#include "util/libsync.h"
+#include "util/log.h"
#include "util/os_file.h"
#include "util/u_atomic.h"
#include "util/u_call_once.h"
@@ -542,8 +542,15 @@ dri2_detect_swrast_kopper(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
- dri2_dpy->kopper = dri2_dpy->driver_name && !strcmp(dri2_dpy->driver_name, "zink") &&
- !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false);
+ const char *expected_driver_name = "zink", *excluded_driver_name = "swrast";
+ dri2_dpy->kopper = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false);
+ if (dri2_dpy->driver_name && !strcmp(dri2_dpy->driver_name, excluded_driver_name)) {
+ mesa_logw("egl_dri2.c dri2_detect_swrast_kopper(): expected driver name '%s', but found excluded driver name '%s'! Disabling kopper...", expected_driver_name, excluded_driver_name);
+ dri2_dpy->kopper = EGL_FALSE;
+ } else if (!(dri2_dpy->driver_name && !strcmp(dri2_dpy->driver_name, expected_driver_name))) {
+ mesa_logw("egl_dri2.c dri2_detect_swrast_kopper(): expected driver name '%s', but found driver name '%s'! Proceeding with enabling kopper anyway...", expected_driver_name, dri2_dpy->driver_name);
+ }
+
dri2_dpy->swrast = (disp->Options.ForceSoftware && !dri2_dpy->kopper && strcmp(dri2_dpy->driver_name, "vmwgfx")) ||
!dri2_dpy->driver_name || strstr(dri2_dpy->driver_name, "swrast");
dri2_dpy->swrast_not_kms = dri2_dpy->swrast && (!dri2_dpy->driver_name || strcmp(dri2_dpy->driver_name, "kms_swrast"));
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -91,6 +91,7 @@
#include "util/macros.h"
#include "util/perf/cpu_trace.h"
#include "util/u_debug.h"
+#include "util/log.h"
#include "eglconfig.h"
#include "eglcontext.h"
@@ -693,23 +694,33 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
* Initialize the display using the driver's function.
* If the initialisation fails, try again using only software rendering.
*/
+ mesa_logw("BEES1, zink: %d", disp->Options.Zink);
if (!_eglDriver.Initialize(disp)) {
+ mesa_logw("BEES2");
if (disp->Options.ForceSoftware)
+ { mesa_logw("BEES3");
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
+ }
else {
+ mesa_logw("BEES4");
bool success = false;
if (!disp->Options.Zink && !getenv("GALLIUM_DRIVER")) {
+ mesa_logw("BEES5");
disp->Options.Zink = EGL_TRUE;
success = _eglDriver.Initialize(disp);
}
if (!success) {
+ mesa_logw("BEES6");
disp->Options.Zink = EGL_FALSE;
disp->Options.ForceSoftware = EGL_TRUE;
- if (!_eglDriver.Initialize(disp))
+ if (!_eglDriver.Initialize(disp)) {
+ mesa_logw("BEES7");
RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE);
+ }
}
}
}
+ mesa_logw("BEES8");
disp->Initialized = EGL_TRUE;
disp->Driver = &_eglDriver; |
|
Is this ready for merge or do you want to do additional testing? |
i need to put additional changes in this. i'm kind of waiting for llvm 21 update to be merged because the additional changes depend on llvm 21. |
|
When using GPU WebRender in Firefox, I was experiencing graphics artifacts, but I was able to avoid them by disabling EGL. After installing this PR, graphics artifacts are occurring.
egl.mp4
now.mp4
new.mp4 |
|
It seems unfortunate, I am sorry about that, What model of GPU do you have (is it the same Adreno 740 device you tested the other PR with?), and if you restart Firefox completely (so that Also, do you still have |
|
Thank you for the report
I will proceed forward with a bisection, in order to identify exactly which change in Mesa causes that problem in Firefox, because if I can identify it and the bisected change is not too huge, it might be possible for me to revert it with a patch and restore the functionality of WebRender in Firefox on our devices. |
|
Very good, thank you hansm629, you seem to be using this Mesa 25.2.3's Zink combined with the vulkan-wrapper-android for Vulkan, that is a configuration that doesn't work for any of my own devices, but it's very good that it works for you! |
6e0e410 to
797acc0
Compare
|
@shiumano I have bisected the change which causes the severe artifacts in Firefox when Webrender is force-enabled and EGL is force-disabled in and very luckily, it seems like I have somehow been able to calculate a very small change that appears to fix the problem on my device, without having to revert the entire commit and all conflicting commits after it, but just a small portion of the commit. I have named my attempt to fix this Could you please download the new artifacts and test them on your device, to check whether the patch I have made fixes the problem for you also, or is still happening? |
|
As far as I have checked, everything is fine. Thank you so much! |
797acc0 to
f1c5c35
Compare
packages/mesa/0019-disable-general-layout-in-zink-for-turnip.patch
Outdated
Show resolved
Hide resolved
e931b10 to
d374fcc
Compare
|
@hansm629 it doesn't happen for me with those apps with this PR with Zink + Turnip on my Turnip devices, and unfortunately, I don't think I have any devices where Zink (of mesa 25.1.5 or otherwise) works with but if this problem you see doesn't happen for you with the same configuration with Mesa 25.1.5, then I can try to bisect it with you like I bisected the other problems. |
d374fcc to
4426a71
Compare
|
@truboxl my PR was approved by upstream Mesa and has been merged, so I have updated it here to match the version that was merged in upstream including my upstream commit message in the patch header. Hopefully this makes what it does clearer. Do you still have any concerns about it? |
4426a71 to
c822289
Compare
truboxl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to apologize for my earlier statements. I have horribly misjudged the changes. The packages work correctly on my devices.
c822289 to
34d0db2
Compare
|
@robertkirkman
In But with The issues encountered during testing were:
Aside from the above issues, With a few more mesa updates, full compatibility is expected! |
34d0db2 to
524958e
Compare
|
Thank you! that is good news. I will merge this in 24 hours if no major problems are found. |
|
I think bump libclc also |
|
Yes you are correct, thank you I actually didn't notice that one has |
- Fixes termux#26526 - Fixes termux#25371 - All patches seemed to only need minor rebasing and no other errors - Tested working on Samsung Galaxy S9 SM-G960U with Adreno 630 - Add unofficial Adreno 710+720 support found here https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036 and here K11MCH1/freedreno_turnip-CI@db9f6d0 - After https://gitlab.freedesktop.org/mesa/mesa/-/commit/3294cad34159bd5317e3dfb0cb4e0ba5caca9f77, a new change is required in order to preserve GPU acceleration in the edge case of **EGL+Zink+Turnip+Termux:X11+Adreno 630**. I have named this change `0018-preserve-egl-support-in-zink.patch` and it is an original creation based on my ~2 years of experience developing EGL software for running inside Termux:X11 on Samsung Galaxy S9 SM-G96U with Adreno 630. **Unfortunately, I do not know what the effects of this patch will be on other devices that I do not have, so please tell me ASAP if it appears to break Zink on your device**. - After https://gitlab.freedesktop.org/mesa/mesa/-/commit/622612f67ea72298c3d85dfe53c5d54ee9f98527, the default behavior of Zink is to enable the "general layout" mode whenever Turnip is detected. In testing in Termux:X11 on Samsung Galaxy A70 SM-A705FN, that change is incorrect and results in severe artifacts in Firefox when Firefox has `gfx.webrender.all=true` and `gfx.x11-egl.force-disabled=true` set in `about:config`, so `0019-disable-general-layout-in-zink-for-turnip.patch` must be created to forcibly stop Zink from enabling "general layout" mode when Turnip is detected.
524958e to
88da450
Compare
|
I built
@truboxl not sure if it is best for me to not bump |
…ion `check_version_change()` - IMPORTANT: revert this commit when `check_version_change()` is fixed!
|
The current version of the new linter function but since I hope that is ok with TomJo2000 and that they will understand to remove the stubout |
I'm still having trouble reliably replicating the issue, I'm looking into it again now. |
|
You can go ahead and disable the check_version function in the linter until I figured out a permanent solution if it's blocking this PR. |
Fixes [Bug]: Adreno 710 and 720 tracker #26526
Fixes Auto update failing for mesa #25371
All patches seemed to only need minor rebasing and no other errors
Tested working on Samsung Galaxy S9 SM-G960U with Adreno 630
Add unofficial Adreno 710+720 support found here https://gitlab.freedesktop.org/mesa/mesa/-/issues/13036 and here K11MCH1/freedreno_turnip-CI@db9f6d0
After https://gitlab.freedesktop.org/mesa/mesa/-/commit/3294cad34159bd5317e3dfb0cb4e0ba5caca9f77, a new change is required in order to preserve GPU acceleration in the edge case of EGL+Zink+Turnip+Termux:X11+Adreno 630. I have named this change
0018-preserve-egl-support-in-zink.patchand it is an original creation based on my ~2 years of experience developing EGL software for running inside Termux:X11 on Samsung Galaxy S9 SM-G960U with Adreno 630. Unfortunately, I do not know what the effects of this patch will be on other devices that I do not have, so please tell me ASAP if it appears to break Zink on your device.After https://gitlab.freedesktop.org/mesa/mesa/-/commit/622612f67ea72298c3d85dfe53c5d54ee9f98527, the default behavior of Zink is to enable the "general layout" mode whenever Turnip is detected. In testing in Termux:X11 on Samsung Galaxy A70 SM-A705FN, that change is incorrect and results in severe artifacts in Firefox when Firefox has
gfx.webrender.all=trueandgfx.x11-egl.force-disabled=trueset inabout:config, so0019-disable-general-layout-in-zink-for-turnip.patchmust be created to forcibly stop Zink from enabling "general layout" mode when Turnip is detected.