mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 13:39:58 -04:00
Let the device address table read a new VRAM mirror only once the mirror's first copy has run.
A mirror is made while a submission is recorded, and its first copy of the pool is in that submission's prologue. The table's pages moved to the mirror at once, and the table is memory the shaders read as they run: every part already handed to the queue read the mirror through it before the copy had run, memory nothing had written yet and, on a card over its budget, a block the driver had not made resident for those parts. A GTX 1650 4 GB lost its device that way at area loads in every session of 0.7.1 (#507): six reports of a GPU read fault at byte 0 of a mirror made in the faulting submission, each the first byte of a new 2 MiB-aligned block, with mirrors being made over the budget, and none with the table kept empty. The mirror code is the same in 0.9.2. Now the pages keep reading the imported buffer and take the mirror as their twin, so what shaders write through the table goes to both and what they read is guest memory, as before the mirror existed. Once the GPU has finished the submission that holds the copy, the pages move to the mirror with the imported buffer as the twin. gpa_late = 0 moves them at once, as before. tests/gpa_check.py covers the new table step; the mirror side was compiled and run through --probe-vkmem, not played. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -976,3 +976,8 @@
|
||||
# those second writes cost about 3 ms of GPU time a frame. 0 (default): every mirror sends them. A pool that needs them
|
||||
# and is left without shows as foliage stretched into columns or flickering.
|
||||
# gpa_twin_max_kb = 0
|
||||
# 1 (default): shaders that follow the game's pointers read a memory pool's new copy in video memory only once that
|
||||
# copy has been filled; until then they read the game's own memory. 0: they read the new copy at once, as up to 0.9.2,
|
||||
# where a card over its video memory budget could lose the device at an area load (a GPU read fault at the first byte
|
||||
# of the new copy).
|
||||
# gpa_late = 1
|
||||
|
||||
Reference in New Issue
Block a user