2019-09-06 03:03 AM
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 );
2019-09-06 03:26 AM
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?
2019-09-06 05:16 AM
Yes, ES 2.0.
2019-09-07 01:32 AM
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.
2019-09-11 04:58 AM
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
2020-01-08 08:59 AM
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