Skip to content

your repo is really broken #12

Description

@FZXO11

i was confused when i saw that in the README vulkan is not working but vulkan zink works which has been always the opposite, turnip working perfectly fine but turnip+zink doesnt for me and other users who just compile mesa directly even with applying freedreno kgsl patches which is unrelated and turnip+zink not working is termux-x11 problem with mesa compiled for glibc btw.

i am also surprised with the very low score you got on vkmark with your a6xx gpu it should be at least 4500~ and for a7xx its 6500~

i havent compiled mesa for a while so just to make sure i compiled now without any patch and it worked flawlessly on a735.

i guess you should test the patches one by one to find what is going on with your weird repo.

Activity

  1. hansm629 commented on Dec 15, 2025

    @hansm629

    @FZXO11
    I have a question.
    Which branch(repo) did you use to build?

    Did you apply the Termux-X11 DRI3 patch before building?

  2. lfdevs commented on Dec 15, 2025

    @lfdevs
    Owner

    Thank you for your feedback.

    turnip+zink not working is termux-x11 problem with mesa compiled for glibc btw.

    The modifications made to the Mesa source code in this repository are largely based on a series of patches by @xMeM. Our current priority is to ensure hardware acceleration via the Adreno GPU works reliably when running PRoot, Chroot, or LXC containers through Termux, which necessitates compatibility with Termux:X11.

    i am also surprised with the very low score you got on vkmark with your a6xx gpu it should be at least 4500~ and for a7xx its 6500~

    I don’t think that running vkmark with Turnip under Termux:X11 would yield such high scores. I’ve only achieved scores above 1000 when running vkmark with vulkan-wrapper-android in Termux Native: lfdevs/termux-packages#1 (comment) Recently, I also re-tested the Turnip driver built by Josephhan629 from two years ago. On Debian 12, vkmark2 ran successfully, but the Adreno 730 scored only 800+—surprisingly lower than the Adreno 660. This observation aligns with @hansm629's comments in discussions under xMeM’s original PR:

    termux/termux-packages#17561 (comment)
    termux/termux-packages#17561 (comment)

    Detailed vkmark2 results on Adreno 730:

    =======================================================
        vkmark 2025.01
    =======================================================
        Vendor ID:      0x5143
        Device ID:      0x7030002
        Device Name:    Turnip Adreno (TM) 725
        Driver Version: 100663395
        Device UUID:    e035aeb006acac3a1842998f36a942cc
    =======================================================
    [vertex] device-local=true: FPS: 794 FrameTime: 1.259 ms
    [vertex] device-local=false: FPS: 796 FrameTime: 1.256 ms
    [texture] anisotropy=0: FPS: 806 FrameTime: 1.241 ms
    [texture] anisotropy=16: FPS: 762 FrameTime: 1.312 ms
    [shading] shading=gouraud: FPS: 833 FrameTime: 1.200 ms
    [shading] shading=blinn-phong-inf: FPS: 742 FrameTime: 1.348 ms
    [shading] shading=phong: FPS: 718 FrameTime: 1.393 ms
    [shading] shading=cel: FPS: 714 FrameTime: 1.401 ms
    [effect2d] kernel=edge: FPS: 1054 FrameTime: 0.949 ms
    [effect2d] kernel=blur: FPS: 646 FrameTime: 1.548 ms
    [desktop] <default>: FPS: 879 FrameTime: 1.138 ms
    [cube] <default>: FPS: 1127 FrameTime: 0.887 ms
    [clear] <default>: FPS: 1263 FrameTime: 0.792 ms
    =======================================================
                                       vkmark Score: 856
    =======================================================
    

    i guess you should test the patches one by one to find what is going on with your weird repo.

    I’ve also been experimenting with xMeM’s earlier patches or older Mesa versions (e.g., 24.x) to diagnose and potentially fix the compatibility issues affecting Turnip on Adreno 7xx GPUs in builds from this repository. If these efforts prove ineffective, I may end up building Freedreno (OpenGL) and Turnip (Vulkan) from separate codebases. However, all of this will require additional time for validation and integration.

    Notably, I’ve observed that Josephhan629’s Turnip driver—based on Mesa 24.1.0—still functions correctly under Debian 13 when paired with Freedreno from Mesa 26.0.0.

    If you have any ideas or suggestions—especially regarding build workflows or configuration—I’d greatly appreciate your input.

  3. FZXO11 commented on Dec 15, 2025

    @FZXO11
    Author

    @lfdevs
    Now Here's the thing, you don't need to apply any patch at all if you just want to compile turnip
    turnip+zink will need the dri3 patch but we are using freedreno kgsl anyway so just don't apply any wsi or dri3 patch
    this should "yield high scores with turnip and termux-x11 in vkmark"
    And btw xMeM have made a merged PR to termux-x11 long ago so that you don't need to compile turnip with any patch you don't seem very updated.

    @hansm629
    I just use the official repo and compile turnip alone like this

    git clone https://gitlab.freedesktop.org/mesa/mesa

    meson setup build -D platforms=x11 -Dgallium-drivers= -Dfreedreno-kmds=kgsl,msm -D vulkan-drivers=freedreno -Dshared-llvm=disabled -Dopengl=false

    cd build && ninja install -j4

    And no i don't apply a single patch for mesa turnip.

  4. hansm629 commented on Dec 15, 2025

    @hansm629

    @FZXO11
    I think further verification is needed, but
    when I built Turnip from the main mesa branch a few months ago without applying the Termux-X11 DRI3 patch, it didn't work onscreen at all on PRoot-Distro Debian 13.

    I had to add the environment variable MESA_VK_WSI_DEBUG=sw for the onscreen to work.

    I remember xMeM creating the DRI3 patch for Freedreno (kgls) and Turnip to work on Termux-X11.

    Are you saying that even without that patch, it works on both Termux-X11's bionic libc native and PRoot/Chroot glibc environment?

  5. FZXO11 commented on Dec 15, 2025

    @FZXO11
    Author

    Are you saying that even without that patch, it works on both Termux-X11's bionic libc native and PRoot-Distro's glibc environment?

    Yes for turnip alone.
    turnip+zink still needs a patch if you are on any glibc rootfs so just use freedreno kgsl instead.

  6. hansm629 commented on Dec 15, 2025

    @hansm629

    @FZXO11
    If DRI3 zero-copy doesn't work when used with zink, that seems like a different issue.

    Freedreno (kgsl) offers high performance, but
    it suffers from artifact and Stuttering issues (probably only on Termux-X11).

    It's unstable for primary use.

    Until Freedreno (kgsl) works well in a Termux-X11 zero-copy environment,
    the Turnip + mesa zink combination will likely be more stable in terms of compatibility.

  7. FZXO11 commented on Dec 15, 2025

    @FZXO11
    Author

    @hansm629
    freedreno does have the problems you mentioned both in termux-x11 and when flashed in android.

    ok but you should know that if you want to run vulkan programs at the best performance use turnip without any patches.
    it's just one lib libvulkan_freedreno.so you can switch easily between patched turnip and unpatched turnip

  8. lfdevs commented on Dec 15, 2025

    @lfdevs
    Owner

    @lfdevs Now Here's the thing, you don't need to apply any patch at all if you just want to compile turnip turnip+zink will need the dri3 patch but we are using freedreno kgsl anyway so just don't apply any wsi or dri3 patch this should "yield high scores with turnip and termux-x11 in vkmark" And btw xMeM have made a merged PR to termux-x11 long ago so that you don't need to compile turnip with any patch you don't seem very updated.

    @hansm629 I just use the official repo and compile turnip alone like this

    git clone https://gitlab.freedesktop.org/mesa/mesa

    meson setup build -D platforms=x11 -Dgallium-drivers= -Dfreedreno-kmds=kgsl,msm -D vulkan-drivers=freedreno -Dshared-llvm=disabled -Dopengl=false

    cd build && ninja install -j4

    And no i don't apply a single patch for mesa turnip.

    Thank you for your sharing. I will try building Freedreno and Turnip using different branches (patched and unpatched) along with varying build configurations to test whether they can coexist and function together. If that proves unfeasible, using distinct environment variables to switch between Freedreno (KGSL) and Turnip + Zink would be a solid alternative.

    If everything goes smoothly, I'll include a separate Turnip package in the future release, and for releases targeting specific package managers, I’ll also provide unpatched packages (e.g., mesa-vulkan-drivers).

    The reason for retaining Freedreno stems from my past experience: when certain Vulkan feature extensions are missing, Zink may expose an OpenGL version that falls short of the requirements for some applications (such as Blender 4 using the OpenGL backend). Similarly, Turnip on certain Adreno GPU models may also lack specific Vulkan extensions, making it unable to meet the requirements of other applications (like Blender 4.5 using the Vulkan backend). In these rare but critical scenarios, keeping Freedreno remains necessary.

  9. lfdevs commented on Dec 15, 2025

    @lfdevs
    Owner

    I did a quick test, and Freedreno (KGSL) and Turnip can coexist and work well together. First, install the drivers in this repo, then overlay a separately built Turnip driver. Set the environment variable:

    MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform

    With this setup, OpenGL and OpenGL ES will automatically use the more efficient Freedreno driver (instead of Zink), while Vulkan will automatically use the Turnip driver.

    On the Adreno 730, although vkmark still crashes with Segmentation fault, applications like vkcube and Vulkan-based software such as Godot v4.5.1 now run successfully.

    The command I used to build Turnip separately is as follows:

    meson setup build/ \
        --prefix=/usr \
        -Dplatforms=x11,wayland \
        -Dgallium-drivers= \
        -Dvulkan-drivers=freedreno \
        -Dlibunwind=disabled \
        -Dmicrosoft-clc=disabled \
        -Dvalgrind=disabled \
        -Dgles1=disabled \
        -Dfreedreno-kmds=kgsl \
        -Dbuildtype=release
    ninja -C build/

    However, when running Godot games with Vulkan, noticeable screen tearing persists. I may try applying one or more the following simple patches from other repositories next to see if they yield any positive effects:

    https://github.com/Weab-chan/freedreno_turnip-CI/tree/main/patches
    https://github.com/MastaG/mesa-turnip-ppa/tree/main/turnip-patches

  10. FZXO11 commented on Dec 15, 2025

    @FZXO11
    Author
  11. lfdevs commented on Dec 15, 2025

    @lfdevs
    Owner

    @lfdevs yeah freedreno kgsl and turnip can co exist their libs never replace the other

    https://github.com/Weab-chan/freedreno_turnip-CI/tree/main/patches https://github.com/MastaG/mesa-turnip-ppa/tree/main/turnip-patches

    outdated.

    Alright then, the performance when using both together is also quite satisfactory.

  12. hansm629 commented on Dec 16, 2025

    @hansm629

    @lfdevs
    Is there a way to coexist with Zink?
    Freedreno (kgsl) offers high performance,

    but it still fails in the Termux-X11 backend environment:

    • mesa & DRM error messages
    • GL/GLES artifacts
    • stuttering
    • etc

    Because of the issues mentioned above,

    some programs are forced to use Zink.

    In particular, VLC Player showed significantly better performance with Zink than Freedreno (kgsl) when playing 4K@60fps VP9 videos.

  13. lfdevs commented on Dec 16, 2025

    @lfdevs
    Owner

    Is there a way to coexist with Zink?

    When you need to run certain applications using Zink, simply set the environment variable MESA_LOADER_DRIVER_OVERRIDE=zink.

    For example, when launching the KDE Plasma desktop with the following command, all OpenGL and OpenGL ES applications will prefer the Freedreno (KGSL) driver:

    sudo service dbus start
    MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform startplasma-x11

    Then, when running Blender, using Zink can help avoid certain rendering issues. You can launch it with:

    MESA_LOADER_DRIVER_OVERRIDE=zink blender
  14. lfdevs commented on Dec 18, 2025

    @lfdevs
    Owner
  15. added a commit that references this issue on Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions