Ryujinx
Ryujinx copied to clipboard
Gpu: Fix thread safety of ReregisterRanges
A quick fix to prevent reading the wrong value of Count when reregistering ranges for a new target buffer. Buffer flushes from another thread can modify the range list when the lock isn't active, which can change the count.
This prevents some crashes in Pokemon Scarlet/Violet and some other games. It's probably likely that buffer migration during flush is causing some other issues in this game, but this at least prevents the crashing.
Download the artifacts for this pull request:
- ryujinx-Release-1.1.0+3696508-linux_x64
- ryujinx-Release-1.1.0+3696508-osx_x64
- ryujinx-Release-1.1.0+3696508-win_x64
Experimental GUI (Avalonia)
GUI-less (SDL2)
Only for Developers
- ava-ryujinx-Debug-1.1.0+3696508-linux_x64
- ava-ryujinx-Debug-1.1.0+3696508-osx_x64
- ava-ryujinx-Debug-1.1.0+3696508-win_x64
- ryujinx-Debug-1.1.0+3696508-linux_x64
- ryujinx-Debug-1.1.0+3696508-osx_x64
- ryujinx-Debug-1.1.0+3696508-win_x64
- sdl2-ryujinx-headless-Debug-1.1.0+3696508-linux_x64
- sdl2-ryujinx-headless-Debug-1.1.0+3696508-osx_x64
- sdl2-ryujinx-headless-Debug-1.1.0+3696508-win_x64