How many times do you call Draw[Indexed]Primitive? Are you sorting by material?
Nvidia has an excellent set of slides on finding the bottleneck(s) in your app here:
http://developer.nvidia.com/docs/IO/8230/GDC2003_PipelinePerformance.pdf
It gives you a nice step-by-step flowchart. I highly recommended just going through it.
DirectX performance problems
Cool slides. Really helped a lot. I narrowed it down to a vertex transformation bottleneck (Dawn is a HUGE mesh) since it gets faster when I cut instructions there. But the shader (Cg) I am using is only doing transformation and per-vertex diffuse lighting so I can't see how to optimize that.
I am very confused since the Dawn demo itself runs nicely on my machine, so how can a simple diffuse rendering of the mesh be SO slow? Any ideas?
Cheers,
Alex
I am very confused since the Dawn demo itself runs nicely on my machine, so how can a simple diffuse rendering of the mesh be SO slow? Any ideas?
Cheers,
Alex
Found a solution... They use multiple triangle strips for one object. Reducing DrawPrimitive() calls by connecting them with degenerate triangles boosts the performance to over 16fps (which is a start at least compared to 0.3fps)...
Next thing I'll try (once I get rid of those degenerate strips that currently come out of my code) is 32-byte aligning of the vertex data.
Cheers,
Alex
Next thing I'll try (once I get rid of those degenerate strips that currently come out of my code) is 32-byte aligning of the vertex data.
Cheers,
Alex
You've probably got a bug in your rendering code so it does more work than it needs to. You should get well over 100fps without bones/textures.
Quote:Original post by DaJudge
Next thing I'll try (once I get rid of those degenerate strips that currently come out of my code) is 32-byte aligning of the vertex data.
Cheers,
Alex
That's probably half your problem. Put those vertices in video memory, not system memory.
You can safely do a DrawIndexedPrimitive for the triangle list, and one call per strip in each object. Just don't change state between them (at least until you texture it).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement