-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
addpkg(main/termux-wsi-layer): 0.0.1 #22353
base: master
Are you sure you want to change the base?
Conversation
I do not have any multithread example to test, so currently multithread support is not implemented. |
@twaik
|
@hansm629 the solution is still experimental and is not supposed to work on all possible devices because it uses APIs not supposed to be used in non-vendor apps. I am still working on it. Later I will publish a version with improved debugging. |
@twaik |
I conducted additional testing. Interestingly, the Additionally, on all
It seems that the reason why it didn’t work on the I hope this information will be helpful for future debugging!😀 glmark2-es2ARM Mali-G78MP14 = Score: 709
Samsung Xclipse 940 = failed
Qualcomm Adreno 650 = Score: 1167
Qualcomm Adreno 740 = Score: 845
Qualcomm Adreno 750 = Score: 670
|
I am pretty sure upstream Luanti has mostly already done this on **all its X11-based official targets**, but I did not yet do this to Luanti-on-TUR because I have not had time to finish fixing + testing this mode. In particular I believe that this mode has a unique potential to possibly engage with twaik's `termux-wsi-layer` and possibly benefit from an extremely huge performance boost on some specific devices, if it can be made to work with it. termux/termux-packages#22353 However, unfortunately right now when I try to use this PR with `termux-wsi-layer` installed on a device where it works with `glmark2-es2`, I see this error ``` Thread 1 "luanti" received signal SIGSEGV, Segmentation fault. 0x0000007fad9782b0 in XGetVisualInfo () from /data/data/com.termux/files/usr/lib/libX11.so (gdb) bt from /data/data/com.termux/files/usr/lib/libX11.so config=0xb400007d1ca54f00, attribute=12334, value=0x7fffffd464) at /data/data/com.termux/files/home/termux-packages/packages/termux-wsi-layer/egl.c:133 this=0xb400007daca1c9b0) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CEGLManager.cpp:185 this=this@entry=0xb400007ddca220d0) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CIrrDeviceLinux.cpp:414 this=0xb400007ddca220d0, param=...) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CIrrDeviceLinux.cpp:166 at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/Irrlicht.cpp:66 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/renderingengine.cpp:151 receiver=0xb400007d9ca1d630) at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/renderingengine.cpp:206 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/clientlauncher.cpp:290 cmd_args=...) at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/clientlauncher.cpp:98 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/main.cpp:264 (gdb) ``` `0001-force-egl-priority-over-glx.patch`: this is minetest/minetest#15286 but applied to Luanti-on-TUR `0005-toggle-on-the-recent-migration-away-from-sdl2.patch`: this is minetest/minetest#15284 but applied to Luanti-on-TUR `0006-fix-incompatible-type-ekey-code.patch`: I wrote this, this is necessary to fix a minor build error when SDL2 is disabled in Luanti
I am pretty sure upstream Luanti has mostly already done this on **all its X11-based official targets**, but I did not yet do this to Luanti-on-TUR because I have not had time to finish fixing + testing this mode. In particular I believe that this mode has a unique potential to possibly engage with twaik's `termux-wsi-layer` and possibly benefit from an extremely huge performance boost on some specific devices, if it can be made to work with it. termux/termux-packages#22353 However, unfortunately right now when I try to use this PR with `termux-wsi-layer` installed on a device where it works with `glmark2-es2`, I see this error ``` Thread 1 "luanti" received signal SIGSEGV, Segmentation fault. 0x0000007fad9782b0 in XGetVisualInfo () from /data/data/com.termux/files/usr/lib/libX11.so (gdb) bt from /data/data/com.termux/files/usr/lib/libX11.so config=0xb400007d1ca54f00, attribute=12334, value=0x7fffffd464) at /data/data/com.termux/files/home/termux-packages/packages/termux-wsi-layer/egl.c:133 this=0xb400007daca1c9b0) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CEGLManager.cpp:185 this=this@entry=0xb400007ddca220d0) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CIrrDeviceLinux.cpp:414 this=0xb400007ddca220d0, param=...) at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/CIrrDeviceLinux.cpp:166 at /data/data/com.termux/files/home/.termux-build/luanti/src/irr/src/Irrlicht.cpp:66 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/renderingengine.cpp:151 receiver=0xb400007d9ca1d630) at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/renderingengine.cpp:206 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/clientlauncher.cpp:290 cmd_args=...) at /data/data/com.termux/files/home/.termux-build/luanti/src/src/client/clientlauncher.cpp:98 at /data/data/com.termux/files/home/.termux-build/luanti/src/src/main.cpp:264 (gdb) ``` `0001-force-egl-priority-over-glx.patch`: this is minetest/minetest#15286 but applied to Luanti-on-TUR `0005-toggle-on-the-recent-migration-away-from-sdl2.patch`: this is minetest/minetest#15284 but applied to Luanti-on-TUR `0006-fix-incompatible-type-ekey-code.patch`: I wrote this, this is necessary to fix a minor build error when SDL2 is disabled in Luanti
be697ef
to
697540d
Compare
@hansm629 can you please check newer version on devices where the package fails to work? |
@twaik |
@twaik
|
5c526dd
to
cf59b8d
Compare
@hansm629 fixed error in newer version. |
dfa490b
to
62d8188
Compare
@twaik
|
62d8188
to
ffed72d
Compare
16fde5b
to
af475c1
Compare
It is ready. |
@twaik
|
af475c1
to
84dccda
Compare
Looks like it was a linking error. Fixed it. |
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings
@twaik
|
Can you please post the |
@twaik |
84dccda
to
8073cb0
Compare
8073cb0
to
b52d1dc
Compare
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - I made 6 patches, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - I made 6 patches, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - I made 6 patches, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
@twaik https://drive.google.com/file/d/14rHlgTWqxGGndUMXj9KHxBlHcUizef0y/view?usp=sharing |
I do not think I can debug this. It looks like the source of the problem is using VNDK api, which is supposed to be used only by vendors. It should not even try to work in the case if vendor (samsung) changed internal ANativeWindow structure, query or perform key bindings or something else. Probably better way will be EGL api wrapping instead of implementing ANativeWindow related stuff, even in the case if we will have less weaker EGL support we will have much wider range of supported devices. |
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - I made 6 patches, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
@twaik By the way, when I tried to run the Is it possible for the Qualcomm Adreno 740 = Score: 870
|
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](#22353) or [new virglrenderer](#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
Some work done on wsi for prop (vulkan) |
Works on my device.
And has much better performance than llvmpipe and virpipe.
It improves only EGL+GLES2 performance, GL is untouched.
Vulkan implementation is planned.
llvmpipe
virpipe+virglrenderer-android+angle-null backend
termux-wsi-layer