Adreno 830: No DRI3 while running OpenGLES apps
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: zink Vulkan 1.4(Adreno (TM) 830 (MESA_TURNIP))
GL_VERSION: 4.6 (Compatibility Profile) Mesa 26.0.0-devel (git-f493f5c88d)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 139 FrameTime: 7.220 ms
[build] use-vbo=true:^C
root@localhost:~# DISPLAY=:0 MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform glmark2
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: zink Vulkan 1.4(Adreno (TM) 830 (MESA_TURNIP))
GL_VERSION: 4.6 (Compatibility Profile) Mesa 26.0.0-devel (git-f493f5c88d)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 132 FrameTime: 7.582 ms
[build] use-vbo=true:^C
root@localhost:~# DISPLAY=:0 MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform glmark2-es2
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: llvmpipe (LLVM 19.1.7, 128 bits)
GL_VERSION: OpenGL ES 3.2 Mesa 26.0.0-devel (git-f493f5c88d)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false:^C
root@localhost:~# DISPLAY=:0 MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=noconform LD_LIBRARY_PATH=/usr/lib glmark2-es2
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: llvmpipe (LLVM 19.1.7, 128 bits)
GL_VERSION: OpenGL ES 3.2 Mesa 26.0.0-devel (git-f493f5c88d)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================```
All Freedreno drivers (OpenGL / OpenGL ES) in this repository contain the Termux:X11 DRI3 patch. Newer versions of the Turnip driver (Vulkan) do not work on Adreno 7xx/8xx after being patched (so Adreno 7xx/8xx needs to have the unpatched Turnip driver installed on top of the patched Freedreno driver). All your tests used Zink, so in reality, only the unpatched Turnip driver is working.
You can first delete the Vulkan ICD files in the Mesa maintained by the distribution, and then install the two drivers in sequence. See the "Direct Extraction" section of the README for details.
sudo rm /usr/share/vulkan/icd.d/*
sudo tar -zxvf mesa-for-android-container_26.1.0-devel-20260125_debian_trixie_arm64.tar.gz -C /
sudo tar -zxvf turnip_26.1.0-devel-20260125_debian_trixie_arm64.tar.gz -C /
sudo ldconfig
Please also check files such as /etc/profile, /etc/environment, ~/.profile, and ~/.bashrc to see if the MESA_LOADER_DRIVER_OVERRIDE environment variable is incorrectly set to zink. The ideal test output is as follows:
user@ubuntu:~$ export DISPLAY=:0 MESA_LOADER_DRIVER_OVERRIDE=kgsl
user@ubuntu:~$ glmark2
MESA-LOADER: failed to retrieve device information
MESA: error: kgsl_pipe_get_param:103: invalid param id: 13
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: freedreno
GL_RENDERER: Adreno (TM) 830
GL_VERSION: 4.6 (Compatibility Profile) Mesa 26.0.0-devel (git-dc0ba39df5)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 3626 FrameTime: 0.276 ms
user@ubuntu:~$ glmark2-es2
MESA-LOADER: failed to retrieve device information
MESA: error: kgsl_pipe_get_param:103: invalid param id: 13
=======================================================
glmark2 2023.01
=======================================================
OpenGL Information
GL_VENDOR: freedreno
GL_RENDERER: Adreno (TM) 830
GL_VERSION: OpenGL ES 3.2 Mesa 26.0.0-devel (git-dc0ba39df5)
Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
Surface Size: 800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 3583 FrameTime: 0.279 ms
user@ubuntu:~$ vkmark
ERROR: VkInstanceCreateInfo::pApplicationInfo::apiVersion has value of 0 which is not permitted. If apiVersion is not 0, then it must be greater than or equal to the value of VK_API_VERSION_1_0 [VUID-VkApplicationInfo-apiVersion]
=======================================================
vkmark 2017.08
=======================================================
Vendor ID: 0x5143
Device ID: 0x44050001
Device Name: Adreno (TM) 830
Driver Version: 105263203
Device UUID: 5fee092e01d4f81c98845ac7cacc8648
=======================================================
[vertex] device-local=true: FPS: 304 FrameTime: 3.289 ms
Turns out it's a bad idea to install it on Termux-Desktop preinstalled debian distro ;) Seems removing the distro and installing it once again did the trick! Thanks!