termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

mesa-vulkan-icd-freedreno-dri3's patch didn't work well on chroot/Debian Sid

Open dontknowhy opened this issue 1 year ago • 5 comments

PS:I don't know where to post this issue so I put it here. I'm sorry if I was wrong. There are probably some machine translated texts because I'm not a native English speaker.

What happened:

I tried to apply patches on Mesa in order to enable Turnip+Zink on my SM-G9980(aka. S21 Ultra). After I applied some patches: Screenshot_20240202_105608_MT Manager,I successfully ran vkmark on my device with a reasonable score(Running in full screen): Screenshot_20240201_212746_ZeroTermux. (And Termux:X11 can display images) BUT, when I tried to run glxgears. It loaded something and it was rendering something. But there was nothing on display. Screenshot_20240202_105441_ZeroTermux

info:

$ termux-info
Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.48
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~nmzIawlmNPqMiDLLQH1l3w==/com.termux-TcO3ojwe3ZXD_P9UHLt4ag==/base.apk
TERMUX_APP__APK_RELEASE=UNKNOWN
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=31971
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c9,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c9,c257,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10265
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=117
TERMUX_APP__VERSION_NAME=0.118.38
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.38
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.ustc.edu.cn/termux/apt/termux-main stable main
deb https://mirrors.ustc.edu.cn/termux/apt/termux-x11 x11 main
deb https://mirrors.ustc.edu.cn/termux/apt/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.40.5
Android version:
14
Kernel build information:
Linux localhost 5.4.233-qgki-1284591-abG9980ZCS6FXA1 #1 SMP PREEMPT Fri Jan 5 16:56:41 KST 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G9980
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so

meson options

meson .. -Dgallium-drivers=virgl,zink,swrast -Dvulkan-drivers=freedreno,swrast -Dplatforms=x11,wayland -Dbuildtype=release -Dgles2=enabled -Dfreedreno-kmds=kgsl,msm -Ddri3=enabled -Dgallium-extra-hud=true -Dglx=dri -Dxlib-lease=enabled -Dvulkan-beta=true -Dglx-direct=true

I followed a guide

https://www.bilibili.com/opus/810419140036657170

What about Termux itself?

$ glxinfo
name of display: :0
../src/src/util/xmlconfig.c:1274: unsigned char driQueryOptionb(const driOptionCache *, const char *): assertion "cache->info[i].name != NULL" failed
Aborted

$ es2_info
libEGL warning: DRI3: Screen seems not DRI3 capable
../src/src/util/xmlconfig.c:1274: unsigned char driQueryOptionb(const driOptionCache *, const char *): assertion "cache->info[i].name != NULL" failed
Aborted

$ vulkaninfo
...Some text is omitted...
GPU0:
VkPhysicalDeviceProperties:
---------------------------
	apiVersion        = 1.3.267 (4206859)
	driverVersion     = 23.3.2 (96481282)
	vendorID          = 0x5143
	deviceID          = 0x6060001
	deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
	deviceName        = Turnip Adreno (TM) 660
	pipelineCacheUUID = ddf2bc2a-3b02-009f-5b5a-bc92c088a02b
...

$ vkcube
Selected GPU 0: Turnip Adreno (TM) 660, type: IntegratedGpu
(It just work.)

In short, Vulkan can do his job while Zink can't. The Xwayland package in this repository enabled dri3 so I didn't compile it.

dontknowhy avatar Feb 02 '24 05:02 dontknowhy

Ping: @xMeM

licy183 avatar Feb 03 '24 10:02 licy183

Try building with only the wsi-termux-x11.patch and tu_kgsl_export_dmabuf.patch patches applied.

xMeM avatar Feb 03 '24 11:02 xMeM

Try building with only the wsi-termux-x11.patch and tu_kgsl_export_dmabuf.patch patches applied.

Same issue.

dontknowhy avatar Feb 07 '24 04:02 dontknowhy

Try building with only the wsi-termux-x11.patch and tu_kgsl_export_dmabuf.patch patches applied.

Same issue.

Does zink in native termux also not work?

xMeM avatar Feb 07 '24 05:02 xMeM

Try building with only the wsi-termux-x11.patch and tu_kgsl_export_dmabuf.patch patches applied.

Same issue.

Does zink in native termux also not work?

YES,but only Vulkan works. glmark2 also can't display anything but it can render something.

dontknowhy avatar Feb 09 '24 02:02 dontknowhy