Microsoft Direct3D - Direct3D and Windows Vista

Direct3D and Windows Vista

This article is outdated. Please update this article to reflect recent events or newly available information.

Windows Vista and its updated driver model brings some new improvements and changes compared to the Windows XP model, and is expected to evolve even more as the hardware and the OS evolve (via future service packs or in the next version of Windows).

Windows Vista forces multithreading, via a theoretically unlimited number of execution contexts on the GPU. Multithreading was already supported in Windows XP as two applications or more could execute in different windows and be hardware accelerated. Windows Vista makes it a requirement to support an arbitrarily large number of execution contexts (or threads) in hardware or in software. Vista, in its basic scheduling incarnation (the current driver model), manages threads all by itself, allowing the hardware to switch from one thread to the other when appropriate. This is a departure from Windows XP, where the hardware could decide to switch threads on its own, as the OS had limited control about what the GPU could do. Also Windows Vista handles memory management and paging (to system memory and to disk), which is a necessity in order to support a large number of execution contexts with their own resources. Each execution context is presented with a resource view of the GPU that matches the maximum available (or exceeds it for aware applications). Most of the management is implemented on the OS side in order to be properly integrated into the OS-kernel memory management.

Execution contexts are protected from each other. Because of the user-mode implementation of the Vista driver, a rogue or badly written app can take control of the execution of the driver and could potentially access data from another process within GPU memory by sending modified commands. Though protected from access by another app, a well-written app still needs to protect itself against failures and device loss caused by other applications. The user-mode implementation can reduce the occurrence of BSODs caused by graphics drivers (which is a much more catastrophic event to a running app than a device-lost event).

Regularly Microsoft spokespeople talked about the necessity to have a finer grain context switching (referred to as "advanced scheduling") so as to be able to switch two execution threads at the shader-instruction level instead of the single-command level or even batch of commands, as in yet-unpublished WDDM 2.x specification. This is not a requirement of Vista, nor of Direct3D 10 compatibility. Direct3D10 apps can run, and are now running, on top of the basic scheduling implementation. This is not typically a problem except for a potential application that would have very long execution of a single command/batch of commands (which is currently prevented under Windows Vista). Vista cannot enforce right now a finer-grained context switching, as it will require additional support from hardware vendors, but it may appear in the future.

Finer-grain preemptive multitasking was introduced in WDDM/DXGI 1.2 which shipped with Windows 8 Developer Preview.

Read more about this topic:  Microsoft Direct3D

Famous quotes containing the words windows and/or vista:

    “Try speaking. Say ‘Hello!’”
    “Hello. Hello.”
    “What do you hear?”
    “I hear an empty room—
    You know it sounds that way. And yes, I hear
    I think I hear a clock and windows rattling....”
    Robert Frost (1874–1963)

    Softly, in the dusk, a woman is singing to me;
    Taking me back down the vista of years, till I see
    A child sitting under the piano, in the boom of the tingling strings
    And pressing the small, poised feet of a mother who smiles as she
    sings.
    —D.H. (David Herbert)