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.
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:
After stopping the debug, the application was crashing at the Present()
call in DeviceResources.cpp and generating the following error:
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).
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.
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.
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.
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?