DiligentGraphics / DiligentEngine

A modern cross-platform low-level graphics library and rendering framework
http://diligentgraphics.com/diligent-engine/
Apache License 2.0
3.62k stars 331 forks source link

DX11 crash when changing max frame latency #277

Open mctb32 opened 10 months ago

mctb32 commented 10 months ago

I have a crash in every Diligent Sample when runnning the D3D11 backend. The crash happens when trying to change the "max frame latency" option to any value. DX12 does not crash when changing the latency (Vulkan and OGL don't have this option). Release/64 crashes, Debug/64 catches an assertion:

Zrzut ekranu 2023-12-28 164416

Call stack and variables:

Zrzut ekranu 2023-12-28 165118

Environment:

TheMostDiligent commented 10 months ago

Can you try this on Windows 10? There have been quite a few issues reported on Windows 11

mctb32 commented 10 months ago

Can you try this on Windows 10? There have been quite a few issues reported on Windows 11

Yes. Just tested and indeed it's running fine on Win 10. But the Win 10 PC I tested on also had a different GPU (GTX 1070Ti) with a game ready driver (the Win 11 PC is running a studio driver), so OS was not the only difference.

One more thing I noticed - when running on Windows 11, the V-Sync checkbox in both DX11 and DX12 seems to have no effect, the fps is permanently locked to my refresh rate. In Vulkan and OpenGL it works fine. And on Win 10 it works correctly in all 4 backends.

TheMostDiligent commented 10 months ago

the Win 10 PC I tested on also had a different GPU (GTX 1070Ti) with a game ready driver

This is unlikely the driver. Nobody has reported this issue on Win10.

the V-Sync checkbox in both DX11 and DX12 seems to have no effect, the fps is permanently locked to my refresh rate

Yes, somebody else has also reported this problem. There appears to be quite a few issues on Win11, they should be fixed eventually.

mctb32 commented 10 months ago

Thanks. I have some more info about the crash. It happens in the SampleApp::Render() after the max frame latency change. Apparently there is some issue with the swapchain and now it returns a NULL RTV and DSV. The debug output log seems to contain some relevant info:

Zrzut ekranu 2023-12-29 183544