When the renderer fails, try to fall back to D2D + WARP#19636
Merged
Conversation
This commit also ups the number of render failures that are permissible to 5, and moves us to use an exponential backoff rather than a simple geometric one. It also suppresses the dialog box in case of present failures. I feel like the warning dialog should be used for something that the user can actually do something about...
DHowett
commented
Dec 9, 2025
lhecker
approved these changes
Dec 9, 2025
lhecker
reviewed
Dec 9, 2025
src/renderer/base/renderer.cpp
Outdated
| auto tries = maxRetriesForRenderEngine; | ||
| while (tries > 0) | ||
| HRESULT hr{ S_FALSE }; | ||
| for (auto attempt = 0; attempt < maxRetriesForRenderEngine; ++attempt) |
Member
There was a problem hiding this comment.
This probably complains in x86 because attempt is int and maxRetriesForRenderEngine is unsigned int.
src/renderer/base/renderer.cpp
Outdated
| if (attempt > 0) [[unlikely]] | ||
| { | ||
| // Add a bit of backoff. | ||
| // Sleep 100, 200, 400, 600, 800ms before failing out and disabling the renderer. |
Member
There was a problem hiding this comment.
This should be 100, 200, 400, 800, 1600, no? That's 3.1s which seems fine to me (re: your other question).
Member
Author
There was a problem hiding this comment.
well, so, no. after the fifth failure we don't retry agian. it's actually max TRIES, not max RETRIES. We can change that to be retries though
Member
There was a problem hiding this comment.
1.5s also seems fine to me. It probably doesn't matter too much. I think "max tries" may be better than retries... 🤔
Member
Author
|
I added some tracepoints to the rewritten render loop, |
lhecker
approved these changes
Dec 9, 2025
DHowett
added a commit
that referenced
this pull request
Dec 9, 2025
#19636) This commit also ups the number of render failures that are permissible to 6 (one try plus 5 retries), and moves us to use an exponential backoff rather than a simple geometric one. It also suppresses the dialog box in case of present failures for Stable users. I feel like the warning dialog should be used for something that the user can actually do something about... Closes #15601 Closes #18198 (cherry picked from commit 45c5370) Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgiXh2E Service-Version: 1.24
DHowett
added a commit
that referenced
this pull request
Dec 17, 2025
#19636) This commit also ups the number of render failures that are permissible to 6 (one try plus 5 retries), and moves us to use an exponential backoff rather than a simple geometric one. It also suppresses the dialog box in case of present failures for Stable users. I feel like the warning dialog should be used for something that the user can actually do something about... Closes #15601 Closes #18198 (cherry picked from commit 45c5370) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgiXh2I Service-Version: 1.23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit also ups the number of render failures that are permissible to 6 (one try plus 5 retries), and moves us to use an exponential backoff rather than a simple geometric one.
It also suppresses the dialog box in case of present failures for Stable users. I feel like the warning dialog should be used for something that the user can actually do something about...
Closes #15601
Closes #18198