cancel
Showing results for 
Search instead for 
Did you mean: 

Poor OpenGL performance

Mikalaj Karhin
Associate III

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

5 REPLIES 5

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?

Yes, ES 2.0.

yakabmarci
Senior

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.

Bernard PUEL
ST Employee

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

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