Handling Multiple Graphics Adapters and Monitors
Asked Answered
F

0

5

I am trying to decide whether or not to support multiple adapters/monitors in my application as opposed to locking my window to the primary adapter and primary monitor. I have a lot of questions about this as I have never used a system with multiple graphics cards.

How does the Windows desktop behave when there are multiple graphics cards present? If both cards are running their own set of monitors, can a window be dragged between one card's monitor and another? If so, what card would my Direct3D 11 context be using in that case?

How does DXGI's abstraction work with cards that are in Crossfire/SLI vs those that are not?

How does Windows handle VSync when multiple monitors are present?

What determines which graphics adapter is considered the primary adapter?

I'm sure there's more pertinent information that I don't know to ask about, so any extra information on this would be of help as well.

Fudge answered 7/12, 2014 at 19:30 Comment(5)
See DirectX Graphics Infrastructure (DXGI): Best PracticesPolyptych
A few other known limitations: -DWM composition happens at the framerate of the primary monitor; secondary monitors with a different refresh are not updated at VSYNC. -You can't have two full-screen devices on two different adapters, although you can have multiple ouputs on the same adapter in fullscreen. -Crossfire/SLI are virtualized as a single adapter -Pprimary/default adapter is determined by the user selection of an output as their 'main display'Polyptych
While the code is rather messy and mostly exists for Win32 desktop sample support, there's some logic in DXUT that tries to handle things like 'clipping' a window to always fit on a single monitor, creating the device if you switch adapters, etc. that you may find helpful as well.Polyptych
@ChuckWalbourn Can a window be moved between adapters?Fudge
Yes, and generally you don't notice since most multi-monitor setups are either a single adapter with multiple outputs or a virtualized single adapter. As noted, DXUT does some extra work to detect the case of moving a window from one adapter to another and recreates the device.Polyptych

© 2022 - 2024 — McMap. All rights reserved.