Open hansm629 opened 1 year ago
it does not appear that the currently built package supports the Adreno 7xx series Because mesa mainline does not support a7xx yet
Compile it your self with this script https://github.com/xDoge26/mesa-turnip/blob/main/build_deb_mesa.sh
Recently, freedreno turnip for the Termux package supports DRI3 as a patch, which seems to work with Turnip without inputting the MESA_VK_WSI_DEBUG=sw environment variable and perform better.
they need better documentation, also it would be better if they need upstream changes to mesa mainline not just patch
I request Adreno 7xx series support and DRI3 patching for the turnip package for PRoot.
Same as above, this should be asked on mesa gitlab
it does not appear that the currently built package supports the Adreno 7xx series Because mesa mainline does not support a7xx yet
Compile it your self with this script https://github.com/xDoge26/mesa-turnip/blob/main/build_deb_mesa.sh
Recently, freedreno turnip for the Termux package supports DRI3 as a patch, which seems to work with Turnip without inputting the MESA_VK_WSI_DEBUG=sw environment variable and perform better.
they need better documentation, also it would be better if they need upstream changes to mesa mainline not just patch
I request Adreno 7xx series support and DRI3 patching for the turnip package for PRoot.
Same as above, this should be asked on mesa gitlab
https://gitlab.freedesktop.org/Danil/mesa/-/tree/turnip/feature/a7xx-basic-support
After receiving the source from Branche above I build the deb package myself.
mesa-vulkan-kgsl_23.3.0-devel-20230815_arm64.zip
Galaxy S23 Ultra (Adreno 740) Galaxy S22 Ultra (Adreno 730) Galaxy tab S8+ 5G (Adreno 730)
Tested on 3 devices.
It doesn't matter if you upload the corresponding deb package if necessary.
Unfortunately, the DRI3 patch was not reflected.
@hansm629 you can try to build with these dri.zip
place wsi-termux-x11-v3.patch in sources dir and execute git apply -v wsi-termux-x11-v3.patch
replace src/vulkan/wsi/wsi_common_x11.c with file from archive
config -Dcpp_rtti=false -Dgbm=disabled -Dopengl=false -Dllvm=disabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers= -Dxmlconfig=disabled -Dvulkan-drivers=freedreno -Dfreedreno-kmds=msm,kgsl
@hansm629 you can try to build with these dri.zip
place wsi-termux-x11-v3.patch in sources dir and execute git apply -v wsi-termux-x11-v3.patch
replace src/vulkan/wsi/wsi_common_x11.c with file from archive
config -Dcpp_rtti=false -Dgbm=disabled -Dopengl=false -Dllvm=disabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers= -Dxmlconfig=disabled -Dvulkan-drivers=freedreno -Dfreedreno-kmds=msm,kgsl
Thank you! after Compile
I'll post a review. :)
@hansm629 you can try to build with these dri.zip
place wsi-termux-x11-v3.patch in sources dir and execute git apply -v wsi-termux-x11-v3.patch
replace src/vulkan/wsi/wsi_common_x11.c with file from archive
config -Dcpp_rtti=false -Dgbm=disabled -Dopengl=false -Dllvm=disabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers= -Dxmlconfig=disabled -Dvulkan-drivers=freedreno -Dfreedreno-kmds=msm,kgsl
@romanovj
After Build I'm posting a review.
hsm@localhost:~$ TU_DEBUG=noconform vkcube
Selected GPU 0: Turnip Adreno (TM) 740, type: 1
vkcube is
Works very well without the MESA_VK_WSI_DEBUG=sw
environment variable.
but
hsm@localhost:~$ MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json glmark2
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: zink Vulkan 1.3(Turnip Adreno (TM) 740 (MESA_TURNIP))
GL_VERSION: 4.5 (Compatibility Profile) Mesa 23.3.0-devel
=======================================================
MESA: error: CreateSwapchainKHR failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
MESA: error: zink: could not create swapchain
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: CreateSwapchainKHR failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
MESA: error: zink: could not create swapchain
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
[build] use-vbo=false:MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
glmark2 is not working with the same issue we reported to the tur-report before.
hsm@localhost:~$ MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.531 FPS
300 frames in 5.0 seconds = 59.975 FPS
301 frames in 5.0 seconds = 60.013 FPS
301 frames in 5.0 seconds = 59.992 FPS
And glxgears performance is very, very slow.
Maybe... Should I recompile the mesa after the DRI3 patch?
I downloaded the sauce of mesa-23.3.0-devel
meson build -D gbm=enabled -D opengl=true -D egl=enabled -D egl-native-platform=x11 -D gles1=disabled -D gles2=enabled -D dri3=enabled -D glx=dri -D llvm=enabled -D shared-llvm=disabled -D platforms=x11,wayland -D gallium-drivers=swrast,virgl,zink -D vulkan-drivers=swrast -D osmesa=true -D glvnd=true -D xmlconfig=disabled
I compiled it with the meson option above.
if you see VK_ERROR_OUT_OF_DEVICE_MEMORY add USE_HEAP=1
fot gxlears add vblank_mode=0
vblank_mode=0 MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glxgears
if you see VK_ERROR_OUT_OF_DEVICE_MEMORY add USE_HEAP=1
fot gxlears add vblank_mode=0
vblank_mode=0 MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glxgears
@romanovj
It's amazing. glxgears performance is almost 3x better.
but
hsm@localhost:~$ USE_HEAP=1 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json glmark2
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: zink Vulkan 1.3(Turnip Adreno (TM) 740 (MESA_TURNIP))
GL_VERSION: 4.5 (Compatibility Profile) Mesa 23.3.0-devel
=======================================================
MESA: error: CreateSwapchainKHR failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
MESA: error: zink: could not create swapchain
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: CreateSwapchainKHR failed with VK_ERROR_OUT_OF_DEVICE_MEMORY
MESA: error: zink: could not create swapchain
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
MESA: error: zink: couldn't allocate memory: heap=0 size=2035712
[build] use-vbo=false:MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
Even if USE_HEAP=1
is added
glmark2 is still not working.
supertuxkart and blender3d also fails with the error VK_ERROR_OUT_OF_DEVICE_MEMORY
.
for glmark2 you can try MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
for glmark2 you can try MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
@romanovj
New error.
hsm@localhost:~$ MESA_NO_ERROR=1 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Mesa
GL_RENDERER: zink Vulkan 1.3(Turnip Adreno (TM) 740 (MESA_TURNIP))
GL_VERSION: 4.5 (Compatibility Profile) Mesa 23.3.0-devel
=======================================================
[build] use-vbo=false:MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
MESA: error: zink: couldn't allocate memory: heap=3 size=2097152
@hansm629 sorry, forgot about vblank_mode try this vblank_mode=0 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
@hansm629 sorry, forgot about vblank_mode try this vblank_mode=0 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
@romanovj
Finally... I did it!!
More than 4x better performance than before!
Thank you so much!!!
Thanks to you, I was able to make it!!!!!
@hansm629 sorry, forgot about vblank_mode try this vblank_mode=0 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink glmark2 --reuse-context
@romanovj
Additional test results.
Firefox-esr works well and has improved web page loading and WebGL performance.
And gimp, pencil2d, kolourpaint, rawtherapee, okular, libreoffice
All of the above programs worked well, too.
but
supertuxkart, blender3d, kdenlive, gthumb
All received the error VK_ERROR_OUT_OF_DEVICE_MEMORY
and did not run.
Is there a way to run those programs as well?
try to compile mesa main without vulkan
sounds good, tell me once its stable enough and upstreamed to mesa main
try to compile mesa main without vulkan
@romanovj
I need your help.
The compile was well done before Error in compiling mesa.
What kind of problem?
$ meson build -Dgbm=enabled -Dopengl=true -Degl=enabled -Degl-native-platform=x11 -Dgles1=disabled -Dgles2=enabled -Ddri3=enabled -Dglx=dri -Dllvm=enabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers=swrast,virgl -Dosmesa=true -Dglvnd=true -Dxmlconfig=disabled
$ ninja -C build install
hsm@localhost:~/다운로드/mesa-main$ sudo ninja -C build install
ninja: Entering directory `build'
[18/78] Linking target src/gallium/targets/va/libgallium_drv_video.so
FAILED: src/gallium/targets/va/libgallium_drv_video.so
c++ -o src/gallium/targets/va/libgallium_drv_video.so src/gallium/targets/va/libgallium_drv_video.so.p/target.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_drv_video.so -Wl,--whole-archive src/gallium/frontends/va/libva_st.a -Wl,--no-whole-archive src/gallium/auxiliary/libgalliumvlwinsys.a src/util/libmesa_util.a src/util/libmesa_util_sse41.a src/util/blake3/libblake3.a src/c11/impl/libmesa_util_c11.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a -Wl,--version-script '/home/hsm/다운로드/mesa-main/src/gallium/targets/va/va.sym' -Wl,--dynamic-list '/home/hsm/다운로드/mesa-main/src/gallium/targets/va/../dri-vdpau.dyn' -Wl,--gc-sections -Wl,--build-id=sha1 /usr/lib/aarch64-linux-gnu/libdrm.so /usr/lib/aarch64-linux-gnu/libz.so -pthread -lm /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libzstd.so /usr/lib/aarch64-linux-gnu/libunwind.so /usr/lib/aarch64-linux-gnu/libxcb-sync.so /usr/lib/aarch64-linux-gnu/libxcb-present.so /usr/lib/aarch64-linux-gnu/libxshmfence.so /usr/lib/aarch64-linux-gnu/libxcb-xfixes.so /usr/lib/aarch64-linux-gnu/libxcb-dri3.so -lrt -ldl -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -lsensors /usr/lib/aarch64-linux-gnu/libxcb-randr.so /usr/lib/aarch64-linux-gnu/libX11-xcb.so /usr/lib/aarch64-linux-gnu/libX11.so /usr/lib/aarch64-linux-gnu/libxcb.so /usr/lib/aarch64-linux-gnu/libxcb-dri2.so -Wl,--end-group
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
collect2: error: ld returned 1 exit status
[19/78] Linking target src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0
FAILED: src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0
c++ -o src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0 src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0.p/target.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libvdpau_gallium.so.1.0.0 -Wl,--whole-archive src/gallium/frontends/vdpau/libvdpau_st.a -Wl,--no-whole-archive src/gallium/auxiliary/libgalliumvlwinsys.a src/util/libmesa_util.a src/util/libmesa_util_sse41.a src/util/blake3/libblake3.a src/c11/impl/libmesa_util_c11.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a -Wl,--version-script '/home/hsm/다운로드/mesa-main/src/gallium/targets/vdpau/vdpau.sym' -Wl,--dynamic-list '/home/hsm/다운로드/mesa-main/src/gallium/targets/vdpau/../dri-vdpau.dyn' -Wl,--gc-sections /usr/lib/aarch64-linux-gnu/libz.so -pthread -lm /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libzstd.so /usr/lib/aarch64-linux-gnu/libunwind.so /usr/lib/aarch64-linux-gnu/libdrm.so /usr/lib/aarch64-linux-gnu/libxcb-sync.so /usr/lib/aarch64-linux-gnu/libxcb-present.so /usr/lib/aarch64-linux-gnu/libxshmfence.so /usr/lib/aarch64-linux-gnu/libxcb-xfixes.so /usr/lib/aarch64-linux-gnu/libxcb-dri3.so -lrt -ldl -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -lsensors /usr/lib/aarch64-linux-gnu/libxcb-randr.so /usr/lib/aarch64-linux-gnu/libxcb.so /usr/lib/aarch64-linux-gnu/libX11-xcb.so /usr/lib/aarch64-linux-gnu/libX11.so /usr/lib/aarch64-linux-gnu/libxcb-dri2.so -Wl,--end-group
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
collect2: error: ld returned 1 exit status
[23/78] Linking target src/gallium/targets/osmesa/libOSMesa.so.8.0.0
FAILED: src/gallium/targets/osmesa/libOSMesa.so.8.0.0
c++ -o src/gallium/targets/osmesa/libOSMesa.so.8.0.0 src/gallium/targets/osmesa/libOSMesa.so.8.0.0.p/target.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libOSMesa.so.8 -Wl,--whole-archive src/gallium/frontends/osmesa/libosmesa_st.a src/mapi/glapi/libglapi_bridge.a -Wl,--no-whole-archive '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi' '-Wl,-rpath-link,/home/hsm/다운로드/mesa-main/build/src/mapi/shared-glapi' src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/util/libmesa_util.a src/util/libmesa_util_sse41.a src/util/blake3/libblake3.a src/c11/impl/libmesa_util_c11.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/compiler/spirv/libvtn.a src/gallium/auxiliary/libgallium.a src/gallium/winsys/sw/null/libws_null.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a -Wl,--gc-sections -Wl,--version-script '/home/hsm/다운로드/mesa-main/src/gallium/targets/osmesa/osmesa.sym' -pthread /usr/lib/aarch64-linux-gnu/libunwind.so -lrt -ldl -lm -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libzstd.so /usr/lib/aarch64-linux-gnu/libdrm.so -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -lsensors -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -Wl,--end-group
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
collect2: error: ld returned 1 exit status
[25/78] Linking target src/gallium/targets/dri/libgallium_dri.so
FAILED: src/gallium/targets/dri/libgallium_dri.so
c++ -o src/gallium/targets/dri/libgallium_dri.so src/gallium/targets/dri/libgallium_dri.so.p/target.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_dri.so '-Wl,-rpath,$ORIGIN/../../../mapi/shared-glapi' '-Wl,-rpath-link,/home/hsm/다운로드/mesa-main/build/src/mapi/shared-glapi' src/gallium/frontends/dri/libdri.a src/util/libmesa_util.a src/util/libmesa_util_sse41.a src/util/blake3/libblake3.a src/c11/impl/libmesa_util_c11.a src/mesa/libmesa.a src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/compiler/spirv/libvtn.a src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a src/mapi/shared-glapi/libglapi.so.0.0.0 src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/llvmpipe/libllvmpipe.a src/gallium/drivers/softpipe/libsoftpipe.a src/gallium/drivers/virgl/libvirgl.a src/gallium/winsys/virgl/drm/libvirgldrm.a src/gallium/winsys/virgl/common/libvirglcommon.a src/gallium/winsys/virgl/vtest/libvirglvtest.a -Wl,--build-id=sha1 -Wl,--gc-sections -Wl,--version-script '/home/hsm/다운로드/mesa-main/src/gallium/targets/dri/dri.sym' -Wl,--dynamic-list '/home/hsm/다운로드/mesa-main/src/gallium/targets/dri/../dri-vdpau.dyn' /usr/lib/aarch64-linux-gnu/libdrm.so -lrt -ldl -lm -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -pthread /usr/lib/aarch64-linux-gnu/libz.so /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/libzstd.so /usr/lib/aarch64-linux-gnu/libunwind.so -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -lsensors /usr/lib/aarch64-linux-gnu/libxcb-randr.so -L/usr/lib/llvm-14/lib -lLLVMLTO -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMFrontendOpenMP -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMCFGuard -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMMCJIT -lLLVMMCDisassembler -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMDebugInfoDWARF -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle -lz -ltinfo -lxml2 -Wl,--end-group
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
/usr/bin/ld: cannot find -lPolly: No such file or directory
/usr/bin/ld: cannot find -lPollyISL: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
@hansm629 you need to install clang libpolly
clang -v
apt-get install libpolly-VERSION-dev
where version is 15/16/17/18
you can also try to build mesa 22 - 22.1
you can also try to build mesa 22 - 22.1
@romanovj Mesa 22.1.5 was compilng and installed.
hsm@localhost:~$ vblank_mode=0 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json glmark2
ATTENTION: default value of option vblank_mode overridden by environment.
=======================================================
glmark2 2021.02
=======================================================
OpenGL Information
GL_VENDOR: Collabora Ltd
GL_RENDERER: zink (Turnip Adreno (TM) 740)
GL_VERSION: 4.5 (Compatibility Profile) Mesa 22.1.5
=======================================================
[build] use-vbo=false: FPS: 546 FrameTime: 1.832 ms
[build] use-vbo=true: FPS: 550 FrameTime: 1.818 ms
without any particular environmental variables
vblank_mode=0 TU_DEBUG=noconform MESA_LOADER_DRIVER_OVERRIDE=zink VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/freedreno_icd.aarch64.json
With the above commands, glxgears and glmark2 run well.
But at the end of the benchmark
MESA: error: ZINK: vkQueueWaitIdle failed
There's an error
When you run supertuxkart and kdenlive
MESA: error: ZINK: vkQueueWaitIdle
An error occurs and does not execute.
When blender is
Warning: Could not find a matching GPU name. Things may not behave as expected.
Detected OpenGL configuration:
Vendor: Collabora Ltd
Renderer: zink (Turnip Adreno (TM) 740)
MESA: error: CreateSwapchainKHR failed with VK_ERROR_INITIALIZATION_FAILED
MESA: error: zink: swapchain killed 0x72942d22c0
MESA: error: zink: couldn't allocate memory! from heap 0
MESA: error: zink: couldn't allocate memory! from heap 0
The above error appears and does not execute.
Should I build a higher version of Mesa?
@hansm629 new version of patch can help you https://github.com/xMeM/termux-packages/blob/master/packages/mesa/wsi-termux-x11-v3.patch
@hansm629 new version of patch can help you https://github.com/xMeM/termux-packages/blob/master/packages/mesa/wsi-termux-x11-v3.patch
@romanovj
I did it!
by applying a new patch Turnip has been build!
Works fine without any errors!
Blender 3D and kdenlive work great!
At this rate, devices with SD8 Gen2 I think it can be used as a Linux computer!
new patch applied the turnip deb package. mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip
Thanks to you, I was able to get optimal GPU acceleration in PRoot Linux! :)
Thank you so much! I will leave a review after testing on the latest mesa 23.1.5.
all thanks to xMeM fot his patches
all thanks to xMeM fot his patches
@romanovj
I newly build mesa 23.1.5
and ran glmark2
.
Up to 4.7x performance improvement over virglrenderer-mesa-zink
.
It's almost 5x performance improvement.
very good.
[Benchmark Information]
virglrenderer-android | virglrenderer-mesa-zink | zink+turnip without DRI3 | zink+turnip with DRI3 |
---|---|---|---|
119 | 102 | 110 | 479 |
@hansm629 could you please upload the mesa 23.1.5 deb package as well? Thanks
@hansm629 could you please upload the mesa 23.1.5 deb package as well? Thanks
build mesa in Ubuntu is very easy.
After installing the mesa 23.1.5 build
Install turnip with DRI3
deb package.
mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip
[Install dependency packages and other packages]
$ sudo echo "deb-src [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" >> /etc/apt/sources.list
$ sudo apt update
$ sudo apt build-dep mesa
$ sudo apt install wget
[Download the mesa 23.1.5 source]
$ wget https://mesa.freedesktop.org/archive/mesa-23.1.5.tar.xz
$ tar -xf mesa-23.1.5.tar.xz
[Build and install]
$ cd mesa-23.1.5
$ meson build -Dgbm=enabled -Dopengl=true -Degl=enabled -Degl-native-platform=x11 -Dgles1=disabled -Dgles2=enabled -Ddri3=enabled -Dglx=dri -Dllvm=enabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers=swrast,virgl,zink -Dosmesa=true -Dglvnd=true -Dxmlconfig=disabled
$ sudo ninja -C build install
$ meson build -Dgbm=enabled -Dopengl=true -Degl=enabled -Degl-native-platform=x11 -Dgles1=disabled -Dgles2=enabled -Ddri3=enabled -Dglx=dri -Dllvm=enabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers=swrast,virgl,zink -Dosmesa=true -Dglvnd=true -Dxmlconfig=disabled
You dont need to compile opengl,virgl driver because freedreno opengl driver is still non functional on android afaik
Hi all, I'm very interested in this since I also have an S8 Ultra I've been meaning to use as my linux laptop.
Unfortunately, information seems scattered all over the place so I'm sort of an idiot right now.
Maybe this telegram would be of interest? t.me/adreno_driver
they post mesa turnip builds (some KGSL), though not sure what they are exactly.
also, is the deb supposed to be built/installed within chroot or within termux? I'm not exactly sure how the system layout works here.
With:
GL_RENDERER: zink Vulkan 1.3(Turnip Adreno (TM) 740 (MESA_TURNIP))
GL_VERSION: 4.6 (Compatibility Profile) Mesa 23.1.5
i have some weird issues with fonts in several apps when running with zink in proot xfce4: e.g. VSCODE Chromium:
Anybody can confirm?
@hansm629
I followed your instruction, compiling mesa-23.1.5 then installing the uploaded package, but when I run glmark2 without MESA_VK_WSI_DEBUG=sw the system complain that it DRI3 not detected.
do you have any advice?
$ meson build -Dgbm=enabled -Dopengl=true -Degl=enabled -Degl-native-platform=x11 -Dgles1=disabled -Dgles2=enabled -Ddri3=enabled -Dglx=dri -Dllvm=enabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers=swrast,virgl,zink -Dosmesa=true -Dglvnd=true -Dxmlconfig=disabled
You dont need to compile opengl,virgl driver because freedreno opengl driver is still non functional on android afaik
@xDoge26
There is a situation where a virgl
is needed.
I use virgl and turnip together on PRoot Ubuntu.
Because when I run XFCE4-SESSION
with zink+turnip
I get an error that the GUI is not displaying properly.
@Xynonners
turnip is an open source Vulkan driver from Adreno.
If you combine it with mesa zink
Hardware acceleration for Vulkan1.3, OpenGL4.5, OpenGL ES3.2 is possible on Linux.
To use with PRoot/Chroot
After installing the above deb package
vulkan on
TU_DEBUG=noconform
opengl on
MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform
If you run the program with the above environmental variables, GPU acceleration is achieved through the turnip.
With:
GL_RENDERER: zink Vulkan 1.3(Turnip Adreno (TM) 740 (MESA_TURNIP)) GL_VERSION: 4.6 (Compatibility Profile) Mesa 23.1.5
i have some weird issues with fonts in several apps when running with zink in proot xfce4: e.g. VSCODE Chromium:
Anybody can confirm?
@fasti123
What is your PRoot Linux environment like?
Are you using a Termux-X11 that supports DIR3?
What is the version information of the Chromium browser?
@hansm629
I followed your instruction, compiling mesa-23.1.5 then installing the uploaded package, but when I run glmark2 without MESA_VK_WSI_DEBUG=sw the system complain that it DRI3 not detected.
do you have any advice?
@babarosaM33
I think it's because you used Termux-X11 that doesn't support DRI3.
Use the latest version of Termux-X11.
https://github.com/termux/termux-x11/actions
DRI3 is supported starting with Build #474
.
Use a higher build version than that
I start xcfe session with GALLIUM_DRIVER=virpipe xfce4-session
using
termux-x11 :1.0 &
virgl_test_server_android --angle-gl &
I use the latest termux-x11 build
I start xcfe session with
GALLIUM_DRIVER=virpipe xfce4-session
usingtermux-x11 :1.0 & virgl_test_server_android --angle-gl &
I use the latest termux-x11 build
@fasti123
The environment I am using is
PRoot-Distro Ubuntu 22.04.3 LTS XFCE4-SESSIN 4.18
, so I don't think it will help much.
@hansm629 if i just use zink
alone and not vulkan 1.3 zink
the problems are gone.
As soon as i install the mesa-zink
package i get these font displaying issues.
@hansm629 if i just use
zink
alone and notvulkan 1.3 zink
the problems are gone. As soon as i install themesa-zink
package i get these font displaying issues.
@fasti123
What package did you install in Termux?
mesa-vulkan-icd-freedreno-dri3_23.1.4_aarch64.deb? (with mesa, vulkan-loader-generic) or vulkan-loader-android.deb? (with mesa-zink)
I both packages I tested it on the Galaxy S23 Ultra and Galaxy Tab S9 Ultra, but the XFCE4 session itself did not run.
https://github.com/termux/termux-packages/issues/17567 https://github.com/termux-user-repository/tur/issues/530
So in PRoot-Distro Ubuntu You have build a Turnip with DRI3 patch.
i don't have anything in termux installed i just run it with xcfe-session &
If i just install your https://github.com/xDoge26/proot-setup/files/12345979/mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip package in proot i get the following output for glmark2:
zink
if i install mesa-zink (pkg install mesa-zink) i then get:
Vulkan 1.3 zink
even if i compile & install mesa myself i just get zink output from glmark2 without vulkan.
Not sure what im missing.
i don't have anything in termux installed i just run it with xcfe-session &
If i just install your https://github.com/xDoge26/proot-setup/files/12345979/mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip package in proot i get the following output for glmark2:
zink
if i install mesa-zink (pkg install mesa-zink) i then get:Vulkan 1.3 zink
even if i compile & install mesa myself i just get zink output from glmark2 without vulkan. Not sure what im missing.
@fasti123
The screenshot you posted is not PRoot-Distro.
$ proot-distro install ubuntu
Install PRoot Ubuntu with the above command.
Log in to PRoot Ubuntu and Install key applications including XFCE4.
https://github.com/cheadrian/termux-chroot-proot-wine-box86_64/blob/main/Setup_Proot.md
You may want to refer to the link above.
After installing Ubuntu, install the turnip package I built.
[vulkan on]
TU_DEBUG=noconform applicationname
[OpenGL or OpenGL ES on]
MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname
If you run the program through the above environment variable command, turnip acceleration is applied.
And termux-x11 should use a version that supports DRI3.
recommend using at least mesa 23.1.3 or higher due to zink compatibility.
You can build it after downloading the source from PRoot.
Thanks @hansm629 i got it to work. What does vulkaninfo print out for you? i got an VK_ERROR_INITIALIZATION_FAILED error.
Does vulkaninfo
work for you in proot?
Thanks @hansm629 i got it to work. What does vulkaninfo print out for you? i got an VK_ERROR_INITIALIZATION_FAILED error. Does
vulkaninfo
work for you in proot?
@fasti123 I too have the same symptoms. It appears to be probably a PRoot bug.
You won't have any problems using it.
MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform glxinfo -B
If the command is entered, the GPU information is normally displayed.
@fasti123 what command do i have to use in termux like virgl_test_server_android and then in proot MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform applicationname ?
Exactly, but you don't need to use virgl_test_server_android
if you just want to use zink within proot.
AFAIK zink doesn't work with virgl_test_server_android at the moment
@hansm629 could you please upload the mesa 23.1.5 deb package as well? Thanks
build mesa in Ubuntu is very easy.
After installing the mesa 23.1.5 build Install
turnip with DRI3
deb package. mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip[Install dependency packages and other packages]
$ sudo echo "deb-src [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" >> /etc/apt/sources.list $ sudo apt update $ sudo apt build-dep mesa $ sudo apt install wget
[Download the mesa 23.1.5 source]
$ wget https://mesa.freedesktop.org/archive/mesa-23.1.5.tar.xz $ tar -xf mesa-23.1.5.tar.xz
[Build and install]
$ cd mesa-23.1.5 $ meson build -Dgbm=enabled -Dopengl=true -Degl=enabled -Degl-native-platform=x11 -Dgles1=disabled -Dgles2=enabled -Ddri3=enabled -Dglx=dri -Dllvm=enabled -Dshared-llvm=disabled -Dplatforms=x11,wayland -Dgallium-drivers=swrast,virgl,zink -Dosmesa=true -Dglvnd=true -Dxmlconfig=disabled $ sudo ninja -C build install
@fasti123 I tried it , it fails to start , I get crash log that heap size allocation failed or out of memory . installing the deb kgsl works but i dont see an improvement in video play back , I tested this with a 4k and 2k video with mpv on termux-x11 and glmark 2 , maybe glmark 2 got some 20-30 fps more . Am I missing something ?
I guess there won't ever be any hardware accelerated video decoding / encoding within termux. This would require e.g. VA-API support on the freedreno driver, which is not availaible. So only software side video decoding possible for e.g. youtube / vlc / mpv or any other software that is running within termux.
@fasti123 For some reason vlc works for 2k video without any noticeable lag for about 10 seconds then its stops video playback , and for 4k video it doesnt even work for 1 second
Here is the log root@localhost:~# vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform vlc /sdcard/DCIM/b.mp4
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2) [0000003000019270] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. QStandardPaths: wrong permissions on runtime directory /tmp, 0777 instead of 0700 ATTENTION: default value of option vblank_mode overridden by environment. libGL error: glx: failed to create drisw screen libGL error: failed to load driver: zink [0000007ae8c1cde0] mp4 demux: Fragment sequence discontinuity detected 1 != 0 ATTENTION: default value of option vblank_mode overridden by environment. libEGL warning: egl: failed to create dri2 screen ATTENTION: default value of option vblank_mode overridden by environment. libGL error: glx: failed to create drisw screen libGL error: failed to load driver: zink [0000007ab8004680] glx gl error: cannot create GLX context ATTENTION: default value of option vblank_mode overridden by environment. libEGL warning: egl: failed to create dri2 screen [0000007ab80013f0] xcb_xv vout display error: no available XVideo adaptor [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying? [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying? [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying? [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying? [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying? [0000007ab80013f0] xcb vout display error: shared memory server-side error: X11 error 10 [0000007ab80013f0] xcb vout display error: same error on retry: X11 error 10 [0000007ab80013f0] xcb_x11 vout display: using buggy X11 server - SSH proxying?
Im using the latest termux-x11 apk and compiled mesa 23.1.5 and im using https://github.com/xDoge26/proot-setup/files/12364475/mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip , it says screen is not dri3 compatible .
I managed to run a 2k video using vblank_mode=0 MESA_LOADER_DRIVER_OVERRIDE=zink TU_DEBUG=noconform vlc /sdcard/DCIM/video.mp4 . It doesnt have any noticeable lag . can anyone confirm this ?
yt-dlp LXb3EKWsInQ --format 623 the video i used
I made sure termux-x11 is set to 2k
https://github.com/xDoge26/proot-setup/files/12345979/mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_arm64.zip
works great but where is it companion armhf
(not real) https://github.com/xDoge26/proot-setup/files/12345979/mesa-vulkan-kgsl_23.3.0-devel-DRI3_20230815_armhf.zip
Hi @hansm629 , I am trying to achieve this in Proot-Debian xcfe4 with my Tab S8 plus.
Is every step mention need to be done inside Proot, or some on termux outside proof? I am new to this. I tried installing ur .Deb in proof. But failed. Can u walk me through steps, how to build, how to apply patches, what are each commands, how to check if it is done successfully?
Hi @hansm629 , I am trying to achieve this in Proot-Debian xcfe4 with my Tab S8 plus.
Is every step mention need to be done inside Proot, or some on termux outside proof? I am new to this. I tried installing ur .Deb in proof. But failed. Can u walk me through steps, how to build, how to apply patches, what are each commands, how to check if it is done successfully?
That's Right.
Log in to the PRoot-Distro Debian
and install the DRI3 patch Turnip driver I build.
Termux-X11 must also be installed with a version that supports DRI3.
mesa-vulkan-kgsl_23.3.0-devel-20230905_arm64.deb
This is the DRI3 patch Turnip driver
newly build by PRoot-Distro Debian
.
The latest commit contents of mesa git are reflected.
Confirmed Issue :
Blender 3D
(probably zink
bug?)vkmark
in Adreno7xx series
(DRI3 patch Compatibility issue?)
Hello. I am using
Termux-X11 PRoot-Distro Ubuntu 22.04 LTS XFCE4-SESSION 4.18
for my Galaxy S23 Ultra (Adreno 740) and Galaxy Tab S8+ 5G (Adreno 730).I installed
mesa-vulkan-kgsl_23.3.0-devel-20230803_arm64.deb
that you build, and I found that it did not work.As it works well with the Galaxy S20 (Adreno 650) PRoot, it does not appear that the currently built package supports the Adreno 7xx series.
Recently,
freedreno turnip
for the Termux package supports DRI3 as a patch, which seems to work with Turnip without inputting theMESA_VK_WSI_DEBUG=sw
environment variable and perform better.I request Adreno 7xx series support and DRI3 patching for the turnip package for PRoot.