VIM3 Gaming with Panfrost

Greetings nice people!
Panfrost work is ongoing with incremental improvements (and some regressions).
I am making this thread for us to share information on

  • Compiling mesa for your panfrost-kernel enabled system
  • Sharing configuration, environment variables and benchmark results
  • Showcasing games and screenshots running on Vim3 + Panfrost
  • Sharing game and emulator configuration files which work well with Vim3 + Panfrost.

I’ll start with my latest glmark2 benchmark results from a 2021-03-12 mesa build:

glmark2-wayland > =======================================================

    glmark2 2020.04
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G52 (Panfrost)
    GL_VERSION:    3.3 (Compatibility Profile) Mesa 21.1.0-devel (git-c453921c91)
=======================================================
[build] use-vbo=false: FPS: 723 FrameTime: 1.383 ms
[build] use-vbo=true: FPS: 749 FrameTime: 1.335 ms
[texture] texture-filter=nearest: FPS: 1803 FrameTime: 0.555 ms
[texture] texture-filter=linear: FPS: 1832 FrameTime: 0.546 ms
[texture] texture-filter=mipmap: FPS: 1828 FrameTime: 0.547 ms
[shading] shading=gouraud: FPS: 482 FrameTime: 2.075 ms
[shading] shading=blinn-phong-inf: FPS: 496 FrameTime: 2.016 ms
[shading] shading=phong: FPS: 460 FrameTime: 2.174 ms
[shading] shading=cel: FPS: 455 FrameTime: 2.198 ms
[bump] bump-render=high-poly: FPS: 175 FrameTime: 5.714 ms
[bump] bump-render=normals: FPS: 1926 FrameTime: 0.519 ms
[bump] bump-render=height: FPS: 1471 FrameTime: 0.680 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1100 FrameTime: 0.909 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 415 FrameTime: 2.410 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1785 FrameTime: 0.560 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 241 FrameTime: 4.149 ms
[desktop] effect=shadow:windows=4: FPS: 1107 FrameTime: 0.903 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 144 FrameTime: 6.944 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 141 FrameTime: 7.092 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 234 FrameTime: 4.274 ms
[ideas] speed=duration: FPS: 167 FrameTime: 5.988 ms
[jellyfish] <default>: FPS: 659 FrameTime: 1.517 ms
[terrain] <default>: FPS: 35 FrameTime: 28.571 ms
[shadow] <default>: FPS: 320 FrameTime: 3.125 ms
[refract] <default>: FPS: 41 FrameTime: 24.390 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1289 FrameTime: 0.776 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1339 FrameTime: 0.747 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 1370 FrameTime: 0.730 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 1340 FrameTime: 0.746 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 1348 FrameTime: 0.742 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1301 FrameTime: 0.769 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1345 FrameTime: 0.743 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 1310 FrameTime: 0.763 ms
=======================================================
                                  glmark2 Score: 891 
> =======================================================
>     glmark2 2020.04
> =======================================================
>     OpenGL Information
>     GL_VENDOR:     Panfrost
>     GL_RENDERER:   Mali G52 (Panfrost)
>     GL_VERSION:    OpenGL ES 3.0 Mesa 21.1.0-devel (git-c453921c91)
> =======================================================
> [build] use-vbo=false: FPS: 736 FrameTime: 1.359 ms
> [build] use-vbo=true: FPS: 738 FrameTime: 1.355 ms
> [texture] texture-filter=nearest: FPS: 1795 FrameTime: 0.557 ms
> [texture] texture-filter=linear: FPS: 1860 FrameTime: 0.538 ms
> [texture] texture-filter=mipmap: FPS: 1717 FrameTime: 0.582 ms
> [shading] shading=gouraud: FPS: 500 FrameTime: 2.000 ms
> [shading] shading=blinn-phong-inf: FPS: 502 FrameTime: 1.992 ms
> [shading] shading=phong: FPS: 470 FrameTime: 2.128 ms
> [shading] shading=cel: FPS: 469 FrameTime: 2.132 ms
> [bump] bump-render=high-poly: FPS: 178 FrameTime: 5.618 ms
> [bump] bump-render=normals: FPS: 1966 FrameTime: 0.509 ms
> [bump] bump-render=height: FPS: 1810 FrameTime: 0.552 ms
> [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1088 FrameTime: 0.919 ms
> [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 415 FrameTime: 2.410 ms
> [pulsar] light=false:quads=5:texture=false: FPS: 1801 FrameTime: 0.555 ms
> [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 238 FrameTime: 4.202 ms
> [desktop] effect=shadow:windows=4: FPS: 1090 FrameTime: 0.917 ms
> [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 146 FrameTime: 6.849 ms
> [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 138 FrameTime: 7.246 ms
> [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 216 FrameTime: 4.630 ms
> [ideas] speed=duration: FPS: 131 FrameTime: 7.634 ms
> [jellyfish] <default>: FPS: 660 FrameTime: 1.515 ms
> [terrain] <default>: FPS: 34 FrameTime: 29.412 ms
> [shadow] <default>: FPS: 328 FrameTime: 3.049 ms
> [refract] <default>: FPS: 42 FrameTime: 23.810 ms
> [conditionals] fragment-steps=0:vertex-steps=0: FPS: 1387 FrameTime: 0.721 ms
> [conditionals] fragment-steps=5:vertex-steps=0: FPS: 1375 FrameTime: 0.727 ms
> [conditionals] fragment-steps=0:vertex-steps=5: FPS: 1354 FrameTime: 0.739 ms
> [function] fragment-complexity=low:fragment-steps=5: FPS: 1360 FrameTime: 0.735 ms
> [function] fragment-complexity=medium:fragment-steps=5: FPS: 1358 FrameTime: 0.736 ms
> [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1318 FrameTime: 0.759 ms
> [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1354 FrameTime: 0.739 ms
> [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 1299 FrameTime: 0.770 ms
> =======================================================
>                                   glmark2 Score: 905 
> =======================================================

The interesting result for me is recent improvements to [terrain], which is a shader-heavy benchmark and used to hit ~24 fps and is now getting 34-35.

The top result I have heard of is glmark2-es2-wayland over 1000, but that was with a 1GHZ overclock (possible in .dts)

4 Likes

The canonical realworld test of course, hast to be DOOM3 (dhewm).

Tests are run by opening console (with `) and typing “timedemo demo1”. The first run will be incorrect due to lag caused by loading game assets from disk. Only second run results are reported here.

I tested all four stock settings, Low (640x480), Med (640x480), High (800x600) and Ultra (1024x768) and Clort (1024x768). All tests run with VIM3 Pro under Wayfire with Antialiasing off, and no window scaling by the windowmanager (this has a small but noticeable performance cost).

  • Low: 25.7 FPS
  • Med 25.7 FPS
  • High: 23.8 FPS
  • Ultra 20.0 FPS
  • Clort 26.6 FPS
    The ‘Clort’ setting disables High Quality Special Effects and Shadows.

    Disabled shadows is really the big win for the Mali G52 GPU.

I was advised that under wayfire, dhewm3 needs to have variable r_waylandcompat set to 1. Otherwise you may get results like this:

3 Likes

i presume openarena would run at the same speeds, still a very respectable framerate :+1:

1 Like

OpenArena is iirc based on one generation earlier iDtech engine, derived from Quake III and should get much higher framerates.

I can give it a try today. Will edit this post with results.

Very interesting!

3398 frames 135.6 seconds 25.1 fps 10.0/39.9/231.0/21.7 ms

I installed openarena from debian/devuan repository and then edited ~/.openarena/baseoa/q3config.cfg and set

  • r_customheight “768”
  • r_customwidth “1024”
    (it originally wanted fullscreen 3840x2160)
    Then I needed to increase the reserved memory in q3config.cfg to run the demo
  • seta com_hunkMegs “256”

Then I launched openarena and brought up console (with `) and typed

  • timedemo 1 (enables benchmark mode)
  • cg_drawfps 1 (shows fps when benchmarking)
  • demo demo088-test1.dm_71 (loads demo map)

I got 25 FPS in several runs. Other settings were left at default.
Which is so strange because in-game i see 40-50 fps. The rpi4 benchmarks i’ve seen show 45fps (though perhaps with a different timedemo). This while the rpi4 glmark2-es2 score is only 172…

2 Likes

Getting some decent results on Panfrost using mesa-git which is 21.1.0 on vim3

Can see the improvement in panfrost :smiley:

4 Likes

Most people compare glmark2 without -s 1920x1080 but here is what i just got:
$ glmark2 -s 1920x1080
=======================================================
glmark2 2020.04
=======================================================

        OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G52 (Panfrost)
    GL_VERSION:    3.3 (Compatibility Profile) Mesa 21.1.0-devel (git-c453921c91)
=======================================================
                                      glmark2 Score: 342 
    =======================================================
2 Likes

That’s crazy numbers.
I always do full screen. At 1080p
I need to update glmark2 pkg also. :grinning:

2 Likes

While it’s understandable that you are interested in performance at 1080p fullscreen, it is better for comparing with other people’s results to use the default resolution.

You might see better results with glmark2-es2 and glmark2-es2-wayland (running under e.g. wayfire).


For today I’d like to present a very nice little open-source MMORPG called The Mana World. It has been in development for somewhere over a decade and is pretty feature complete. It’s a nice cozy little place to have adventures and meet linux-friendly people.
https://www.themanaworld.org/

The standard client is called ManaPlus, available here:

It supports software/SDL rendering, as well as OpenGL and OpenGL-ES rendering backends and is fairly straightforward to build.
With fps turned down to 5, effects and cloud shadows off, it can use just 2% cpu, making it have almost no impact on other processes. This makes it suitable to keep running for chat without significant performance degradation for your current work.

2 Likes

Just a heads-up: The panfrost devs just landed some pretty significant updates/fixes in 5.12 kernel.

However, at least for Vim3/N2 latest Mesa (as of today) is broken for me and another tester. Revert to 0dfc5b51967 if you have upgraded mesa git master.

Cheers.

3 Likes

Just tested latest Mesa improvements 2021-04-23
doom3_2021_04_23_panfrost_g52
That’s with my preferred ‘Clort’ settings @ 1024x768.
Compared to last month’s 26.6fps a 22.2% improvement!

Advanced Spellcasting in Legend of Heroes - Trails in the Sky (PPSSPP) no longer gives lagging / stuttering. More on this emu later. Testing more games.
[EDIT]
SuperTuxKart with new lighting engine almost double the framerate!

panfrost-best_day_ever
[EDIT] one downside I noticed is Gimp under Wayfire is giving some rendering errors (a few regions of the Gtk window have wrong blocks). Not a deal breaker for me though.

3 Likes

[alyssa] macc24: i landed some commits yesterday that should make bifrost a bit faster

jgmdev has just now tested glmark2 on Odroid n2+ with GPU @ 999999984hz and kernel 5.13 with today’s git master mesa

glmark2-wayland 1481
glmark2-es2-wayland 1458

About 60% higher than Khadas. It would be nice to get a khadas 5.13 kernel with panfrost updates!

wow that GPU frequency is super high, I’ve only tried till 866MHz :exploding_head:

2 Likes

I would not choose to run at 1GHZ. Rather 800mhz with updated kernel. Safer.

Great post. Could you please share you build script for mesa? Thanks! I tried but couldn’t get such scores.


=======================================================
    glmark2 2021.02
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G52 (Panfrost)
    GL_VERSION:    3.1 Mesa 21.3.0-devel (git-86111fdc9c)
=======================================================
                                  glmark2 Score: 116 
=======================================================
1 Like

You need to do glmark2-es test

looking at notes, i seem to have built mesa with:
meson . build/ -Ddri-drivers= -Dvulkan-drivers=panfrost -Dgallium-drivers=panfrost,kmsro -Dllvm=false

1 Like

Yes we tried that too ad Manjaro Arm.
Idk how well it worked but it’s a good progress it seems.

1 Like

Much better performance with games and otherstuff using lots of textures - now for Vim3 Pro!

https://www.kernel.org/doc/html/latest/gpu/afbc.html
Glmark2’s texture-heavy test goes from ~245 to ~348 fps!
Supertux can run at level 4 graphics!
Xonotic can run at ‘normal’ quality!
Jubilations!

2 Likes

Well I finally figured out how to upgrade kernel. Using chewitt’s 5.15.0.y tree (THANKS @chewitt !!) and getting best performance yet.

These are the options enabled:

Note that I’ve increased resolution to 1024x768 in this test.

The main bug that bit me installing new kernel was that debian names the new kernel vmlinuz-5.15.0+ in /boot, but uboot was picking up the old zImage instead. So i kept getting 5.10 kernel.

In daily use with 5.15 I noticed that wayfire refuses to start - locks up my box. Also fairly annoying is 5.15’s new DRM/panfrost hardware pointer, while sily smooth, often likes to disappear, depending on what programs are active and drawing. Switching to a console and back restores it.

I also tweaked /boot/env.txt to enable the overclocked frequencies, but I don’t see them working when i try to set them with cpufreq. ```

Maximum CPU Frequency of VIM3 Little Core A53

500/667/1000/1200/1398/1512/1608/1704/1800(default)/1908/2016/2100/2208

max_freq_a53=2208

Maximum CPU Frequency of VIM3 Big Core A73

500/667/1000/1200/1398/1512/1608/1704/1800/1908/2016/2100/2208(default)/2304/2400

max_freq_a73=2400

*Do i need a modified dts/dtb to enable higher frequencies?*

Thanks everyone!  Couldn't have done it without Chewitt's github and krescue to recover my many blunders.
![khadas_fun_eltk|690x485](upload://f3DycldFXIBgTZki9FV2ltuYJHk.jpeg)
[everyone <3s khadafps](http://0x0.st/-5Hj.jpg)

Yep, the additional higher operating points need to be added in meson_g12b_a311d.dtsi

Although in my testing it doesn’t get much stable after 2.5GHz, the limit is 2.6Ghz but the cpu is prone to lockups and such.

1 Like