Open hansm629 opened 1 year ago
IIRC using ANGLE doesn't provide much better performance. I'll do some testing locally and provide performance feedback on my device.
IIRC using ANGLE doesn't provide much better performance. I'll do some testing locally and provide performance feedback on my device.
Yes, I don't think the performance will improve either.
However, it is compatible with higher OpenGL versions Looking forward to Vulkan hardware acceleration.
Can you tell me how compatible it is with the performance?
There are two ways to use ANGLE with virgl. One is Mesa's GL<-> virgl <-> ANGLE's GL <-> Android's GL/Vulkan
, the other is ANGLE's GL <-> Mesa's GL <-> virgl <-> Android's GL
.
I've done some tests on the former, but is shows GL Version: 2.1
in glmark2.
I'll do some tests for the latter one this afternoon (GMT+8).
There are two ways to use ANGLE with virgl. One is
Mesa's GL<-> virgl <-> ANGLE's GL <-> Android's GL/Vulkan
, the other isANGLE's GL <-> Mesa's GL <-> virgl <-> Android's GL
.I've done some tests on the former, but is shows
GL Version: 2.1
in glmark2.I'll do some tests for the latter one this afternoon (GMT+8).
Thank you for the test :)
My questions are as follows.
It's a shame that the former test still shows OpenGL2.1. (T_T)
I wonder what the latter test will be like.
Do you think ANGLE can replace virglender-android? It's something I'm looking forward to it.
And when GALLIUM_DRIVER=virpipe is applied in the proot-distro ubuntu There was an issue that GL renderer information could not be displayed normally due to an error when entering the glxinfo -B command in the terminal.
I wonder if ANGLE is the same. I'll look forward to the additional test :)
<p.s> Ah, this is a separate question. Is there a way to use zink+turnip on proot-distro at the moment?
can bring back #13809 if needed
There are two ways to use ANGLE with virgl. One is
Mesa's GL<-> virgl <-> ANGLE's GL <-> Android's GL/Vulkan
, the other isANGLE's GL <-> Mesa's GL <-> virgl <-> Android's GL
.I've done some tests on the former, but is shows
GL Version: 2.1
in glmark2.I'll do some tests for the latter one this afternoon (GMT+8).
Are you making any progress regarding additional tests? I'm so curious about the test results :)
I have not yet succeeded in running ANGLE over virglrenderer-android with glmark2... I'll share results here once I finish it.
Results for Mesa's GL<-> virgl <-> ANGLE's GL <-> Android's GL/Vulkan
.
TL;DR
Android's GL | ANGLE over Android's GL | ANGLE over Android's Vulkan | ANGLE over Android's Vulkan (Null Display) |
---|---|---|---|
109 | 94 | 57 | 56 |
Android's GL
ANGLE over Android's GL
ANGLE over Android's Vulkan
ANGLE over Android's Vulkan (Null Display)
x
Android's GL
Thank you for posting test results! :)
ANGLE over Android's GL is It's not bad because it's almost a margin of error compared to Android's GL!
Is the GL version still OpenGL2.1? As far as I know
When converting OpenGL ES -> OpenGL to ANGLE OpenGL ES2.0 -> OpenGL2.1 OpenGL ES3.0 -> OpenGL3.3 OpenGL ES3.1 -> OpenGL4.5
I'm aware of it being converted to Is it not working properly yet?
Oh! The angle-android series package that you built Is it the same as the existing virglender-android in the case of applying it to the proot-distro?
Delete the virglender-android and install the angle-android*.deb
$ virgl_test_server_android & $ XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac & $ export DISPLAY=:0 GALLIUM_DRIVER=virpipe
Would the above process be correct?
There is no need to delete virglrenderer-android package. virgl_test_server_android
should run with envvar EPOXY_USE_ANGLE=1
.
I tested it with tigervnc.
EPOXY_USE_ANGLE=1 virgl_test_server_android &
vncserver :1
DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2
There is no need to delete virglrenderer-android package.
virgl_test_server_android
should run with envvarEPOXY_USE_ANGLE=1
.I tested it with tigervnc.
EPOXY_USE_ANGLE=1 virgl_test_server_android & vncserver :1 DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2
Thank you! I'll test it after work :)
If you add the "MESA_GL_VERSION_OVERRIDE=" variable Will it work?
For example, "MESA_GL_VERSION_OVERRIDE=3.3"?
I think it will be better to make angle available to glvnd. In this case it will be possible to override virglrenderer's libGLESv2 with environment variable (__EGL_VENDOR_LIBRARY_FILENAMES
). You can make bash wrapper for accessing it (virgl_test_server_android_angle
?). Or we can use it with linking directly to libGLESv2/3. Non-GLESv2 symbols can be generated with modified epoxy's gen_dispatch.py
script (modified to ignore GLES2 symbols and generates stubs for GL symbols`.
You should know that libepoxy has a small overhead. Avoiding it can let us increase framerate for 1/2 or 1/3 frames per sec, maybe more. Which will give us 2-3 points in glmark2.
@licy183 We can achieve much better performance with patching mesa to avoid using util_copy_rect (link). Maybe you can help with that.
@licy183 ?
There is no need to delete virglrenderer-android package.
virgl_test_server_android
should run with envvarEPOXY_USE_ANGLE=1
.I tested it with tigervnc.
EPOXY_USE_ANGLE=1 virgl_test_server_android & vncserver :1 DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2
hsm@localhost:~$ export DISPLAY=:0 hsm@localhost:~$ GALLIUM_DRIVER=virpipe xfce4-session Couldn't open
There is no need to delete virglrenderer-android package.
virgl_test_server_android
should run with envvarEPOXY_USE_ANGLE=1
.I tested it with tigervnc.
EPOXY_USE_ANGLE=1 virgl_test_server_android & vncserver :1 DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2
I need your help. I have installed all the related packages you built in Termux.
Unpacking angle-android (2.1.21474-75e64719-0) ... Setting up angle-android (2.1.21474-75e64719-0) ... Setting up angle-android-gl (2.1.21474-75e64719-0) ... Setting up angle-android-vulkan-null (2.1.21474-75e64719-0) ... Setting up angle-android-vulkan (2.1.21474-75e64719-0) ...
After installing the four deb packages I proceeded with the following command.
And one by one
$ EPOXY_USE_ANGLE=1 virgl_test_server_android & [1] 24624 $ XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :0 -ac & [2] 24776 $ proot-distro login ubuntu --user hsm --shared-tmp --no-sysvipc
hsm@localhost:~$ ./startx.sh hsm@localhost:~$ /usr/bin/startxfce4: X server already running on display :0 Couldn't open libEGL_angle.so: dlopen failed: library "libEGL_angle.so" not found lost connection to rendering server on 8 read -1 104
It is not working because of the above error.
The script on "startx.sh" is
"export DISPLAY=:0 GALLIUM_DRIVER=virpipe dbus-launch --exit-with-session startxfce4 &"
It is entered as .
For traditional virglender-android Termux-X11 called Ubuntu GUI when you entered the step
How can we solve the problem? T_T
I think it will be better to make angle available to glvnd. In this case it will be possible to override virglrenderer's libGLESv2 with environment variable (
__EGL_VENDOR_LIBRARY_FILENAMES
).
I'm trying to let ANGLE work over virgl, but I haven't succeeded yet.
You should know that libepoxy has a small overhead. Avoiding it can let us increase framerate for 1/2 or 1/3 frames per sec, maybe more. Which will give us 2-3 points in glmark2.
Actually virglrenderer depends on libepoxy from the start. We could fork it and remove libepoxy dependencies, but there will be much work for us.
We can achieve much better performance with patching mesa to avoid using util_copy_rect (link). Maybe you can help with that.
Yeah, I'll look into it if I get more free time, but I'm not sure whether I'm able to do it...
Actually virglrenderer depends on libepoxy from the start. We could fork it and remove libepoxy dependencies, but there will be much work for us.
I know it. We can make some libepoxy emulation to increase performance (a bit). In this case we will be able to use ANGLE with LD_PRELOAD trick.
Virglrenderer depends on epoxy_is_desktop_gl
, epoxy_has_glx_extension
(which can be stubbed), epoxy_gl_version
, epoxy_has_gl_extension
and GL functions. We can make epoxy_is_desktop_gl
function which always returns GL_FALSE
, epoxy_has_glx_extension
which also reports GL_FALSE
in all cases, and copy behaviour of epoxy_gl_version
and epoxy_has_gl_extension
. But we can get rid of epoxy's dispatchers and generate only strong references to real GLES functions and GL stubs to avoid linking errors.
Ok, I tried to make this optimization and can say that it is pretty much useless. I checked both patched and unpatched virgl_vtest_server on PC and got 208 (patched) and 206 (not patched) points in glmark2. If somebody wants to spend time he may check what I've done. virepoxy.tar.gz
I haven't made ANGLE work properly as an OpenGL driver, maybe it isn't designed to be used in this way...
As far as I know it is GLES1/2/3 only.
The goal of this issue is using ANGLE to wrap OpenGL drivers from Mesa in order to provide higher versions of OpenGL. However, I've recently found this to be quite challenging. Termux has switched to using glvnd to provide OpenGL drivers, and ANGLE hasn't been compatible with glvnd yet. Meanwhile, Termux has enabled SOVERSION name suffix for libraries related to OpenGL drivers, whereas ANGLE lacks it.
Before testing, I created symlinks from libEGL.so
/libGL.so
to libEGL.so.1
/libGL.so.1
, modified some coes to let ANGLE dynamically load the specify the Mesa OpenGL driver I compiled for testing (which is compiled without glvnd), but it didn't run successfully. ANGLE can also run over Vulkan. I've done some testing for it, but it didn't succeed whether running over swiftshader (which Chrome-related software uses for software rendering) or over lavapipe (Mesa's Vulkan software driver).
In summary, using ANGLE to provide OpenGL drivers is an experimental feature. I would be grateful if anyone interested in this could offer any help.
Actually I think I can try to write some kind of GLVND layer for ANGLE. I do not think it will be very complicated.
The main problem of ANGLE is that it does not support X11 WSI so it may be challenging.
Why is it worth to add this package?
I am using GPU acceleration via virglender-android after installing proot-distro ubuntu on the Galaxy S23 Ultra and Galaxy Tab S8+ 5G.
but It seems that the performance is not coming out satisfactorily due to more overhead than expected.
Even for Adreno 730/740, glxgears and glmark2 frames are coming out less than Adreno650 based on GALLIUM_DRIVER=virpipe.
However, the webgl demo through Firefox has better performance than the Adreno 650 and seems to be a compatible issue for the Adreno 700 series...
The biggest problem is There are some programs that cannot be used normally when using GALLIUM_DRIVER=virpipe.
For example, Blender 3D There are symptoms where all text in the UI is not displayed and the program is frozen when selecting an object
As for Kdenlive There are symptoms that are not being implemented at all.
Both programs seem to recommend a minimum of OpenGL3.3, but GPU acceleration through virglender-android seems to be limited to OpenGL2.1.
Like UTM Use Google ANGLE as a back renderer for Termux If you convert the OpenGL ES of the Android host GPU to OpenGL and use virgl to accelerate the GPU in the proot-distro
I don't think there will be much improvement in performance in this case
but It will be more compatible with higher GL versions, and Vulkan will also be able to accelerate hardware.
I'm curious about opinion on this.
Or than virglender-android in a proot-distro environment I want to know if there is a better GPU acceleration solution. :)
Home page URL
https://github.com/google/angle
Source code URL
https://github.com/google/angle
Packaging policy acknowledgement
Additional information
No response