Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have read this article, and I am making use of some pixel shaders to achieve some effects. At most four shader effects can be applied at same time. What are the best practices to achieve best performance with DirectX 9.0.

I read somewhere that DirectX 11 provides support for parallel rendering, but I am not able to get any working sample for DirectX 11.0.

How can I boost the performance of my application? Are there any best practices for rendering different things on multiple monitors at the same time?

share|improve this question
    
Does "multiple" mean two, or fifty? –  David Lively Jun 11 '12 at 15:56
    
Generally its two but at max we use three monitors. Maximum time we need to draw on two monitors so we can consider the case of two. –  Vibhore Tanwer Jun 13 '12 at 5:04

1 Answer 1

I've run up to 7 off a single PC.

First and foremost on multi-monitor on DX9:

  • Use exclusive mode and run each head as an independent device or you risk the two display adapters trying to lock vsync with each other. Basically, neither will flip the back buffer until BOTH displays have finished rendering. This slows things down considerably. If you run them as an independent device, you can avoid this problem without any fuss.

  • Exception: if both heads are on the same card and you have very large textures. If your texture size will blow the cache, merge both heads onto a single device. This will allow you to share the texture memory between the two heads instead of halving it. But avoid this if you can.

  • Prefer small textures to textures, textures to materials and geometry to alpha.

  • Consolidate your shaders if you can as long as that doesn't lead to branching or more state changes. Basically, do anything you can to avoid state changes.

  • I don't know if it's peculiar to DX9 or the engine I was using, but switching mesh transforms always cost me more than sending the geometry even when I had a ton of vertices. In this weird case, pre-computing the vertices into world space actually saved time even though I had multiple instances... like I said, that could have been peculiar to the engine, however.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.