Threading and Synchronization Level Three

Level Three threading and synchronization ensures that:

  • Only a single thread (the calling thread) is within the kernel-mode driver.*
  • The graphics hardware is idle.
  • No direct memory access (DMA) buffers are currently being processed by the driver or passed through the GPU scheduler.
  • The video memory is completely evicted to host CPU memory.

WDDM guarantees that calls such as the following into the display miniport driver are made under the Level Three of threading and synchronization.

* An exception is that DxgkDdiQueryAdapterInfo can be called at the same time as DxgkDdiSetPowerState or DxgkDdiQueryChildRelations. This allows the system to avoid waking up a device from a low power state when DxgkDdiQueryAdapterInfo is called. Drivers need to use the necessary synchronization to return correct information from DxgkDdiQueryAdapterInfo.