Windows Display Driver Model (WDDM)[1] is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista.[2]

It is a replacement for the previous Windows 2000 and Windows XP display driver model XDDM/XPDM[3] and is aimed at enabling better performance graphics and new graphics functionality and stability.[2] Display drivers in Windows Vista and Windows 7 can choose to either adhere to WDDM or to XDDM.[4] With the removal of XDDM from Windows 8, however, WDDM became the only option.[5]

WDDM provides the functionality required to render the desktop and applications using Desktop Window Manager, a compositing window manager running on top of Direct3D. It also supports new DXGI interfaces required for basic device management and creation. The WDDM specification requires at least Direct3D 9-capable video card and the display driver must implement the device driver interfaces for the Direct3D 9Ex runtime in order to run legacy Direct3D applications; it may optionally implement runtime interfaces for Direct3D 10 and higher.

Features enabled by the WDDM

WDDM drivers enable new areas of functionality which were not uniformly provided by earlier display driver models. These include:

Virtualized video memory

In the context of graphics, virtualization means that individual processes (in user mode) cannot see the memory of adjacent processes even by means of insertion of forged commands in the command stream. WDDM drivers allow video memory to be virtualized,[6] and video data to be paged out of video memory into system RAM. In case the video memory available turns out to be insufficient to store all the video data and textures, currently unused data is moved out to system RAM or to the disk. When the swapped out data is needed, it is fetched back. Virtualization could be supported on previous driver models (such as the XP Driver Model) to some extent, but was the responsibility of the driver, instead of being handled at the runtime level.

Scheduling

The runtime handles scheduling of concurrent graphics contexts.[7] Each list of commands is put in a queue for execution by the GPU, and it can be preempted by the runtime if a more critical task arrives and if it has not begun execution. This differs from native threads on the CPU where one task cannot be interrupted and therefore can take longer than necessary and make the computer appear less responsive. A hybrid scheduling algorithm between native and light threads with cooperation between the threads would achieve seamless parallelism. It is important to note that scheduling is not a new concept but it was previously the responsibility of individual driver developers. WDDM attempts to unify the experience across different vendors by controlling the execution of GPU tasks.

Cross-process sharing of Direct3D surfaces

A Direct3D graphics surface is the memory area that contains information about the textured meshes used for rendering a 2D or 3D scene. WDDM allows Direct3D surfaces to be shared across processes.[8] Thus, an application can incorporate a mesh created by another application into the scene it is rendering. Sharing textures between processes before WDDM was difficult, as it would have required copying the data from video memory to system memory and then back to video memory for the new device.

Enhanced fault-tolerance

Windows Vista alerting the user of a successful WDDM recovery
Windows Vista alerting the user of a successful WDDM recovery
Windows XP alerting the user of a display driver crash that can be safely stopped.
Windows XP alerting the user of a display driver crash that can be safely stopped.

If a WDDM driver hangs or encounters a fault, the graphics stack will restart the driver.[2][9] A graphics hardware fault will be intercepted and if necessary the driver will be reset.

Drivers under Windows XP were free to deal with hardware faults as they saw fit either by reporting it to the user or by attempting to recover silently. In some cases when the display driver can be safely stopped, Windows XP may instead alert about the display driver crash, while also disabling the video driver, thus switching down the screen resolution to 640x480 with only 16 colors. With a WDDM driver, the screen resolution will most likely be unaffected; all hardware faults cause the driver to be reset and the user will be notified by a popup; this unifies the behavior across vendors.

Previous drivers were fully implemented in kernel mode, whereas WDDM is implemented partly in user mode. If the user mode area fails with an unrecoverable error, it will, at the most, cause the application to quit unexpectedly instead of producing a blue screen error as it would in previous driver models.

WDDM also allows the graphics hardware to be reset and users to update drivers without requiring a reboot.[2]

Limitations

The new driver model requires the graphics hardware to have Shader Model 2.0 support at least, since the fixed function pipeline is now translated to 2.0 shaders. However, according to Microsoft as of 2009, only about 1–2 percent of the hardware running Windows Vista used the XDDM,[10] with the rest already WDDM capable. It also requires some other hardware features; consequently some SM 2.0-supporting hardware such as the Intel GMA 900 fails the WDDM certification.[11]

One of the limitations of WDDM driver model version 1.0 is that it does not support multiple drivers in a multi-adapter, multi-monitor setup. If a multi-monitor system has more than one graphics adapter powering the monitors, both the adaptors must use the same WDDM driver. If more than one driver is used, Windows will disable one of them.[12] WDDM 1.1 does not have this limitation.[13]

