D3D9: weird framerate behavior with multiple monitors

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
Mattan Furst
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 260
Joined: Tue Jan 01, 2008 11:28 am
Location: Israel
x 32

D3D9: weird framerate behavior with multiple monitors

Post by Mattan Furst »

If you recall, before Ogre implemented creating D3D devices for each monitor there was an issue with framerate in multi monitor systems. When rendering on a monitor through an incorrect device (a device not assigned to that monitor), the framerate dropped significantly.

Ogre had added implementation for multi device support around when windows XP was the latest windows version. Then when windows Vista came along, support for multi-head was added (Multi-head means you allocate a device per adapter and not per monitor. This mostly saves on memory in the GPU but can also create slight performance boost). However this turned out to be a dud as windows did not support multi-head properly in either XP or Vista.

Due to certain circumstances I took another look at that section of code that assigns devices. These are some of my observations:
- In fullscreen mode, Multihead is now properly supported under windows 7. However due to a problem in Ogre's code it is not used by default.
- In windowed mode, on Windows 7 OS with 2 monitors connected to the same graphic card*, if you create a single device on the default adapter instead of the current implementation of device per monitor, the framerate either stays the same or slightly improves even if the window is on the "wrong" monitor. This seems to be the case with both NVidia and Radeaon cards. The behavior does not present itself on windows XP OS.
- In windowed mode, on Windows 7 OS with 4 monitors connect to 2 graphic card**, whether you create a single device for all monitors, 2 device for the 2 adapters, or as the code currently works a device per monitor, the results are the same. If the window is placed on one of the monitors connected to the main adapter the framerate on both is relatively the same. If you move the window to one of the monitors connected to the secondary adapter, the framerate drops by several percent.

* - Tested on several systems running on various GEForce and Radeaon cards.
** - I currently only have one system on which I can test case the situation of 4 monitors on 2 graphic cards. And it's not a system I fully trust the results off.

I haven't been able to locate any documentation on change in implementation of devices on windows 7 so I'm a bit dumbfounded as to why these results show up. Any help will be appreciated.

In any case this will seem to indicate that Ogre is using in many cases a lot more GPU memory and other resources than it need to.

P.S.
I haven't yet tested the behavior on windows 8 OS. My best ques is that this change in behavior was brought on by the new implementation of WDDM. so it's a good bet that the changes will remain in windows 8.
it's turtles all the way down