locked
Should DWM.exe be running in a mixed Xaml/DirectX application?

    Question

  • I've got a large application I'm developing.  Doing some performance analysis I see that it's GPU bound when rendering some DirectX code.  This is expected, but what's not expected is that dwm.exe is using almost as much gpu power as my application. 

    If you create a blended xaml/dx game does that mean that you're not in 'full-screen exclusive' mode?  Ie that you should expect dwm to be running and to be using a large portion of your gpu? 

    This is for an app using the SwapChainBackgroundPanel measured using gpuview.

    Thursday, June 13, 2013 10:08 AM

Answers

  • In Windows 8, DWM is always active. In Windows Store apps, there is no such thing as "full-screen exclusive" even for pure Direct3D 11.x applications.

    • Marked as answer by Kellen Friday, June 14, 2013 8:18 AM
    Thursday, June 13, 2013 7:38 PM

All replies

  • In Windows 8, DWM is always active. In Windows Store apps, there is no such thing as "full-screen exclusive" even for pure Direct3D 11.x applications.

    • Marked as answer by Kellen Friday, June 14, 2013 8:18 AM
    Thursday, June 13, 2013 7:38 PM
  • Thanks Chuck! 

    Can you confirm that this a change in the RTM version of windows 8?  At Build last year there was a talk that said there was an optimized full screen present for windows store apps, check out the 38:00 minute mark. 

    http://channel9.msdn.com/Events/Build/2012/4-102

     
    Friday, June 14, 2013 8:28 AM
  • There is an optimized full-screen present via DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL

    http://msdn.microsoft.com/en-us/library/windows/desktop/hh706346(v=vs.85).aspx

    This still doesn't turn off DWM.

    Tuesday, June 18, 2013 5:44 PM
  • Hi Kellen,

    While the DWM process is always running in Windows 8, a number of optimizations exist so that it only uses GPU resources when necessary.

    In the case of XAML+DX apps (via SwapChainBackgroundPanel), DWM will only use GPU resources (as shown by DWM DMA packets in GPUView) in two cases:

    - If the backing Swap Chain size is less than the native resolution of the screen, either due to the app being snapped or the swap chain being intentionally low-res.
    - If XAML elements are present on top of the SwapChainBackgroundPanel. In that case, DWM is the process that composes the DX swap chain and the XAML elements for the final display scan-out (resulting in the GPU work).

    If neither of these cases apply to your app, that would be unexpected behavior. For more information here, please see http://msdn.microsoft.com/en-US/library/windows/apps/hh825871 for general best practices around XAML/DX apps.

    Thanks,
    Bennett


    Wednesday, August 07, 2013 11:05 PM