Recommended Posts

Hi all,
I have a huge performance problem with DirectX 8 right now. I reverse engineered NVidia's NMB file format used for the dawn demo and am now able to render the fairy's mesh without problems (still a lot of work for materials to do though). The thing is: is slow like nothing. I am crawling around at 0.3 fps or so. Since the origibal demo runs nicely on my system I assume it's something with my code.
I tried various things such as using only a 1x1 texture or putting all geometry in larger buffers but nothing changed a thing there. Any ideas what might be the problem? Or any ideas about how to narrow down the bottleneck?
Any help is greatly appreciated.
Cheers,
Alex

Share this post

Link to post

Share on other sites

Cool. I'm definitely going to have a look at that list. Thanks for that.

No, it's not falling back to the reference rasterizer (I am running against the retail runtime - I don't even have the reference rasterizer installed). Besides of that I am running a DX8 app on a DX9 gcard, so that shouldn't happen even if I had the reference rasterizer installed.

Does that PIX tool work for DX8 applications as well? Sounds definitely interesting.

Share this post

Link to post

Share on other sites

Don't want to post all that stuff here. It's a few times about multiple locking of vertex & index buffers at startup (so it's NOT critical to runtime performance) and during runtime lots of redundant render / texture stage sets. Do you think capturing those redundant stage changes can make a THAT big difference? I honestly don't...

Share this post

Link to post

Share on other sites

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

0

Share this post

Link to post

Share on other sites

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.

Share this post

Link to post

Share on other sites

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

0

Share this post

Link to post

Share on other sites

Tried to analyze it with the PIX tool but that can't seem to gather data from Dx8 applications. I can setup the experiment without problems and it also starts the application, but doesn't end on the specified condition (both frame-count or time dependant)...

Gonna try your ideas, thanks.

0

Share this post

Link to post

Share on other sites

This topic is 4860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.