WDDM 1.0/1.1 does not allow some modes that were previously handled by the driver such as spanning mode (stretching the desktop across two monitors)[14][15] although Dual View is still available.[12][16]

Need for a new display driver model

One of the chief scenarios the Windows Display Driver Model enables is the Desktop Window Manager. Since the desktop and application windows managed by DWM are Direct3D applications, the number of open windows directly affects the amount of video memory required. Because there is no limit on the number of open windows, the video memory available may prove insufficient, necessitating virtualization. As the window contents that DWM composes into the final desktop are generated by different processes, cross-process surface sharing is necessary. Also, because there can be other DirectX applications running alongside DWM on the DWM-managed desktop, they must be able to access the GPU in a shared manner, necessitating scheduling.

Though this is true for Microsoft's implementation of a composited desktop under Windows Vista, on the other hand, a composited desktop need not theoretically require a new display driver model to work as expected. Successful implementations of composited desktops were done before Windows Vista on other platforms such as Quartz, Compiz, WindowFX. The approach Microsoft attempted was to try to make sure WDDM was a unified experience across different GPUs from multiple vendors by standardizing their features and performance. The software features missing from other driver models could be made immaterial by extensions or if a less restrictive or simply different driver model was in place.

History

WDDM 1.0

Windows Vista introduced WDDM 1.0 as a new display driver architecture designed to be better performing, more reliable, and support new technologies including HDCP. Hybrid Sleep, which combines hibernation and sleep mode functionality for enhanced stability in the event of power failure, also requires WDDM.[2][why?]

WDDM 1.1

Windows 7 supports major additions to WDDM known as WDDM 1.1; the details of this new version were unveiled at WinHEC 2008. New features include:[10]

Hardware acceleration of GDI and Direct2D/DirectWrite operations helps reduce memory footprint in Windows 7, because DWM compositing engine no longer needs to keep a system memory copy of all surfaces used by GDI/GDI+, as in Windows Vista.[21][22][23]

DXGI 1.1, Direct3D 11, Direct2D, and DirectWrite were made available with Windows Vista Platform Update; however GDI/GDI+ in Vista continues to rely on software rendering[24] and the Desktop Window Manager continues to use Direct3D 9Ex.[25]

WDDM 1.1 drivers are backward compatible with WDDM 1.0 specification; both 1.0 and 1.1 drivers can be used in Windows Vista with or without the Platform Update.[10]

WDDM 1.2

Windows 8 includes WDDM 1.2[26][27] and DXGI 1.2.[27][28] New features were first previewed at the Build 2011 conference and include performance improvements as well as support for stereoscopic 3D rendering and video playback.

Other major features include preemptive multitasking of the GPU with finer granularity (DMA buffer, primitive, triangle, pixel, or instruction-level),[29] reduced memory footprint, improved resource sharing, and faster timeout detection and recovery. 16-bit color surface formats (565, 5551, 4444) are mandatory in Windows 8, and Direct3D 11 Video supports YUV 4:4:4/4:2:2/4:2:0/4:1:1 video formats with 8, 10, and 16-bit precision, as well as 4 and 8-bit palettized formats.[30]

WDDM 1.2 supports display-only and render-only WDDM drivers, such as Microsoft Basic Display Driver[31] and WARP-based Microsoft Basic Render Driver which replaced kernel-mode VGA driver.

WDDM 1.0/1.1 only allows rudimentary task scheduling using "batch queue" granularity; improvements to multitasking, as well as fast context switching and support for virtual memory, were initially expected in versions tentatively named WDDM 2.0 and WDDM 2.1, which were announced at WinHEC 2006.[32][33][34]

WDDM 1.3

Windows 8.1 includes WDDM 1.3[35] and DXGI 1.3.[36] New additions include the ability to trim DXGI adapter memory usage, multi-plane overlays, overlapping swap chains and swap chain scaling, select backbuffer subregion for swap chain and lower-latency swap chain presentation. Driver feature additions include wireless displays (Miracast), YUV format ranges, cross-adapter resources and GPU engine enumeration capabilities. Graphics kernel performance improvements.[1]

WDDM 2.0

Windows 10 includes WDDM 2.0, which is designed to dramatically reduce workload on the kernel-mode driver for GPUs that support virtual memory addressing,[37] to allow multithreading parallelism in the user-mode driver and result in lower CPU utilization.[38][39][40][41] Windows 10 also includes DXGI 1.4.[42]

Direct3D 12 API, announced at Build 2014, requires WDDM 2.0. The new API will do away with automatic resource-management and pipeline-management tasks and allow developers to take full low-level control of adapter memory and rendering states.

