FlipModelD3D12
FlipModelD3D12 copied to clipboard
Device removal on SetStablePowerState even with developer mode enabled
(I've solved this issue, but it was annoying to investigate and the workaround is hiding on the DirectX Discord so I'm submitting this to help anyone else who runs into this.)
The sample crashes when enabling stable power state:
D3D12: Removing Device. D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_INVALID_CALL: There is strong evidence that the application has performed an illegal or undefined operation, and such a condition could not be returned to the application cleanly through a return code). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT] D3D12: **BREAK** enabled for the previous message, which was: [ ERROR EXECUTION #232: DEVICE_REMOVAL_PROCESS_AT_FAULT ]
If you disable breaking on errors, you get this additional message:
D3D12: SetStablePowerState is only available when developer mode is enabled.
However, you will get this error even if developer mode is enabled.
This is due to a bug in a recent Windows update, and Microsoft is aware of the issue. The workaround is to call D3D12EnableExperimentalFeatures
before device creation. So in the context of this sample, add the following to sample_dx12.cpp:355:
D3D12EnableExperimentalFeatures(0, nullptr, nullptr, nullptr);