Skip to main content
Mikalaj Karhin
Associate II
September 6, 2019
Question

Poor OpenGL performance

  • September 6, 2019
  • 3 replies
  • 1601 views

I've run a simple graphical program with Mono and OpenTK. It contains a simple fragment shader (demo). One frame renders about 7 seconds and CPU usage is 100%. Is it normal?

vec2 p = ( gl_FragCoord.xy / resolution.xy ) - 0.5;
float sx = (amp)*1.9 * sin( 4.0 * (freq) * (p.x-phase) - 6.0 * (speed)*time);
float dy = 43./ ( 60. * abs(4.9*p.y - sx - 1.2));
dy += 1./ (60. * length(p - vec2(p.x, 0.)));
gl_FragColor = vec4( (p.x + 0.05) * dy, 0.2 * dy, dy, 2.0 );

This topic has been closed for replies.

3 replies

After Forever
Senior III
September 6, 2019

I'm not an expert in the GPU and graphics field but are you sure that you are using the OpenGLES API instead of OpenGL?

Mikalaj Karhin
Associate II
September 6, 2019

Yes, ES 2.0.

yakabmarci
Associate III
September 7, 2019

The stm32mp1 gpu is very weak, I have never seen a weaker opengl gpu in my life, even so I would expect better performance. You could query the vendor and renderer strings to make sure you are using the gpu, not emulation.

rzr www.rzr.online.fr
Associate
January 8, 2020

Well any gpu can look weak if badly used :)

In term of numbers, When I tried glmark it scored 42:

https://twitter.com/RzrFreeFr/status/1207242544003928065

About emulation, I guess you mean software rendering using mesa3d ?

More hints at:

https://community.st.com/s/question/0D50X0000BKC9j6SQD/opengl-no-wayland

Bernard PUEL
Technical Moderator
September 11, 2019

What is your setup ? (board and SW package used).

You are probably not using the GPU. You can check easily using netdata if gpu is used or not, see: https://wiki.st.com/stm32mpu/wiki/Netdata#Customized_netdata_web_page