Poor Performance compared to native (less than 10%)
Using nvidia jetpack arm64 gpu drivers on a Tegra-X1, I attempt to gain armhf hardware accelerated GPU using VIRGL. Current armhf mesa version is 22.0.5 and the arm64 userspace uses nvidia jetpack proprietary drivers.
Performance is very poor compared to native on arm64 using the proprietary drivers. I have used virglserver with options virgl_test_server --use-glx
since egl-surfaceless causes a false attempt to load mesa drivers on arm64 (which should not be done, the proprietary drivers should be loaded, see the error)
libEGL warning: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
Below is performance data from glmark2-es2 with virpipe on armhf first and then native on arm64
GALLIUM_DRIVER=virpipe ./glmark2-es2
libEGL warning: DRI2: failed to authenticate
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: Mesa/X.org
GL_RENDERER: virgl (NVIDIA Tegra X1 (nvgpu)/integrated)
GL_VERSION: OpenGL ES 3.2 Mesa 22.0.5 - kisak-mesa PPA
=======================================================
[build] use-vbo=false: FPS: 70 FrameTime: 14.286 ms
[build] use-vbo=true: FPS: 84 FrameTime: 11.905 ms
[texture] texture-filter=nearest: FPS: 86 FrameTime: 11.628 ms
[texture] texture-filter=linear: FPS: 86 FrameTime: 11.628 ms
[texture] texture-filter=mipmap: FPS: 86 FrameTime: 11.628 ms
[shading] shading=gouraud: FPS: 84 FrameTime: 11.905 ms
[shading] shading=blinn-phong-inf: FPS: 84 FrameTime: 11.905 ms
[shading] shading=phong: FPS: 83 FrameTime: 12.048 ms
[shading] shading=cel: FPS: 83 FrameTime: 12.048 ms
[bump] bump-render=high-poly: FPS: 75 FrameTime: 13.333 ms
[bump] bump-render=normals: FPS: 86 FrameTime: 11.628 ms
[bump] bump-render=height: FPS: 86 FrameTime: 11.628 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 83 FrameTime: 12.048 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 74 FrameTime: 13.514 ms
[pulsar] light=false:quads=5:texture=false: FPS: 85 FrameTime: 11.765 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 66 FrameTime: 15.152 ms
[desktop] effect=shadow:windows=4: FPS: 76 FrameTime: 13.158 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 62 FrameTime: 16.129 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 64 FrameTime: 15.625 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 65 FrameTime: 15.385 ms
[ideas] speed=duration: FPS: 66 FrameTime: 15.152 ms
[jellyfish] <default>: FPS: 77 FrameTime: 12.987 ms
[terrain] <default>: FPS: 45 FrameTime: 22.222 ms
[shadow] <default>: FPS: 87 FrameTime: 11.494 ms
[refract] <default>: FPS: 61 FrameTime: 16.393 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 90 FrameTime: 11.111 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 84 FrameTime: 11.905 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 85 FrameTime: 11.765 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 85 FrameTime: 11.765 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 84 FrameTime: 11.905 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 85 FrameTime: 11.765 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 84 FrameTime: 11.905 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 84 FrameTime: 11.905 ms
=======================================================
glmark2 Score: 78
=======================================================
glmark2-es2
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: NVIDIA Tegra X1 (nvgpu)/integrated
GL_VERSION: OpenGL ES 3.2 NVIDIA 32.3.1
=======================================================
[build] use-vbo=false: FPS: 1249 FrameTime: 0.801 ms
[build] use-vbo=true: FPS: 3472 FrameTime: 0.288 ms
[texture] texture-filter=nearest: FPS: 3201 FrameTime: 0.312 ms
[texture] texture-filter=linear: FPS: 3243 FrameTime: 0.308 ms
[texture] texture-filter=mipmap: FPS: 3326 FrameTime: 0.301 ms
[shading] shading=gouraud: FPS: 2731 FrameTime: 0.366 ms
[shading] shading=blinn-phong-inf: FPS: 2702 FrameTime: 0.370 ms
[shading] shading=phong: FPS: 2679 FrameTime: 0.373 ms
[shading] shading=cel: FPS: 2703 FrameTime: 0.370 ms
[bump] bump-render=high-poly: FPS: 2137 FrameTime: 0.468 ms
[bump] bump-render=normals: FPS: 3789 FrameTime: 0.264 ms
[bump] bump-render=height: FPS: 3870 FrameTime: 0.258 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 2366 FrameTime: 0.423 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 1271 FrameTime: 0.787 ms
[pulsar] light=false:quads=5:texture=false: FPS: 3364 FrameTime: 0.297 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1083 FrameTime: 0.923 ms
[desktop] effect=shadow:windows=4: FPS: 1380 FrameTime: 0.725 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 347 FrameTime: 2.882 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 360 FrameTime: 2.778 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 456 FrameTime: 2.193 ms
[ideas] speed=duration: FPS: 1575 FrameTime: 0.635 ms
[jellyfish] <default>: FPS: 1474 FrameTime: 0.678 ms
[terrain] <default>: FPS: 193 FrameTime: 5.181 ms
[shadow] <default>: FPS: 2137 FrameTime: 0.468 ms
[refract] <default>: FPS: 305 FrameTime: 3.279 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 2981 FrameTime: 0.335 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 3044 FrameTime: 0.329 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 3039 FrameTime: 0.329 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 3045 FrameTime: 0.328 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 2922 FrameTime: 0.342 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 2992 FrameTime: 0.334 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 3038 FrameTime: 0.329 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 2992 FrameTime: 0.334 ms
=======================================================
glmark2 Score: 2286
=======================================================
I have noticed that when using virgl, the cpu usage for an xorg process is quite high (50%) while the same xorg process is basically 0% when native or llvmpipe on armhf.