The display driver model from Windows 8.1 and Windows Phone have converged into a unified model for Windows 10.[43]

A new memory model is implemented that gives each GPU a per-process virtual address space. Direct addressing of video memory is still supported by WDDMv2 for graphics hardware that requires it, but that is considered a legacy case. IHVs are expected to develop new hardware that supports virtual addressing. Significant changes have been made to the DDI to enable this new memory model.

WDDM 2.1

Windows 10 Anniversary Update (version 1607) includes WDDM 2.1, which supports Shader Model 6.0 (mandatory for feature levels 12_0 and 12_1),[44] and DXGI 1.5 which supports HDR10 - a 10-bit high dynamic range, wide gamut format[45] defined by ITU-T Rec. 2100/Rec.2020 - and variable refresh rates.[46]

WDDM 2.2

Windows 10 Creators Update (version 1703) includes WDDM 2.2, which is tailored for virtual, augmented and mixed reality with stereoscopic rendering for the Windows Mixed Reality platform, and DXGI 1.6.[47]

WDDM 2.3

Windows 10 Fall Creators Update (version 1709) includes WDDM 2.3. The following is a list of new features for Windows Display driver development in Windows 10, version 1709:[48]

WDDM 2.4

Windows 10 April 2018 Update (version 1803) includes WDDM 2.4. Updates to display driver development in Windows 10 version 1803 include the following features[50].:

WDDM 2.5

Windows 10 October 2018 Update (Version 1809) Includes WDDM 2.5.[52] Updates to Display driver development in Windows 10, version 1809 include the following features:[53]

WDDM 2.6

Windows 10 May 2019 Update (Version 1903) includes WDDM 2.6. Updates to display driver development in Windows 10 version 1903 include the following features:[56]

WDDM 2.7

Windows 10 May 2020 Update[58] (Version 2004) includes WDDM 2.7. Updates to display driver development in Windows 10 version 2004 include the following features:[59]

WDDM 2.8

Windows 10 Insider Preview Manganese included WDDM 2.8, but no driver was ever publicly demonstrated to support it and it has been skipped for "Iron" and "Cobalt" development releases.

WDDM 2.9

WDDM 2.9 in Windows 10 Insider Preview "Iron" will bring support for GPU hardware acceleration to the Windows Subsystem for Linux 2 (WSL 2)[69] and support for feature level 12_2[70] and HLSL Shader Model 6.6.[71]

WDDM 3.0

Windows 11 RTM Final Retail release (version 21H2) includes WDDM 3.0,[72][73] which improves graphics architecture in Windows Subsystem for Linux[74] adding:[75]

WDDM 3.1

Windows 11 2022 Update (version 22H2) includes WDDM 3.1.[78][79]

WDDM 3.2

Windows 11 Insider Preview builds 25xxx (version 23H2) includes WDDM 3.2.

See also

