Repository navigation
GPU: do not wait for title-memory remaps when refreshing textures by default - #393
Closed
relativespace2K wants to merge 1 commit into
Closed
relativespace2K wants to merge 1 commit into
relativespace2K wants to merge 1 commit into
Conversation
The refresh asks for the mapping lock without waiting; if the runtime is remapping, it reads through the kernel (or retries a frame later). On an RX 6800 XT the wait was 3.1-4.5 s of a 4.4-5.6 s frame in the opening cutscene, and 1.2-1.5 s without it; in the prologue, 0.0 ms of waits and 695 ms/frame against 725-807 ms with VICTORY_TEXTURE_NO_WAIT=0. VICTORY_TEXTURE_NO_WAIT=0 restores the wait. Refs fxceless#178.
Author
|
Superseded by #175, which fixes the root cause by scoping the mapping lock to the affected ranges and keeping the in-place texture read. I validated #175 on an RX 6800 XT (Windows 11, native D3D12): mapping wait median 0.0 ms and max 35.5 ms over 107 windows, against a 7,886.5 ms worst window before; prologue at 1.2-1.5 fps with no device loss. Details in #175. Closing this in favor of #175. |
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.
What
VICTORY_TEXTURE_NO_WAITis now on by default: a texture refresh asks for the title-memory mapping lock without waiting. If the runtime is remapping, it reads through the kernel instead (or leaves the texture for its next refresh, a frame later); it never reads a partly mapped texture.VICTORY_TEXTURE_NO_WAIT=0restores the old waiting behaviour.This follows the proposal in #178 (RX 7900 XT, RADV) with a second AMD data point on native Windows D3D12.
Measurements
Machine: RX 6800 XT 16 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600, 32 GB, Windows 11 26100, Series X profile, diagnostics build, 1920x1080.
Opening cutscene, same phase, warm shader cache:
VICTORY_TEXTURE_NO_WAIT=1The texture line names the wait as the whole cost:
texture refreshes per frame ... 0.0 ms waiting for title memory to hold stillwith the switch, against seconds without it.Prologue (same checkpoint, 180 s runs):
VICTORY_TEXTURE_NO_WAIT=0The large win is while the world is streaming in; once the prologue settles the wait is small, so the default does not change the steady state much there. The run reached the prologue with ~5,000 draws/frame, ~17 GB working set and no device loss.
Checks
cargo test --workspace --locked -- --test-threads=1: 497 passed, 0 failed, 7 ignored.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.cargo xtask policy: 169 files ok.texture::title_memory_tests::texture_refreshes_do_not_wait_unless_asked_tocovers the unset/1/0parsing.No game files, shaders or captures are included; the runs were on the reporter's own copy.
AI-assisted: the patch and the runs above were made with an AI agent on my machine; I reviewed the result and the logs.
Refs #178.