Repository navigation
fix(dx8): Unbind device resources before Reset - #634
Open
tintinhamans wants to merge 1 commit into
Open
tintinhamans wants to merge 1 commit into
tintinhamans wants to merge 1 commit into
Conversation
tintinhamans
force-pushed
the
arctic/go/fix/reset-device-after-failed-reset
branch
3 times, most recently
from
October 9, 2026 12:56
9f36faf to
d4ed1dd
Compare
tintinhamans
force-pushed
the
arctic/go/fix/reset-device-after-failed-reset
branch
from
October 16, 2026 23:52
d4ed1dd to
a9be7f5
Compare
tintinhamans
force-pushed
the
arctic/go/fix/reset-device-after-failed-reset
branch
4 times, most recently
from
October 17, 2026 22:34
2c74903 to
3a049b4
Compare
tintinhamans
force-pushed
the
arctic/go/fix/reset-device-after-failed-reset
branch
from
October 18, 2026 00:05
3a049b4 to
89e98b5
Compare
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.
DX8Wrapper::Reset_Devicecan crash inside the driver (DestroyResourceduringReset) when the device still holds a bound vertex buffer, index buffer, texture or render target.Set_Vertex_Buffer/Set_Index_Bufferare deferred and only drop the wrapper's references, so the device keeps its bindings intoReset, which D3D8 forbids.This replaces the unbind in
Reset_Device, which ran beforeTestCooperativeLeveland so also touched a lost device, with a newUnbind_Device_Buffersthat only runs once the device can be reset. BeforeReset()it also invalidates the cached render states and resets the render target, and a failedReset()no longer asserts in debug.Release_Deviceuses the same helper.Until a
Reset()succeeds the device is not touched, because it crashes inSetStreamSourceafter a failedReset()even whenTestCooperativeLevelreports it as resettable (CLIENT-55X). Everything else is still released on every attempt, so the device recovers once the blocking resource is gone.Reproduced and verified on the upstream retail build on two GPUs. Binding a custom render target and forcing a device loss made
Resetfail on every frame forever (2000+ failures, an endless reset storm) on both an Intel UHD 770 (igd9trinity32.dll) and an NVIDIA RTX 4070 Ti. With this change both reset cleanly and the game continues. AReset()that keeps failing, with new default pool textures created between attempts, recovers after the blocking resource is released. In the field this maps to theDestroyResourcecrash group (CLIENT-55Y and related); the release that had only the render-target release still hit it ~17% of the time.Same change as TheSuperHackers#3450.