Original Post
I have currently porting a DX9 based XP application to DX10 on Windows 7.
This application displays scrolling data in multiple windows on multiple monitors (up to 4 monitors, with 3 windows per monitor). Each present must by synced to the VSYNC of the monitor as it is important that we have no tearing. It is not a full screen DirectX app.
In the current architecture (XP with DirectX 9) a different DirectX 9 device was created for each monitor and each monitor had its own rendering thread (not the main thread). A separate swap chain was created for each window. Each rendering thread would render to each window in turn, and then present to each window in turn, i.e. RenderA, RenderB, RenderC, PresentA, PresentB, PresentC. This worked well in XP with DirectX9.
The problem is that this arrangement does not seem to work well in Windows 7 with DirectX 10. I have ported the Render Code to DX10, and am using DXGI swap chains.I now need help choosing the threading model.
It seems that DXGI swap chains work a lot differently than DX9 swap chains. For a start, in order to present synced to the VSYNC, It seems that I MUST enable the Desktop Windows Manager (i.e. Aero). If I do not do this, only one window on the monitor updates per monitor refresh (a different window each refresh). This means that for the 3 windows WindowA, WindowB, WindowC, you will get WindowA updated on frame1, WindowB on frame 2, WindowC on frame 3, and Window A on frame 4. This effectively gives a refresh rate of 20Hz for each window on a 60Hz monitor - yuck!
Enabling DWM has caused some performance problems, as now each window's content is now blitted to a DWM surface each frame. The real problem that I am running into is that the scrolling of each window's content is no longer smooth using the existing threading model of one rendering thread per monitor. I experimented with reducing the number of monitors, and got good results only when I had one monitor (i.e. only one rendering thread)
What is the best way to render multiple windows synced to the VSYNC to multiple monitors with DirectX10?
Thanks,
Clive
This application displays scrolling data in multiple windows on multiple monitors (up to 4 monitors, with 3 windows per monitor). Each present must by synced to the VSYNC of the monitor as it is important that we have no tearing. It is not a full screen DirectX app.
In the current architecture (XP with DirectX 9) a different DirectX 9 device was created for each monitor and each monitor had its own rendering thread (not the main thread). A separate swap chain was created for each window. Each rendering thread would render to each window in turn, and then present to each window in turn, i.e. RenderA, RenderB, RenderC, PresentA, PresentB, PresentC. This worked well in XP with DirectX9.
The problem is that this arrangement does not seem to work well in Windows 7 with DirectX 10. I have ported the Render Code to DX10, and am using DXGI swap chains.I now need help choosing the threading model.
It seems that DXGI swap chains work a lot differently than DX9 swap chains. For a start, in order to present synced to the VSYNC, It seems that I MUST enable the Desktop Windows Manager (i.e. Aero). If I do not do this, only one window on the monitor updates per monitor refresh (a different window each refresh). This means that for the 3 windows WindowA, WindowB, WindowC, you will get WindowA updated on frame1, WindowB on frame 2, WindowC on frame 3, and Window A on frame 4. This effectively gives a refresh rate of 20Hz for each window on a 60Hz monitor - yuck!
Enabling DWM has caused some performance problems, as now each window's content is now blitted to a DWM surface each frame. The real problem that I am running into is that the scrolling of each window's content is no longer smooth using the existing threading model of one rendering thread per monitor. I experimented with reducing the number of monitors, and got good results only when I had one monitor (i.e. only one rendering thread)
What is the best way to render multiple windows synced to the VSYNC to multiple monitors with DirectX10?
Thanks,
Clive