Windows Vista Display Driver Model
Microsoft Corporation
July 2006
Contents
Introduction
Overall WDDM Benefits
Desktop Window Manager
Video Improvements
Deployment
Mobility and Power Features
New Graphics APIs
Summary: The Windows Display Driver Model (WDDM) is a new display driver architecture supported in Windows Vista. This display architecture is an overhaul of the Windows XP-based display architecture and gives users a better performing, more reliable desktop experience, while supporting new scenarios, graphics, and applications.
WDDM also provides video content playback that rivals typical consumer electronics devices. It does this by making it easy to connect to external monitors, providing for protected HD video playback and increasing overall video playback quality. For the first time in Windows, graphics processing unit (GPU) multitasking is possible, enabling users to run more than one GPU-intensive application simultaneously.
Finally, WDDM improves the PC gaming experience by simplifying the generalized GPU programming model for developers, maintaining a consistency in hardware capabilities, which translates into a PC gaming experience that will leapfrog that of even the latest consoles.
This new display driver model is a crucial piece of the new desktop experience and thus having a GPU that supports WDDM is a requirement for the Windows Vista "Premium Ready" marketing designation and will be applicable to future Windows Vista logo programs. (7 printed pages)
Introduction
The rates of performance improvements for GPUs have exceeded Moore's law by a wide margin. Experts say GPUs have been improving at a "Moore's Law Cubed" rate, which roughly translates to a doubling of graphics processing power every year. To date, this massive graphics processing power has predominantly been used for video games, multimedia-rich suites, like video editing, special effects applications, and for high-end technical applications like computer-aided design. As a result, even though virtually every modern PC includes one, the power of the GPU is rarely used in day-to-day activities, resulting in GPUs not being a top priority in the PC design process.
Windows Vista harnesses the power of the GPU for more than just gaming. For starters, Windows Vista relies on the GPU to give all customers a better overall day-to-day desktop experience. The Windows video playback infrastructure relies on WDDM to deliver high-definition (HD) video playback and to take video playback to a level on par with the latest consumer electronics devices. In addition, there are a number of other key applications that now utilize the GPU, such as the new Windows Photo Gallery. This wider utilization of the GPU, concurrently by the operating system and multiple applications, is enabled by WDDM.
This paper examines the general and specific benefits of WDDM including:
- Overall WDDM benefits
- Desktop Window Manager (DWM)
- Video improvements, including Protected Video Playback (PVP)
- Deployment
- Mobility and power
- New graphics APIs
Overall WDDM Benefits
Stability
In Windows XP, display drivers, which are large and complex, can be a major source of system instability. These drivers execute entirely in kernel mode (i.e., deep in the system code) and hence a single problem in the driver will often force the entire system to reboot. According to the crash analysis data collected during the Windows XP timeframe, display drivers are responsible for up to 20 percent of all blue screens. Thus it became one of the primary goals of Windows Vista to reduce such crashes and provide customers with a more reliable desktop experience while also lowering partner support costs. Reliability is even more important now, as there are mainstream features that require the graphics pipeline to perform efficiently around the clock. The new Desktop Window Manager, which draws onscreen windows, is an example of such a feature. The benefits of experienceng a stable desktop experience, free of redrawing errors, certainly apply to all customers, and not just gamers.
At a technical level, WDDM display drivers have two components, a kernel mode driver (KMD) that is very streamlined, and a user-mode driver that does most of the intense computations. With this model, most of the code is moved out of kernel mode. That is, the kernel mode piece is now solely responsible for lower-level functionality and the user mode piece takes on heavier functionality such as facilitating the translation from higher-level API constructs to direct GPU commands while maintaining application compatibility. This greatly reduces the chance of a fatal blue screen and most graphics driver-related problems result in at worst one application being affected.
WDDM also provides fault-tolerance against display driver hangs. This enables Windows Vista to detect system hangs and restart the display driver again without the need of a system reboot.
Additionally, display drivers in Windows Vista have been significantly simplified by eliminating the need to include code for the support of various device driver interfaces introduced over many years. Thus, Windows Vista implements only a single interface while ensuring that all the older drivers are recognized and function optimally.
Performance
When an application requiring the GPU is launched, control is wrested away from any other applications currently using the GPU. This happens because there is no ability to share the GPU across multiple applications simultaneously. In Windows Vista, the GPU is utilized for many common activities, like basic window management and video rendering. Additionally, with the Windows Presentation Foundation (part of the .NET Framework 3.0 development platform), there are new APIs that enable developers to easily use the GPU to provide non-gaming applications with rich user-friendly interfaces. Since all these applications and features are dependent on the GPU, GPU multitasking is critical.
WDDM enables multiple applications to utilize the GPU simultaneously by implementing the following:
- GPU memory manager—arbitrates video memory allocation
- GPU scheduler—schedules various GPU applications according to their priority
With these technologies, applications no longer have to cede the GPU when another application requiring its services starts-up. Instead, the GPU is scheduled in a more efficient fashion.
Security
Security is a major concern on any platform that supports multitasking. A secure OS needs to ensure that resources used by one application are isolated from another. This isolation of applications is a requirement for protected HD content playback.
WDDM, via the security model built into the GPU memory manager and scheduler, provides this needed isolation. Current Windows XP display drivers do not have such facilities and are limited in the types of HD content they can playback.
Desktop Window Manager
The Desktop Window Manager (DWM) is the technology in Windows Vista that controls the display and update of windows on the desktop. In order to eliminate drawing artifacts that are apparent on earlier versions of Windows, where applications draw directly to the screen asynchronously, the DWM composites onscreen content, such as application windows, in a back- or off-screen buffer, before drawing them onto the user's display. The DWM is, in essence, a Direct3D application that is active from the moment the computer is turned on. Thus, core features of the WDDM, such as the ability to share the GPU resources and processing, become essential in this scenario. For Windows Vista, there were two areas of investment in relation to the DWM: overall improvement in quality and a captivating user experience. The WDDM plays a key role in enabling all these advances, as we will see below. Built on top of the DWM is the Windows Vista signature end-user experience, Windows Aero.
Quality
In Windows XP, applications update their windows directly when the OS requests them to. These requests could be executed asynchronously with respect to the refresh rate of the monitor or to any updates that may be currently running. The effect of these requests is that the user sees windows tearing and re-drawing incorrectly or slowly. The DWM style of window presentation eliminates the tearing artifacts, providing a high quality desktop experience. The benefit to the end user is that the system appears to be more responsive and the experience is cleaner.
Windows Aero
The DWM also makes the new Windows Aero user experience possible. Aero is Windows Vista's best designed, highest performing desktop experience. It requires a PC equipped with an appropriate graphics configuration, which includes support for WDDM; the PC must also be equipped for Windows Vista Ultimate, Windows Vista Enterprise, Windows Vista Business, or Windows Vista Home Premium product editions. The DWM delivers a number of features that enable end users to find and access windows on their desktop in more convenient and direct ways. These features rely on being able to share graphics memory between applications and the DWM, which is enabled by WDDM. Other features, like Windows Flip and Windows Flip 3D, let you confidently manage the windows on your desktop, helping you to see them in a visually striking yet convenient way. See Windows Vista Upgrade Advisor beta for exact hardware requirements, and see Windows Vista Capable and Premium Ready PCs to check for compatibility.
The DWM enables the Windows Aero experience to provide the following end user features:
- Live taskbar thumbnails for open and minimized applications.
- Windows Flip (Alt + Tab), and Windows Flip 3D (Windows key + Tab)—two new visually stunning ways to manage open application windows.
- DPI scaling—support for higher DPI screens so that text displays reliably no matter the resolution of your monitor.
Visual refresh
A noticeably new element of the Windows Aero experience is the professional looking, transparent glass design, with subtle effects like dynamic reflections and smooth animations. Visual elements such as the glass effect rely on the Direct3D pixel-shader pipeline, and the virtualization of the GPU by the WDDM. But, beyond the new graphics and visual polish, the Windows Aero desktop experience performs as smoothly and professionally as it looks, giving the user a simple and high quality experience.
Video Improvements
One of the goals of Windows Vista is to match the quality of video playback that people expect from mainstream consumer-electronics devices. Since video playback is dependent on the driver architecture, Windows Vista, with its upgraded driver model, is able to provide a number of video playback improvements.
Easy TV-out support
Today, connecting a PC to a TV is difficult for the average consumer. Unlike a consumer electronics device, simply plugging in a TV does not work without extensive configuration. The setup can often require an additional monitor and third-party products. WDDM eliminates connectivity issues between a TV or monitor and the PC, giving users plug and play simplicity.
Improved video playback quality
Video playback on current operating systems suffers from quality issues like excessive video glitching and poor color fidelity when compared to consumer electronic devices. WDDM provides a number of facilities to mitigate these problems.
First, WDDM enables Windows Vista and running applications to queue frames to be presented on the GPU. Second, working closely with the queuing feature is a feedback mechanism that determines when frames are presented. Together, these two features can immensely improve the quality of video playback by constantly maintaining the synchronicity between audio and video presentations, thus improving video playback and reducing video glitching substantially.
Finally, WDDM drivers also provide support for better color (gamma) correction via the Direct3D9x and Direct3D10 APIs, which in turn requires the GPU to support these APIs.
HD video playback
As mentioned above in the security section, WDDM provides support for secure playback of HD video content, a requirement of many content providers.
Deployment
A major frustration for Windows end-users is software updates that force the system through a reboot. Graphics drivers formerly required a reboot after an update. With Windows Vista and a WDDM-supporting GPU, users are no longer required to reboot when the graphics driver is updated.
Mobility and Power Features
There are also WDDM benefits for mobile new Mobility features in Windows Vista that depend on WDDM.
Hot plug detection of displays and projectors
With Windows XP connecting a laptop to a projector can prove to be a multistep process, where each step might be totally different from one laptop vendor to another. In Windows Vista, this process of connecting to an external display or projector is greatly simplified. When an additional external display or a projector is connected to the display adapter, WDDM detects this new state instantly and automatically notifies the Transient Mobility Manager (TMM) module, which is the underlying technology for the new Windows Vista External Display wizard. The wizard makes it simple to extend or clone the desktop to the second display device.
"Hybrid" Sleep
The Windows Vista advanced Sleep state combines the fast on/off of Standby function with the reliability of the Hibernate function. In Windows XP, Hibernate causes the contents of system memory to be saved to the hard disk and the system to be powered off; Standby causes the contents of memory to be preserved with a small amount of power, while the remainder of the system is powered off.
However, in Windows Vista, "Hybrid" Sleep causes the contents of system memory to be saved to the hard disk and the system placed into Standby at the same time. Therefore, the system is able to resume from system memory extremely fast—in less than 2 seconds for Windows Premium-capable PCs. However, if the battery drains fully or a power loss causes the contents of system memory to be lost, the system can resume from the hard disk.
Note Hybrid Sleep requires WDDM.
New Graphics APIs
WDDM implements a much more functional graphical resource management. This functionality is critical to the proper functioning of the Direct3D9x and Direct3D10 APIs that are available to developers.
Windows Presentation Foundation
Windows Presentation Foundation is the next generation of the Windows client development platform for user interface, documents, graphics, desktop-based, and connected applications, as well as content. It enables a wider spectrum of developers to harness the power of the GPU, without necessarily having to be aware of low-level graphics programming constructs. It is now easier for designers and developers to build user interfaces and content that give customers a richer and more engaging experience. As a result we will soon see a new generation of applications, both local and Web-based, that provide more engaging experiences, better visualization of data, and greater improvements to the reading experience.
While Windows Presentation Foundation is available for Windows XP SP2 and Server 2003 versions, on Windows Vista Windows Presentation Foundation benefits from WDDM in terms of scalability, as one can more reliably run multiple WPF applications concurrently.
Console-like simplicity for gaming
Direct3D10 is the new Direct3D API that enables next-generation 3-D graphics and sophisticated parallel computing. This API depends on the resource management functionality of WDDM to provide some of its expressive power. Key benefits of Direct3D10 APIs are:
- Generalized GPU programming model Elimination of limits to the GPU programming, made possible in part by WDDM resource management, enables a more powerful GPU programming model that can be used for both next-generation 3-D graphics as well as for more general purpose uses that can benefit from highly parallel processing such as image processing.
- Consistency in hardware capabilities Like in a console, all Direct3D10-capable hardware looks identical to the developer. In other words, capability bits, which distinguish between different hardware configurations running D3D9.x, do not exist. This enables a much simpler implementation of software.
- **Visual effects **Features such as the Geometry Shader and Stream Out aid the developer in creating more life-like and realistic graphics that go beyond what the next-generation consoles can deliver today.
- **Better system performance **Better performance is achieved because processing can be offloaded consistently when required by the CPU.