Fix: frame freezing on Windows (#2931)#3212
Conversation
The-personified-devil
left a comment
There was a problem hiding this comment.
@zmerp What's your take on this? Doesn't look like a good solution to me but if it works it works, maybe?
|
I mean to be fair the comment above the change was a todo. But I've been using it for about 3 months now without any new issues, and the frame freezing went away. Also I've tried changing stuff more deeply related to vsync and stuff, but it either didn't work or made it worse. |
|
The only reason I think this would fix freezing is if SteamVR started consistently taking more than 10ms to unlock the texture. I guess this happens when for some reason SteamVR always uses the same texture instead of cycling them in the swapchains (there might be some other issues with frame indices handling like Vixea previously reported). I think this PR should work, but I would like to see tested also a timeout of 50ms. 50ms is definitely above any normal frametime (even at 30fps), and it's smaller enough that it will not cause any unnecessary waiting during shutdown. if that doesn't work let's try 100ms. @awa-vr |
|
I don't have a ton of time to test stuff now so it might take a bit of time to test different timeouts. |
|
That's alright. Unfortunately I can't reproduce this issue myself |
|
@awa-vr I have a patch on my fork called windows-fix it's what zmerp is talking about if you have time to check it out it would be amazing for you to do |
|
Hi sorry for the late reply I got a bit busy in the last few weeks. I'll try to test it this weekend. |
|
Thanks. Make sure to rebase the PR first |
|
@Vixea that change did not fix the issue. |
|
Alright then just change it to be 50 ms like zmerp requested and I'll let them merge it |
|
Hmm doing calculations maybe 100 would be better knowing a 1050ti which still has about 2.5% of the share of steam pc would hit around 15 FPS in heavy VR scenarios |
|
If no more testing can be done I think 100ms is a good compromise. More could slow down the shutdown process |
Fixes issue #2931 for Windows users.
This also fixes the issue for v20.14.1 (see this branch), so maybe a v20.14.2 to fix this issue before v21 comes out could be nice.