I've been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I've been using a program to draw massive amount of polygons in a simple scene with alpha blending (AKA grass scene). I've used two programs, one uses static coordinates and another uses rotation and translation. Both run at 60 FPS with no other heavy processes running. But when I use them together (Two windows each having same amount of grasses and grass positions) the one that uses translation and rotation runs at 10 FPS but the other one is about 55 FPS. My question is why are both running @ 60 FPS and when such thing happens why does the second one(Rotation and translation of each grass) drop about 50 FPS but the second is still 55? Sounds like a bottle-neck to me. Please let me know if you have any idea, or in a more general answer if you have an idea or paper about finding bottleneck of GPU(or GPGPU), or optimizing the graphical code for running on GPU?
|
|
The general answer is to do a frame capture and profile. Use something like NV PerfHUD or other GPU performance counters to see what the GPU is doing, and which draw calls takes time. You can then get information about what the bottle neck that draw call had. Your case seems to be something like two programs interacting and context switching the GPU? |
|||||
|
|
You can find some information in these materials: Randima Fernando. GPU Gems: Programming Techniques, Tips and Tricks for Real-Time Graphics. Addison-Wesley Professional, 2004. Chapter 28 David Blythe, Brad Grantham, Tom Mcreynolds, and Scott R. Nelson. Advanced Graphics Programming Techniques Using OpenGL. Course Notes for SIGGRAPH ’99. ACM, 1999. |
|||
|
|
|
both running at 60FPS doesn't neccesorily mean they can both run with the same speed, there is usually a fps limiter in game engines that doesn't let fps go higher than 60fps (and that's somthing you can spot that and remove easily), so in your case maybe without this limiter the static fps wuold be around 120 and the dynamic one would be around 70, with them both running gpu can't handle both processes, assuming that your test shows even half of gpu's power is almost enough for static scene, but isn't near enough for dynamic one. and if you want to find bottleneck in your pipeline ,assuming that you have access to all your shaders source codes, you can use "nvidia fx composer". in that program you can draw your pipeline, give it all your shaders and it'll show how much time is consumed in each stage for each shader. |
|||
|
|
