Migrating to WDDM

Note

XDDM and VGA drivers will not compile on Windows 8 and later operating systems. If display hardware is attached to a Windows 8 computer without a driver that is certified to support WDDM 1.2 or later, the system defaults to running the Basic Display Driver.

New drivers should be written as WDDM drivers.

To migrate to the Windows Display Driver Model (WDDM), driver developers need to write completely different display and video miniport drivers. Similar to the Windows 2000 display driver model (XDDM), WDDM requires a paired display driver and display miniport driver. However, the display driver runs in user mode in WDDM. Also, the model doesn't use services of the Windows Graphics Device Interface (GDI) engine. Instead, it uses services of the Direct3D runtime and DirectX graphics kernel subsystem (Dxgkrnl.sys).

Although driver writers can reuse low-level hardware-dependent code in their WDDM drivers, they should rewrite new device driver interface (DDI)-related code. When writing WDDM drivers, consider these points:

  • The display miniport driver must implement a revised set of entry-point functions to interact with the operating system and the DirectX graphics kernel subsystem. For more information, see DriverEntry of Display Miniport Driver. The display miniport driver can call any documented kernel function.

  • The display miniport driver dynamically loads the appropriate DirectX graphics kernel subsystem. The display miniport driver and the DirectX graphics kernel subsystem call each other through interfaces.

  • The display miniport driver is no longer required to process most video I/O control codes (IOCTL). In XDDM, the kernel-mode display driver uses these codes to communicate with the video miniport driver. In WDDM, the user-mode display driver communicates with the Direct3D runtime; the WDDM graphics kernel subsystem, in turn, communicates with the display miniport driver. Note   The following IOCTLs are still used in WDDM, and the display miniport driver must process them: IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS

  • The user-mode display driver must implement and export an OpenAdapter function, which opens an instance of the graphics adapter. The user-mode display driver must also implement a CreateDevice function, which creates representations of display devices that handle collections of rendering state.

  • The user-mode display driver's CreateResource function, along with the display miniport driver's DxgkDdiCreateAllocation function, replace the DdCanCreateSurface, DdCreateSurface, and D3dCreateSurfaceEx functions in XDDM.

  • Most of the remaining user-mode WDDM display driver functions implement the same functionality that the kernel-mode XDDM display driver implemented in the following functions: