termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.94k stars 2.98k forks source link

[Package]: Feature suggestions and package requests (Google ANGLE + virgl) #17406

Open hansm629 opened 1 year ago

hansm629 commented 1 year ago

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

licy183 commented 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.

hansm629 commented 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.

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?

licy183 commented 1 year ago

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).

hansm629 commented 1 year ago

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).

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?

truboxl commented 1 year ago

can bring back #13809 if needed

hansm629 commented 1 year ago

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).

Are you making any progress regarding additional tests? I'm so curious about the test results :)

licy183 commented 1 year ago

I have not yet succeeded in running ANGLE over virglrenderer-android with glmark2... I'll share results here once I finish it.

licy183 commented 1 year ago

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

``` ~ $ DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2 ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: virgl (Adreno (TM) 660) GL_VERSION: 2.1 Mesa 23.1.3 Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=false: FPS: 140 FrameTime: 7.184 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=true: FPS: 93 FrameTime: 10.821 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=nearest: FPS: 168 FrameTime: 5.975 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=linear: FPS: 153 FrameTime: 6.565 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=mipmap: FPS: 136 FrameTime: 7.368 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=gouraud: FPS: 103 FrameTime: 9.711 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=blinn-phong-inf: FPS: 109 FrameTime: 9.227 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=phong: FPS: 105 FrameTime: 9.573 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=cel: FPS: 113 FrameTime: 8.868 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=high-poly: FPS: 75 FrameTime: 13.393 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=normals: FPS: 157 FrameTime: 6.392 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=height: FPS: 120 FrameTime: 8.377 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 114 FrameTime: 8.847 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 116 FrameTime: 8.695 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [pulsar] light=false:quads=5:texture=false: FPS: 126 FrameTime: 7.947 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 103 FrameTime: 9.723 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] effect=shadow:windows=4: FPS: 100 FrameTime: 10.036 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 77 FrameTime: 13.062 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 54 FrameTime: 18.774 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 91 FrameTime: 11.084 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [ideas] speed=duration: FPS: 101 FrameTime: 9.928 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [jellyfish] : FPS: 87 FrameTime: 11.540 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [terrain] : FPS: 36 FrameTime: 28.233 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shadow] : FPS: 99 FrameTime: 10.151 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [refract] : FPS: 45 FrameTime: 22.532 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=0: FPS: 125 FrameTime: 8.064 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=5:vertex-steps=0: FPS: 123 FrameTime: 8.162 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=5: FPS: 128 FrameTime: 7.830 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=low:fragment-steps=5: FPS: 158 FrameTime: 6.368 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=medium:fragment-steps=5: FPS: 117 FrameTime: 8.556 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 119 FrameTime: 8.436 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 121 FrameTime: 8.312 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 130 FrameTime: 7.747 ms ======================================================= glmark2 Score: 109 ======================================================= ```

ANGLE over Android's GL

``` ~ $ DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2 ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: virgl (ANGLE (Qualcomm, Adreno (TM) 660, OpenGL ES 3.2 V@05...) GL_VERSION: 2.1 Mesa 23.1.3 Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=false: FPS: 101 FrameTime: 9.937 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=true: FPS: 105 FrameTime: 9.560 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=nearest: FPS: 107 FrameTime: 9.422 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=linear: FPS: 116 FrameTime: 8.644 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=mipmap: FPS: 124 FrameTime: 8.074 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=gouraud: FPS: 93 FrameTime: 10.774 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=blinn-phong-inf: FPS: 94 FrameTime: 10.718 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=phong: FPS: 96 FrameTime: 10.491 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=cel: FPS: 96 FrameTime: 10.460 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=high-poly: FPS: 70 FrameTime: 14.415 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=normals: FPS: 120 FrameTime: 8.356 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=height: FPS: 134 FrameTime: 7.506 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 130 FrameTime: 7.740 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 97 FrameTime: 10.342 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [pulsar] light=false:quads=5:texture=false: FPS: 128 FrameTime: 7.868 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 75 FrameTime: 13.480 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] effect=shadow:windows=4: FPS: 87 FrameTime: 11.542 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 49 FrameTime: 20.640 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 43 FrameTime: 23.665 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 70 FrameTime: 14.436 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [ideas] speed=duration: FPS: 65 FrameTime: 15.388 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [jellyfish] : FPS: 99 FrameTime: 10.149 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [terrain] : FPS: 24 FrameTime: 41.685 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shadow] : FPS: 87 FrameTime: 11.567 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [refract] : FPS: 35 FrameTime: 29.164 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=0: FPS: 135 FrameTime: 7.437 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=5:vertex-steps=0: FPS: 109 FrameTime: 9.240 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=5: FPS: 111 FrameTime: 9.028 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=low:fragment-steps=5: FPS: 115 FrameTime: 8.768 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=medium:fragment-steps=5: FPS: 107 FrameTime: 9.375 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 111 FrameTime: 9.068 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 106 FrameTime: 9.482 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 109 FrameTime: 9.246 ms ======================================================= glmark2 Score: 94 ======================================================= ```

ANGLE over Android's Vulkan

