Posts: 457 from 2003/4/11
There may be two reasons for low performance of a program which uses OpenGL 1.x (fixed pipeline) for rendering a graphics on screen:
1. Geometry of graphics is too high and CPU (in case of fixed pipeline) is not able to recalculate all transformations.
2. Huge polygons (especially with transparency) with big textures cause problems with fillrate performance.
In the current TinyGL, vertex transformations are (in almost all cases) done on the GPU already. However, the general assessment is almost right. There are a few more cases that might be relevant, such as how pipeline stalls are handled and/or avoided, such as when texture data is updated, or how video memory is managed, and so on.Quote:
I see that I can create very very simple geometry (which is not a challenge for 68040) with huge polygons for achieve low performance. In this case CPU gauge shows 100% usage. If I resize window from 1440x960 to 320x200, CPU usage is about 10-15%.
In MorphOS 3.17, if you keep the GPU busy at all times, you'll see something very close to 100% CPU usage. If you see less than that, then you've introduced some waiting at some point. I'd guess you're running your test in full screen mode and in the latter case you've reached the monitor's refresh rate, and the system is mostly waiting for the monitor to finish its refresh.Quote:
1. Is it normal situation that CPU usage is very high when geometry is extremely low but big polygons kill fillrate? Should I observe 100% CPU usage in this case? Should rendering of huge polygons (using 3d accelerator) influence very high to CPU usage?
Yes, that's completely expected as it is now. I've implemented a fix for that, although that fix is not 100% ready for prime time yet, but it'll hopefully be ready in time for MorphOS 3.18. I'll email you an update so you can test it yourself.Quote:
2. Does CPU gauge in MorphOS shows only CPU usage or also GPU usage?
, but indirectly
there are many cases where the CPU will be busy while waiting for the GPU to finish what it's doing.Quote:
One more thing
I run examples from beta-versions of TinyGL NG wich support shaders. Why do I see 100% CPU usage if geometry is calculated by GPU, gfx is rendered by GPU. CPU should be unoccupied. Am I right? Of course, theoretically.. :)
Because there's a misunderstanding there :) The CPU usage you're seeing is not due to vertex transformations, but due to the CPU waiting for the GPU to finish rendering. As mentioned earlier in this reply, and to expand a bit on that, ever since MorphOS 3.0, vertex transformations have taken place on the GPU.
I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.