References

  1. ^ "Windows Display Driver Model (WDDM) Design Guide". MSDN. Microsoft. Retrieved 19 February 2015.
  2. ^ a b c d e "Windows Vista Display Driver Model". MSDN. Microsoft. July 2006. Archived from the original on 2010-05-06. Retrieved 9 December 2013.
  3. ^ "XPDM vs. WDDM". MSDN. Microsoft. 16 November 2013. Retrieved 16 December 2013.
  4. ^ "Windows 2000 Display Driver Model (XDDM) Design Guide". Windows Dev Center - Hardware. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  5. ^ "Roadmap for Developing Drivers for the Windows 2000 Display Driver Model (XDDM)". Windows Dev Center - Hardware. Microsoft. 16 November 2013. Retrieved 16 December 2013. XDDM and VGA drivers will not compile on Windows 8 and later versions
  6. ^ "Graphics Memory Reporting through WDDM". MSDN. Microsoft. 9 January 2007. Retrieved 9 December 2013.
  7. ^ Schechter, Greg (2 April 2006). "The role of the Windows Display Driver Model in the DWM". Greg Schechter's Blog. Microsoft. Archived from the original on 20 April 2010. Retrieved 9 December 2013.
  8. ^ "Cross Process Resource Sharing". MSDN. Microsoft. 10 December 2009. Retrieved 9 December 2013.
  9. ^ "Timeout Detection and Recovery of GPUs through WDDM". Timeout Detection and Recovery: Microsoft. Archived from the original on 6 September 2011. Retrieved 4 September 2011.
  10. ^ a b c d "Graphics Guide for Windows 7". Microsoft. 12 June 2009.
  11. ^ Intel excuse for no GMA900 WDDM driver: no "HW Scheduler" no driver, Beyond3D, October 26, 2006.
  12. ^ a b "MultiMonitor Support and Windows Vista". Retrieved 20 October 2007.
  13. ^ Blythe, David. "Working With the Windows 7 Graphics Architecture". WinHEC 2008. Microsoft. Archived from the original on October 20, 2013. Retrieved 9 December 2013.
  14. ^ Are there Control Panel features that were available under Windows XP that are no longer available on Windows Vista?
  15. ^ Stretched Desktop or Spanning Mode Not Available in Catalyst Control Center Under Windows Vista Archived November 17, 2009, at the Wayback Machine
  16. ^ "Description of DualView in Windows XP (Revision 1.5)". Support. Microsoft. 15 January 2006. Retrieved 9 December 2013.
  17. ^ "GDI Hardware Acceleration". MSDN. Microsoft. Retrieved 14 June 2009.
  18. ^ "DXVA-HD DDI". MSDN. Microsoft. Retrieved 13 June 2009.
  19. ^ "Overlay DDI". MSDN. Microsoft. Retrieved 13 June 2009.
  20. ^ "Multiple Monitors and Video Present Networks". MSDN. Microsoft. Retrieved 14 July 2010.
  21. ^ Schechter, Greg (3 May 2006). "Redirecting GDI, DirectX, and WPF applications". Greg Schechter's Blog. Microsoft. Archived from the original on 5 March 2010. Retrieved 9 December 2013.
  22. ^ Chitre, Ameet (25 August 2009). Sinofsky, Steven (ed.). "Engineering Windows 7 Graphics Performance". Engineering Windows 7. Microsoft. Retrieved 9 December 2013.
  23. ^ Mulcahy, Tom (11 February 2009). "Windows And Video Memory". Zemblanity. Microsoft. Retrieved 9 December 2013.
  24. ^ Olsen, Thomas (29 October 2008). "Introducing the Microsoft Direct2D API". Tom's Blog. Microsoft. Retrieved 9 December 2013.
  25. ^ Mark Lawrence (25 November 2009). "Internet Explorer announces to use DirectWrite & Direct2D (comment from Microsoft official)". Archived from the original on 2014-04-08.
  26. ^ "Windows Developer Preview - New for Display devices". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  27. ^ a b "Windows Display Driver Model Enhancements in Windows Developer Preview". MSDN. Microsoft. 28 September 2012. Retrieved 9 December 2013.
  28. ^ "DXGI 1.2 Improvements". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  29. ^ "DXGI_Graphics_Preemption_Granularity Enumeration". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  30. ^ "DXGI_FORMAT enumeration". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  31. ^ "Microsoft Basic Display Driver - Windows drivers".
  32. ^ Al-Kady, Nabeel. "Display Driver Logistics And Testing". WinHEC 2006. Microsoft. Retrieved 9 December 2013.
  33. ^ Pronovost, Steve. "Windows Display Driver Model (WDDM) v2 And Beyond". WinHEC 2006. Microsoft. Retrieved 9 December 2013.
  34. ^ Dan Warne (June 1, 2006). "Windows graphics system to be overhauled". APC Magazine. Retrieved 20 February 2015.
  35. ^ "What's new for Windows 8.1 Preview display drivers (WDDM 1.3)". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  36. ^ "DXGI 1.3 Improvements". MSDN. Microsoft. 16 November 2013. Retrieved 9 December 2013.
  37. ^ "What's new for Windows 10 Insider Preview display drivers (WDDM 2.0)". Microsoft. Retrieved 3 June 2015.
  38. ^ McMullen, Max (2 April 2014). Direct3D 12 API Preview. MSDN. Retrieved 3 June 2015.
  39. ^ Moreton, Henry (2014-03-20). "DirectX 12: A Major Stride for Gaming | NVIDIA Blog". Blogs.nvidia.com. Retrieved 2014-03-26.
  40. ^ "DirectX 12 - DirectX Developer Blog - Site Home - MSDN Blogs". Blogs.msdn.com. 2014-03-20. Retrieved 2014-03-26.
  41. ^ Smith, Ryan (6 February 2015). "The DirectX 12 Performance Preview: AMD, NVIDIA, & Star Swarm". AnandTech. Purch.
  42. ^ MSDN - DXGI 1.4 Improvements
  43. ^ tedhudek. "What's new in driver development". docs.microsoft.com. Retrieved 2018-10-08.
  44. ^ "HLSL Shader Model 6.0 - Win32 apps".
  45. ^ "High Dynamic Range and Wide Color Gamut (Windows)". msdn.microsoft.com. Archived from the original on 2016-09-13.
  46. ^ "Variable refresh rate displays - Win32 apps".
  47. ^ "Channel9 has joined Microsoft Learn".
  48. ^ "Driver development additions for Windows 10, version 1709 - Display". docs.microsoft.com. Retrieved 2020-04-14.
  49. ^ "Shader Model 6.1". github.com/microsoft/DirectXShaderCompiler. Retrieved 2017-12-01.
  50. ^ "What's new in Windows 10, version 1803 - Display". docs.microsoft.com. Retrieved 2020-04-28.
  51. ^ "Shader Model 6.2". github.com/microsoft/DirectXShaderCompiler. Retrieved 2017-12-01.
  52. ^ "Features added in prior WDDM 2.X versions - WDDM 2.5". Microsoft Docs. Retrieved 2020-03-28.
  53. ^ "Windows Drivers - What's new in Windows 10, version 1809 - Display". Microsoft Docs. Retrieved 2020-04-28.
  54. ^ "Shader Model 6.3". github.com/microsoft/DirectXShaderCompiler. Retrieved 2019-03-11.
  55. ^ "Getting Started with DirectML". github.com/microsoft/DirectML. 26 November 2021.
  56. ^ "Features added in prior WDDM 2.X versions - WDDM 2.6". docs.microsoft.com. Retrieved 2020-03-24.
  57. ^ "Shader Model 6.4". github.com/microsoft/DirectXShaderCompiler. Retrieved 2019-04-11.
  58. ^ "Dev Preview of New DirectX 12 Features". devblogs.microsoft.com. 28 October 2019. Retrieved 2019-10-28.
  59. ^ "What's new for Windows 10 display and graphics drivers". docs.microsoft.com. Retrieved 2020-05-12.
  60. ^ "HLSL Shader Model 6.5". microsoft.github.io. Retrieved 2019-10-15.
  61. ^ "Hardware Accelerated GPU Scheduling". devblogs.microsoft.com. 30 June 2020. Retrieved 2020-06-30.
  62. ^ "Coming to DirectX 12— Sampler Feedback: some useful once-hidden data, unlocked". devblogs.microsoft.com. 4 November 2019. Retrieved 2019-11-04.
  63. ^ "DirectX-Specs - Sampler Feedback - Feature Support". microsoft.github.io. Retrieved 2019-11-04.
  64. ^ "DirectX Raytracing (DXR) Tier 1.1". devblogs.microsoft.com. 6 November 2019. Retrieved 2019-11-06.
  65. ^ "Coming to DirectX 12— Mesh Shaders and Amplification Shaders: Reinventing the Geometry Pipeline". devblogs.microsoft.com. 8 November 2019. Retrieved 2019-11-08.
  66. ^ "Coming to DirectX 12: More control over memory allocation". devblogs.microsoft.com. 11 November 2019. Retrieved 2019-11-11.
  67. ^ "Coming to DirectX 12: D3D9On12 and D3D11On12 Resource Interop APIs". devblogs.microsoft.com. 13 November 2019. Retrieved 2019-11-13.
  68. ^ "D3D12 Video Protected Resource Support". microsoft.github.io. Retrieved 2019-05-29.
  69. ^ "DirectX ❤ Linux". devblogs.microsoft.com. 19 May 2020. Retrieved 2020-05-19.
  70. ^ "New in DirectX— Feature Level 12_2". 27 August 2020.
  71. ^ "Announcing HLSL Shader Model 6.6". 20 April 2021.
  72. ^ "How to get Windows 11". 4 October 2021.
  73. ^ "Download Windows 11". Microsoft.
  74. ^ "WSL Graphics Architecture". xdc2020.x.org. Retrieved 2020-09-16.
  75. ^ "What's new for Windows 11 display and graphics drivers - Windows drivers".
  76. ^ "Dynamic refresh rate – Get the best of both worlds". 28 June 2021.
  77. ^ "D3D12 video encoding - Windows drivers".
  78. ^ https://blogs.windows.com/windowsexperience/2022/09/20/available-today-the-windows-11-2022-update/
  79. ^ https://www.microsoft.com/software-download/windows11
  80. ^ "HLSL Shader Model 6.7".
  81. ^ lorihollasch. "IOMMU DMA remapping - Windows drivers". docs.microsoft.com. Retrieved 2022-07-24.
  82. ^ https://learn.microsoft.com/en-us/windows-hardware/drivers/display/sharing-backing-store-with-kmd