Migrating to the Windows Display Driver Model (WDDM)) requires driver writers 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, in WDDM, the display driver runs in user mode. Also, the model does not use services of the Windows Graphics Device Interface (GDI) engine; the model uses services of the Microsoft Direct3D runtime and Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys).
WDDM supports display and video miniport drivers written according to XDDM. However, new drivers should be written as WDDM drivers, whenever possible, to take advantage of software and hardware features available starting with Windows Vista.
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 WDDMdrivers, 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 display driver functions implement the same functionality that the kernel-mode display driver for XDDM implemented in the following: