title: DirectX 12 application is crashing in Windows 11
body: <p>I'm quite a ways into a DirectX 12 desktop x64 application built upon several of the DirectX Tool Kit examples, but now also supports custom shaders for directional and omnidirectional shadows, dynamic reflections, a hardware-instanced particle effect system, FBX model skeletal animation, and depth of field post-processing.</p>
  <p>On Halloween, Windows Update upgraded my system (Intel Core i7[8th Gen]/GeForce GTX1050) to Windows 11. When I ran my project, I received a spooky surprise in the form of the following 'Source Not Available' window:</p>
  <p><a href="https://i.stack.imgur.com/VDzuX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VDzuX.png" alt="enter image description here" /></a></p>
  <p>After stopping the debug, the application was crashing at the <code>Present()</code> call in <em>DeviceResources.cpp</em> and generating the following error:</p>
  <pre><code>D3D12 ERROR: ID3D12CommandQueue::Present: Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (promoted from COMMON state) of resource (0x0000011BD5330080:'Render target 0') (subresource: 0) must be in COMMON state when transitioning to use in a different Command List type, because resource state on previous Command List type : D3D12_COMMAND_LIST_TYPE_COPY, is actually incompatible and different from that on the next Command List type : D3D12_COMMAND_LIST_TYPE_DIRECT. [ RESOURCE_MANIPULATION ERROR #990: RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE]
  D3D12: **BREAK** enabled for the previous message, which was: [ ERROR RESOURCE_MANIPULATION #990: RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE ]
  Exception thrown at 0x00007FFA0F6A466C (KernelBase.dll) in DXTK12 Game.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000014297FC640, 0x00000014297FE420).
  Unhandled exception at 0x00007FFA0F6A466C (KernelBase.dll) in DXTK12 Game.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000014297FC640, 0x00000014297FE420).
  </code></pre>
  <p>This never occurred in Windows 10 and what's more, this crash is unstable. My game is configured to start in borderless fullscreen mode, and can sometimes run for a few seconds before crashing. If I have time to Alt+Enter to windowed mode, the app will still crash.</p>
  <p>I've updated my Nvidia driver and have pointed the project to the latest Windows 11 SDK version (10.0.22000.0) but the problem persists.</p>
  <p>After some googling, there's evidence to suggest there's a known issue concerning erratic DXGI/WDM behaviour on Windows 11 that's been reported by users running games in emulated fullscreen (i.e. borderless windowed) mode. I was also experiencing faulty Alt+Tab window switching behaviour following a crash, but this seems to have been fixed by the graphics driver update.</p>
  <p>Have any other developers been experiencing stability and/or performance issues with DirectX 12 on Windows 11? Or should I just sit tight and wait for future Windows updates to stabilise the new OS?</p>