Disable GPU timeouts in Direct3D 11/12 #13420
Replies: 2 comments
-
| I'm not sure if this is a good idea. Disabling GPU timeouts means that if you write an infinite loop in a shader while in the editor, nothing will be able to stop Godot unless you end it in Task Manager. I haven't encountered TDRs as of late, but if they're still an issue when baking lightmaps, we should fix it by introducing small amounts of sleep during the lightmap baking process. This way, the driver doesn't think it's an endless loop. This will also be functional on all rendering drivers, not just Direct3D 12. This will also allow adding an editor setting to reduce GPU utilization during the lightmap baking process. | 
Beta Was this translation helpful? Give feedback.
-
| Well then. I thought Direct3D and OpenGL/Vulkan were acting differently and that was the problem (Vulkan seems to have vkWaitForFences() as an equivalent). But timeouts could be a togglable feature in the project settings. | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've read in the docs that Godot suffers from GPU shader timeouts in Windows. I don't know the inner workings of the engine, but to disable the timeouts:
D3D11CreateDevice/AndSwapChain, add theD3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUTflag in the 4th parameter.ID3D12Device::CreateCommandQueue, add theD3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUTflag in the description flags.Hope this helps (That is, if the timeouts are unintended behavior. But the developers likely know DX way better than I do).
Beta Was this translation helpful? Give feedback.
All reactions