``` ~/.../backend-vulkan/arm64-v8a $ DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2 ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: virgl (ANGLE (Qualcomm, Vulkan 1.1.128 (Adreno (TM) 660 (0x...) GL_VERSION: 2.1 Mesa 23.1.3 Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=false: FPS: 56 FrameTime: 18.025 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=true: FPS: 66 FrameTime: 15.243 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=nearest: FPS: 59 FrameTime: 17.016 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=linear: FPS: 59 FrameTime: 17.090 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=mipmap: FPS: 65 FrameTime: 15.600 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=gouraud: FPS: 59 FrameTime: 17.030 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=blinn-phong-inf: FPS: 56 FrameTime: 17.989 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=phong: FPS: 76 FrameTime: 13.225 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=cel: FPS: 64 FrameTime: 15.786 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=high-poly: FPS: 48 FrameTime: 21.221 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=normals: FPS: 91 FrameTime: 11.030 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=height: FPS: 70 FrameTime: 14.333 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 66 FrameTime: 15.227 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 59 FrameTime: 17.140 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [pulsar] light=false:quads=5:texture=false: FPS: 70 FrameTime: 14.347 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 53 FrameTime: 19.180 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] effect=shadow:windows=4: FPS: 49 FrameTime: 20.544 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 44 FrameTime: 23.211 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 38 FrameTime: 26.502 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 36 FrameTime: 28.502 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [ideas] speed=duration: FPS: 36 FrameTime: 27.887 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [jellyfish] : FPS: 57 FrameTime: 17.708 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [terrain] : FPS: 18 FrameTime: 55.901 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shadow] : FPS: 52 FrameTime: 19.465 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [refract] : FPS: 24 FrameTime: 42.608 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=0: FPS: 58 FrameTime: 17.298 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=5:vertex-steps=0: FPS: 62 FrameTime: 16.199 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=5: FPS: 73 FrameTime: 13.775 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=low:fragment-steps=5: FPS: 65 FrameTime: 15.397 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=medium:fragment-steps=5: FPS: 86 FrameTime: 11.730 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 80 FrameTime: 12.529 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 59 FrameTime: 17.177 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 66 FrameTime: 15.294 ms ======================================================= glmark2 Score: 57 ======================================================= ```

ANGLE over Android's Vulkan (Null Display)

``` ~/.../backend-vulkan-null/arm64-v8a $ DISPLAY=:1 GALLIUM_DRIVER=virpipe glmark2 ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. ======================================================= glmark2 2023.01 ======================================================= OpenGL Information GL_VENDOR: Mesa GL_RENDERER: virgl (ANGLE (Qualcomm, Vulkan 1.1.128 (Adreno (TM) 660 (0x...) GL_VERSION: 2.1 Mesa 23.1.3 Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=32 stencil=0 samples=0 Surface Size: 800x600 windowed ======================================================= ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=false: FPS: 64 FrameTime: 15.797 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [build] use-vbo=true: FPS: 65 FrameTime: 15.561 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=nearest: FPS: 60 FrameTime: 16.768 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=linear: FPS: 60 FrameTime: 16.791 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [texture] texture-filter=mipmap: FPS: 75 FrameTime: 13.360 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=gouraud: FPS: 60 FrameTime: 16.882 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=blinn-phong-inf: FPS: 55 FrameTime: 18.196 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=phong: FPS: 59 FrameTime: 17.157 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shading] shading=cel: FPS: 58 FrameTime: 17.472 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=high-poly: FPS: 49 FrameTime: 20.490 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=normals: FPS: 65 FrameTime: 15.431 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [bump] bump-render=height: FPS: 70 FrameTime: 14.379 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 78 FrameTime: 12.934 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 67 FrameTime: 14.963 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [pulsar] light=false:quads=5:texture=false: FPS: 56 FrameTime: 17.869 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 56 FrameTime: 18.050 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [desktop] effect=shadow:windows=4: FPS: 56 FrameTime: 18.116 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 44 FrameTime: 23.243 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 39 FrameTime: 25.841 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 41 FrameTime: 24.459 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [ideas] speed=duration: FPS: 41 FrameTime: 24.860 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [jellyfish] : FPS: 59 FrameTime: 17.197 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [terrain] : FPS: 19 FrameTime: 54.745 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [shadow] : FPS: 52 FrameTime: 19.238 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [refract] : FPS: 25 FrameTime: 40.666 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=0: FPS: 62 FrameTime: 16.186 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=5:vertex-steps=0: FPS: 67 FrameTime: 14.994 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [conditionals] fragment-steps=0:vertex-steps=5: FPS: 59 FrameTime: 17.199 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=low:fragment-steps=5: FPS: 74 FrameTime: 13.558 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [function] fragment-complexity=medium:fragment-steps=5: FPS: 60 FrameTime: 16.813 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 62 FrameTime: 16.318 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 64 FrameTime: 15.655 ms ** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control! ** Failed to set swap interval. Results may be bounded above by refresh rate. [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 69 FrameTime: 14.627 ms ======================================================= glmark2 Score: 56 ======================================================= ```
hansm629 commented 1 year ago

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?

licy183 commented 1 year ago

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
hansm629 commented 1 year ago

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

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"?

twaik commented 1 year ago

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`.

twaik commented 1 year ago

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.

twaik commented 1 year ago

@licy183 We can achieve much better performance with patching mesa to avoid using util_copy_rect (link). Maybe you can help with that.

twaik commented 1 year ago

@licy183 ?

hansm629 commented 1 year ago

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

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 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

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

licy183 commented 1 year ago

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).

17418 just provides a wrapper of Android's GL, and it is not possible to use glvnd anyway because it doesn't support X11 and wayland, but ANativeWindow.

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...

twaik commented 1 year ago

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.

twaik commented 1 year ago

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

licy183 commented 9 months ago

I haven't made ANGLE work properly as an OpenGL driver, maybe it isn't designed to be used in this way...

twaik commented 9 months ago

As far as I know it is GLES1/2/3 only.

licy183 commented 9 months ago

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.

twaik commented 5 months ago

Actually I think I can try to write some kind of GLVND layer for ANGLE. I do not think it will be very complicated.

twaik commented 5 months ago

The main problem of ANGLE is that it does not support X11 WSI so it may be challenging.