-
-
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
[Package]: Virglrenderer that use android gles driver to provide OpenGL acceleration in proot #14517
Comments
I do not think we need that application. #10118 (comment) . |
Emmm... I successfully made Run The prebuilt binaries: virgl-angle-vulkan-aarch64.zip I've tried to make it work on Android GLES without ANGLE, but I failed. |
That is the reason I want to make it push gl texture contents to xcb drawable with xcb_shm_put_image. This way will be independent from vendor implementation. Do you know where located code triggered by |
IIUC |
Not exactly. mittorn's implementation simply blits rendered buffer to SurfaceView. My idea is to blit rendered buffer to X11 window requested rendering with |
The virgl renderer doesn't work out of box for Adreno. The error seems to be related to Adreno's OpenGLES implementation. See https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/223 and https://developer.qualcomm.com/forum/qdn-forums/software/adreno-gpu-sdk/34738. But I don't have other devices for test.
|
So it can work on zink and non-adreno GPUs, right? |
If you are only experiencing problems with device I can let you use my device remotely, with adb and scrcpy. It will be slower but you will be able to test. |
Emmm... I'm not sure about it. Anyway, it can work on ANGLE with vulkan backend.
Thank you, don't bother. Maybe I'll borrow Android devices of my friends tomorrow to do some tests. I'll also try to port the application for Termux in the following days. Let's see whether it will work or not for Termux. |
Do you need some help with xcb? I can write code to make it draw back to X server. |
I'm not sure, but I'll ask for help if needed. Thank you in advance! |
After marking |
Thanks , worked out of the box in chroot with adreno 610 |
glmark2 benchmarks: RX5500M: 2406 Android: 188 |
What soft did you use to measure Android and virglrenderer GL/GLES? Is Zink is zink only or vrglrenderer + zink? |
android - native glmark2 benchmark Virglrenderer GL/GLES - virglrenderer-android runned on Termux |
I've seen this only after replying here. It is possible to enable shm if it will help us to make it faster. |
Emmm... I don't think protocol version 2 can be used on Android, because it sends the file descriptor of DMABUF from guest to host, but Android's GLES cannot use it.
…---Original---
From: "Twaik ***@***.***>
Date: Wed, Mar 8, 2023 13:34 PM
To: ***@***.***>;
Cc: "Uchiha ***@***.******@***.***>;
Subject: Re: [termux/termux-packages] [Package]: Virglrenderer that useandroid gles driver to provide OpenGL acceleration in proot (Issue #14517)
Shared memory not supported, fallbacking to protocol version 0
I've seen this only after replying here. It is possible to enable shm if it will help us to make it faster.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Even without it we can a bit improve perfomance. Your version from repos
Your version with my patch
Not very significant, but still better. +14% FPS in regular test and +35% FPS in fullscreen test. Can we make it work as DMABUF? I do not really know why zink is faster but maybe it is because it somehow implements/emulates this behaviour. |
For some reason llvmpipe is faster than both versions of virglrenderer...
|
IIRC memfd system call is not disabled by Android SELinux. It can be enabled by removing that patch. But I don't think it is possible for us to do some operations on DMABUF as Linux does because of the SELinux of Android.
Emmm... This happens on my device too, but glmark2 gives more scores than glxgears. |
I did not say it is disable by SELinux. It is disabled in kernel config (in most devices I tested). |
I don't know about it. But on my devices (MIX2s with Android 9 and MIX4 with Android 12), they work as expected... |
It is pretty weird. I'll add support for it in I failed to setup gl in proot environment. I even do not have MIT-SHM working in proot. Do not know why. But I succeed to install glmark2 in termux with this buildscript. You were right, llvmpipe
Your version from repos
Your version with my patch
It was printing
after every line so I removed it. |
It looks like glmark2-egl with llvmpipe
glmark2-egl with your version from repo
glmark2-egl with your version with my patch
glmark2-es2 with llvmpipe
glmark2-es2 with your version from repos
glmark2-es2 with your version with my patch
glmark2 from F-Droid
But why |
This program, if cross-compiled with target api level 28 or newer (to get fexecve), can be used to check if a device has a working memfd implementation. (Can't compile it in termux since we target api level 24). A pre-compiled aarch64 blob can be downloaded here |
Wait, BTW, @Grimler91, can we make |
Thanks for the information. Actually I used to use |
My gpu only have |
Alex ported some codes of |
I don't think so, because it seems that your GPU support |
I don't know what actually happens. If you set |
I'm afraid not. IIRC the GL version of virglrenderer over Android's GLES is 2.1. |
this is not on the Termux Package yet tough is it? |
So is it able to run compiz with virglrender-android? |
any plan of venus ? it can bring vulkan to the proot/chroot (so that we can use dxvk to replace wined3d). and possible to get higher version of gl by using zink |
.I am using Mali-51 which supports opengl 3.1.I wanna use godot inside termux which require opengl 3.3. I don't wanna use llvm-pipe for rendering. Is there any way I can use my gpu with opengl-3.3 api with minimul performance overhead? **MESA_GL_VERSION_OVERRIDE=4.0 doesn't work.**THANKS. (It would be better if I can run godot inside termux other than distro.) |
@licy183 Is it possible to make virglrenderer-android use AHardwareBuffer instead of memfd to avoid using glReadPixels? |
@licy183 can we make virgl_test_server_android respect TMPDIR? It will let people use it with proot/chroot without bind-mounting /tmp of chroot. We should only change one line.
|
I've changed this socket path. 9167972 |
Can you please represent change in --help? |
Why do you want to add this package to Termux?
I want to get 3D accel using Virgl apk that use gles driver . But the downside of virgl apk is 32bit only, and I have to modify shared user id for both termux and virgl apk so that virgl apk can access proot distro /tmp .
This is community version of virgl apk that provide opengl 3.3 for proot distro using android gles driver. But it only contain 32bit libs . So is it possible to port it to termux because gles 3.2 is widely avaiable and vulkan driver is too old for zink ?
VirGL_apk.zip
Home page URL
No response
Source code URL
https://github.com/mittorn/virglrenderer-android
Packaging policy acknowledgement
Additional information
No response
The text was updated successfully, but these errors were encountered: