Power & Source of Big Ideas

Nanopi Fire3 glmark2-es framebuffer

Moderators: chensy, FATechsupport

I have managed to build and run glmark2-es-fb , struggled to get g++ to build it on 1 GB memory board. Now i need a way to optimize it. Has anyone tested glmark2-es and got better results?

glmark2-es results for 1280x720p, without heatsink temp is around 85 C, Cpu around 90% most of the time for one core from 800%.

=======================================================
glmark2 2012.12
=======================================================
OpenGL Information
GL_VENDOR: ARM_1.7_64BIT_NO_LINUX_SYNC
GL_RENDERER: Mali-400 MP
GL_VERSION: OpenGL ES 2.0
=======================================================
[build] use-vbo=false: FPS: 240 FrameTime: 4.167 ms
[build] use-vbo=true: FPS: 240 FrameTime: 4.167 ms
[texture] texture-filter=nearest: FPS: 249 FrameTime: 4.016 ms
[texture] texture-filter=linear: FPS: 248 FrameTime: 4.032 ms
[texture] texture-filter=mipmap: FPS: 251 FrameTime: 3.984 ms
[shading] shading=gouraud: FPS: 240 FrameTime: 4.167 ms
[shading] shading=blinn-phong-inf: FPS: 239 FrameTime: 4.184 ms
[shading] shading=phong: FPS: 239 FrameTime: 4.184 ms
[bump] bump-render=high-poly: FPS: 109 FrameTime: 9.174 ms
[bump] bump-render=normals: FPS: 240 FrameTime: 4.167 ms
[bump] bump-render=height: FPS: 240 FrameTime: 4.167 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 139 FrameTime: 7.194 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 61 FrameTime: 16.393 ms
[pulsar] light=false:quads=5:texture=false: FPS: 239 FrameTime: 4.184 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 55 FrameTime: 18.182 ms
[desktop] effect=shadow:windows=4: FPS: 240 FrameTime: 4.167 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 59 FrameTime: 16.949 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 113 FrameTime: 8.850 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 72 FrameTime: 13.889 ms
[ideas] speed=duration: FPS: 240 FrameTime: 4.167 ms
[jellyfish] <default>: FPS: 233 FrameTime: 4.292 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[shadow] <default>: FPS: 176 FrameTime: 5.682 ms
[refract] <default>: FPS: 25 FrameTime: 40.000 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 240 FrameTime: 4.167 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 239 FrameTime: 4.184 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 240 FrameTime: 4.167 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 240 FrameTime: 4.167 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 213 FrameTime: 4.695 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 240 FrameTime: 4.167 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 240 FrameTime: 4.167 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 240 FrameTime: 4.167 ms
=======================================================
glmark2 Score: 196
=======================================================
Hello, how did you compile it for the Fire 3 ? All I get is a segmentation fault / display not found whenever i compile OpenGL ES stuff on the Fire 3.
[quote="ackstor"]Hello, how did you compile it for the Fire 3 ? All I get is a segmentation fault / display not found whenever i compile OpenGL ES stuff on the Fire 3.[/quote]

It is based on framebuffer and not X11. Adjust the code to your need:
https://github.com/avafinger/mali-fbdev ... test-tools

Make sure you have /dev/fb0 (or /dev/fb8 depending on kernel used) as the primary display.
Thank you, although does this use the GPU ? Looking at the CPU usage it seem it is heavy on it.

fbdev is pure framebuffer (no acceleration), no ? Or does it use directfb ?
90% cpu usage out of 800% , so the 3D rendering is done by mali.
/dev/fbX is shared with mali , that means you can write directly to /dev/fbX or use mali for 3D.

If you have a way to draw 2D with mali (in C), please share the code.
Well just tried but i have the same error as all my others tentatives :

Code: Select all

root@NanoPi-Fire3:~/mali-fbdev-stress-test-tools/deb/arm64/xenial# glmark2-es2-fbdev 
Error: eglInitialize() failed with error: 0x3001
Error: eglInitialize() failed with error: 0x3001
Error: main: Could not initialize canvas


Code: Select all

root@NanoPi-Fire3:~/mali-fbdev-stress-test-tools/src/yagears-fbdev# ./yagears-fbdev -b egl-fbdev -e glesv2
eglInitialize failed: 0x3001


With image

s5p6818-sd-friendlycore-xenial-4.4-arm64-YYYYMMDD.img.zip

also tried on this one :

s5p6818-sd-lubuntu-desktop-xenial-4.4-armhf-YYYYMMDD.img.zip

Running fbset -i

Code: Select all

root@NanoPi-Fire3:~/mali-fbdev-stress-test-tools/deb/arm64/xenial# fbset -i

mode "1280x720"
    geometry 1280 720 1280 2160 32
    timings 0 260 110 25 5 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

Frame buffer device information:
    Name        :
    Address     : 0x71100000
    Size        : 11059200
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 5120
    Accelerator : No


Which image were you using ?
You have problems with mali userland.
For the fbdev you need the mali blobs for fbdev and not X11. (and vice-versa)

I think the FE Desktop Image is for the X11 mali only. It should work with friendlycore.
Make sure mali is working on friendlycore, test their Qt sample, read: 6.12 Run Qt 5.10.0 Demo with GPU acceleration.

I build my own image for a specific need.
Okay thanks, got it to run with :

s5p6818-sd-friendlycore-xenial-4.4-arm64-20190128.img

it seem i was using a very old image file.

What did you mean by 2D code ? Specific features of the Mali chip ? Because if you have OpenGL ES you can basically do any 2D stuff.

Anyway my plan is to port the OpenGL part of my framebuffer / render agnostic graphics library :

https://github.com/grz0zrg/fbg

This allow to draw with more than one CPU core and use the GPU as a blitter (or more).

PS : Same performance result with glmark2, 45°C with heatsink + mini fan attached to it
[quote="ackstor"] use the GPU as a blitter (or more).

That is exactly what i mean by 2D, draw Text and Bitmaps to a buffer and then blit it using mali, but this has no advantages.
The better approach would be to draw Text and Bitmaps in OpenGLES 2.0 (with mali) to release CPU from this work.
Take a look: https://community.arm.com/developer/too ... -opengl-es

My build, an OS Image with Ubuntu 16.04 (soon 18.04) , is a bare minimum image with mali support (no Desktop), that was intended to have OpenGLES 2.0 to draw Text and Bitmaps in C, something similar to Qt (not that complexity), just a way to have a 2D interface(and 3D). Unfortunately, this has never materialized "to me". The majority of the OpenGLES libs are in C++ which i dislike.

Anyway, looking forward to seeing your progress.
Well, yeah that lib was made for some specific purposes but it is still possible to use it so the GPU draw pre-rendered CPU graphics, for static content only (and also for things that don't need a refresh every frames) it would be very fast.

Anyway i successfully made a C OpenGL ES 2 + fbdev example program for the Nano PI Fire 3 (would probably work on other devices but i didn't test), it compile and run out of the box with the appropriate image :

https://github.com/grz0zrg/fbdev_gles2_example

I am really happy that it work because i had so much troubles running a GLES program on that device... actually even the glmark2 fbdev code compile but crash, i had to install the .deb, yagears don't compile out of the box and crash even with the .deb file... i don't know why, it seem there is something missing on these images or some bugs, i had some odd behaviours also while doing that example.

My build, an OS Image with Ubuntu 16.04 (soon 18.04) , is a bare minimum image with mali support (no Desktop), that was intended to have OpenGLES 2.0 to draw Text and Bitmaps in C, something similar to Qt (not that complexity), just a way to have a 2D interface(and 3D). Unfortunately, this has never materialized "to me". The majority of the OpenGLES libs are in C++ which i dislike.

Do you know this library ? : https://github.com/vurtun/nuklear
It have an OpenGL ES 2 example in the demo folder which use SDL2 for the window but which could be replaced easily with the fbdev code i posted.
[quote]I am really happy that it work because i had so much troubles running a GLES program on that device... actually even the glmark2 fbdev code compile but crash, i had to install the .deb, yagears don't compile out of the box and crash even with the .deb file... i don't know why, it seem there is something missing on these images or some bugs, i had some odd behaviours also while doing that example.
[/quote]

FE Image is not up to date and should be used as a reference only. I will update mine to 18.04 and see what happens.

I did not know [b]Nuklear[/b]. Maybe you can port that to OpenGLES2 fbdev ? Looks very impressive.

Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 30 guests