hexops / mach

zig game engine & graphics toolkit
https://machengine.org
Other
3.37k stars 160 forks source link

core: win32 backend requires vsync=.triple or it will stall on 2048th' frame, unsure why #1259

Open slimsag opened 2 months ago

slimsag commented 2 months ago

Needs debugging.

https://github.com/hexops/mach/pull/1258/files#diff-c03659dc4af60ec5392d6014dce3314fd1eb5f68181c212366ec53a20ba4a82eR133

the final problem ,which I have not figured out what is causing is that d3d12 fails with an error when presenting frame 2048. There must be something that is not being released somewhere, it is always on frame 2048.

hordurj commented 2 months ago

This is still happening on my machine but less frequently. Saw it happen after 4096 and 8192 frames and 6x2048 frames. I have been able to get the error in my own program I am working on and once the "hardware check" example. I will investigate further.

The windows debug output is [29572] D3D12 ERROR: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]

RonaldZielaznicki commented 2 weeks ago

@slimsag @hordurj Are y'all still able to replicate this error after https://github.com/hexops/mach/pull/1289?