test(vk): a diagnostic build for Skip Upscaler Wait and the late pages (not for merge) #3178

Open
Veix wants to merge 4 commits from Veix/Longshot:diag/late-pages into main
Member

Summary

A diagnostic build, not for merge: it logs who waits for the GPU and why, with Skip Upscaler Wait on and off, and tries one change to the late pages, so that one log from a tester (AMD most of all) answers what #3135 and #2366 do on their card.

Why: Skip Upscaler Wait (#3135) gains a lot on some PCs and nothing on others, and the logs main writes cannot say why. On the RTX 4070 SUPER it was found that most of the pages the renderer treats as "late" (a page the CPU wrote that a GPU write-back is still pending on) are judged late by their whole submission, while the part of it that wrote them is already done; the repairs and waits that follow cost the row part of its gain. Whether that, or something else, is what happens on other cards is what this build is for.

What the build does on its own, with nothing to set:

  • It goes through four states, two windows of 600 gameplay frames each, and starts over:

    1. main (Skip Upscaler Wait off)
    2. Skip Upscaler Wait on, with the late rule
    3. the same, with the reader fix
    4. as 3, with the GPU pass timer on (GPU time by kind; this state's FPS does not count)

    The row is switched inside the renderer; the menu's row is not followed while the states run. The stamp table is emptied at each state's start. A window counts as gameplay when it has 300 or more draws a frame, so menus and loads do not count toward a state.

  • The late rule under test: a captured page is late only while the part that last wrote it back is still running on the GPU (its own part, looked up on the recordings' timeline), not while that part's whole submission is.

  • The reader fix under test: the renderer's own reads of a page that is being repaired no longer wait for the repair when the repair cannot change the bytes read: no word of them is stamped as changed by a pending write-back, or (a page written back whole) its snapshot holds what the repair will copy. For that the stamps and the snapshots are in host memory, in every state.

  • Every 600 presents it writes vk: TEST window ... lines into longshot_log.txt: the state; FPS and the frame trace's columns as means, with the GPU's own time; the frame limiter's outcomes (by the part before the upscale, or the whole frame and why); every wait on a fence or a timeline by its code line, its thread and what it is for; the game's reads of GPU results by how they waited, and how many #2366's rule spared; the late pages (how many, how many the rule spared, waits, the stamp table); the GPU's idle time between recordings and the window's copy; the reader fix's counts; the render thread's present by step, and the overlay's part of it (a menu, the FPS counter, a mod's screen) as building, waiting for the recorder thread and recording.

For testers: pick one upscaler and do not change settings while it runs; run a small loop in one area for four or five minutes (or stand at one spot for three), then send longshot_log.txt. The frame time steps every ten to fifteen seconds while it runs: that is the states changing, not a bug. Please say if the picture shows anything odd (flashes, flicker), and roughly when.

Switches, for whoever wants them: RX_VK_TEST_AUTO=0 no states (the menu's row, the late rule on; RX_VK_TEST_READ_STAMPS=1 adds the reader fix, =0 keeps the stamps in device memory as main); RX_VK_TEST_LATE_BY_PART=0 or 1 pins the late rule; RX_VK_TEST_LATE_DIAG=0 turns the counting off; RX_VK_FRAME_TRACE=0 turns the frame trace off (it is on by default here).

Read first, if at all: the TEST blocks in gpu/vk/vk_memory.cpp and gpu/vk/vk_replay.cpp, and the two wait macros in gpu/vk/vk_work.h. All of it is marked TEST and none of it is meant to stay. Written with AI assistance (Claude); the commit carries a Co-Authored-By: trailer.

Testing

Tested: Windows 11, RTX 4070 SUPER, driver 621.24, NVIDIA DLSS at 67 %, on main 3b3ea2cb3 merged in. The walking Castle Town route (Market, castle, Market) headless and in a window, and some minutes of play at 2560x1440: the four states cycle, every line is written, no fatal error. The counters checked against each other in those logs: the GPU's time in recordings + uploads + idle is the frame's time (12.33 of 12.34 ms, 12.70 of 12.70 ms in a window); the reader fix answers no read in the states where it is off and every read of a page under repair in its own (about 10,000 a state, none falling back to the wait); in its check mode (RX_VK_TEST_READ_STAMPS=2: the wait as before, then the bytes compared) 2,490 reads over the route, none different. A run with the validation layer on, the pass timer switched on and off in it: no message from that.

Still to test:

  • AMD on Windows and Linux, with FSR 3.1 or FSR 4: the loop above, the log (by hand)
  • Any card where Skip Upscaler Wait changes nothing or costs: the same (by hand)

Measurements

Nothing to measure for a merge: this is a diagnostic build. Its own counting costs a little, the same in all four states, so its FPS is for comparing its states with each other only.

Risks

  • Not for merge. The late rule changes which pages are copied again and repaired, and the reader fix what the renderer's own reads of such a page wait for; both have had short play sessions by eye and no run of the memory checker (which judges by submission and would misreport under the rule). The stamps and snapshots are in host memory in every state, main's included.
  • What a tester notices: the frame time stepping as the states change; a larger longshot_log.txt; longshot_frames.csv written beside it.
  • How to turn it off: the switches above; or any other build.
## Summary **A diagnostic build, not for merge: it logs who waits for the GPU and why, with Skip Upscaler Wait on and off, and tries one change to the late pages, so that one log from a tester (AMD most of all) answers what #3135 and #2366 do on their card.** Why: Skip Upscaler Wait (#3135) gains a lot on some PCs and nothing on others, and the logs `main` writes cannot say why. On the RTX 4070 SUPER it was found that most of the pages the renderer treats as "late" (a page the CPU wrote that a GPU write-back is still pending on) are judged late by their whole submission, while the part of it that wrote them is already done; the repairs and waits that follow cost the row part of its gain. Whether that, or something else, is what happens on other cards is what this build is for. What the build does on its own, with nothing to set: - **It goes through four states, two windows of 600 gameplay frames each, and starts over:** 1. `main` (Skip Upscaler Wait off) 2. Skip Upscaler Wait on, with the late rule 3. the same, with the reader fix 4. as 3, with the GPU pass timer on (GPU time by kind; this state's FPS does not count) The row is switched inside the renderer; the menu's row is not followed while the states run. The stamp table is emptied at each state's start. A window counts as gameplay when it has 300 or more draws a frame, so menus and loads do not count toward a state. - **The late rule under test:** a captured page is late only while the part that last wrote it back is still running on the GPU (its own part, looked up on the recordings' timeline), not while that part's whole submission is. - **The reader fix under test:** the renderer's own reads of a page that is being repaired no longer wait for the repair when the repair cannot change the bytes read: no word of them is stamped as changed by a pending write-back, or (a page written back whole) its snapshot holds what the repair will copy. For that the stamps and the snapshots are in host memory, in every state. - **Every 600 presents it writes `vk: TEST window ...` lines into `longshot_log.txt`:** the state; FPS and the frame trace's columns as means, with the GPU's own time; the frame limiter's outcomes (by the part before the upscale, or the whole frame and why); every wait on a fence or a timeline by its code line, its thread and what it is for; the game's reads of GPU results by how they waited, and how many #2366's rule spared; the late pages (how many, how many the rule spared, waits, the stamp table); the GPU's idle time between recordings and the window's copy; the reader fix's counts; the render thread's present by step, and the overlay's part of it (a menu, the FPS counter, a mod's screen) as building, waiting for the recorder thread and recording. **For testers:** pick one upscaler and do not change settings while it runs; run a small loop in one area for four or five minutes (or stand at one spot for three), then send `longshot_log.txt`. **The frame time steps every ten to fifteen seconds while it runs: that is the states changing, not a bug.** Please say if the picture shows anything odd (flashes, flicker), and roughly when. Switches, for whoever wants them: `RX_VK_TEST_AUTO=0` no states (the menu's row, the late rule on; `RX_VK_TEST_READ_STAMPS=1` adds the reader fix, `=0` keeps the stamps in device memory as `main`); `RX_VK_TEST_LATE_BY_PART=0` or `1` pins the late rule; `RX_VK_TEST_LATE_DIAG=0` turns the counting off; `RX_VK_FRAME_TRACE=0` turns the frame trace off (it is on by default here). Read first, if at all: the `TEST` blocks in `gpu/vk/vk_memory.cpp` and `gpu/vk/vk_replay.cpp`, and the two wait macros in `gpu/vk/vk_work.h`. All of it is marked `TEST` and none of it is meant to stay. Written with AI assistance (Claude); the commit carries a `Co-Authored-By:` trailer. ## Testing **Tested:** Windows 11, RTX 4070 SUPER, driver 621.24, NVIDIA DLSS at 67 %, on `main` 3b3ea2cb3 merged in. The walking Castle Town route (Market, castle, Market) headless and in a window, and some minutes of play at 2560x1440: the four states cycle, every line is written, no fatal error. The counters checked against each other in those logs: the GPU's time in recordings + uploads + idle is the frame's time (12.33 of 12.34 ms, 12.70 of 12.70 ms in a window); the reader fix answers no read in the states where it is off and every read of a page under repair in its own (about 10,000 a state, none falling back to the wait); in its check mode (`RX_VK_TEST_READ_STAMPS=2`: the wait as before, then the bytes compared) 2,490 reads over the route, none different. A run with the validation layer on, the pass timer switched on and off in it: no message from that. **Still to test:** - AMD on Windows and Linux, with FSR 3.1 or FSR 4: the loop above, the log (by hand) - Any card where Skip Upscaler Wait changes nothing or costs: the same (by hand) ## Measurements Nothing to measure for a merge: this is a diagnostic build. Its own counting costs a little, the same in all four states, so its FPS is for comparing its states with each other only. ## Risks - **Not for merge.** The late rule changes which pages are copied again and repaired, and the reader fix what the renderer's own reads of such a page wait for; both have had short play sessions by eye and no run of the memory checker (which judges by submission and would misreport under the rule). The stamps and snapshots are in host memory in every state, `main`'s included. - **What a tester notices:** the frame time stepping as the states change; a larger `longshot_log.txt`; `longshot_frames.csv` written beside it. - **How to turn it off:** the switches above; or any other build.
test(vk): a diagnostic build for Skip Upscaler Wait and the late pages (not for merge)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
78cd53a4fa
Counting only, plus one rule under test, all marked TEST:
- every wait on a fence or a timeline by its code line, thread and purpose (the two wait macros in vk_work.h);
- the frame limiter's outcomes, the frame trace's columns as window means, the GPU's own time;
- the game's reads of GPU results by how they waited, and how many the byte-extent rule spared;
- the late pages: how many, who wrote them, the waits, the stamp table;
- the late rule under test: a captured page is late only while the part that last wrote it back is still running;
- four automatic states (Skip Upscaler Wait off/on, the late rule off/on), two windows of 600 gameplay frames each.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 4070 SUPER, driver 621.24, 4K output, NVIDIA DLSS at 67 %: the walking Castle Town route (Market, castle, Market), headless, three runs. The four states cycle, every TEST window line is written, no fatal error.

Tested in game: Windows 11, RTX 4070 SUPER, driver 621.24, 4K output, NVIDIA DLSS at 67 %: the walking Castle Town route (Market, castle, Market), headless, three runs. The four states cycle, every TEST window line is written, no fatal error.
Veix changed title from WIP: test(vk): a diagnostic build for Skip Upscaler Wait and the late pages (not for merge) to test(vk): a diagnostic build for Skip Upscaler Wait and the late pages (not for merge) 2026-12-04 12:33:11 +00:00
BeanBot left a comment

Recommendation: Request changes. The diagnostic adds state-dependent waits to the path it measures, so its comparisons can attribute the diagnostic’s own cost to the renderer. The new switches also lack the required switch-table entries and measured defaults.

The build cycles through combinations of Skip Upscaler Wait and a late-page rule while logging waits and frame statistics. It can help investigate those paths, but it changes gameplay behavior and adds work to the renderer; it is explicitly described as a diagnostic build, not a merge candidate.

Blocking (2): must change before merging.

  1. L1 gpu/vk/vk_memory.cpp:3735: The diagnostic introduces an additional blocking wait in the path whose timing it is intended to compare. (more on the line) Do: Record the existing repair wait without inserting another wait into the gameplay path, or run the extra attribution wait in a separately labeled mode excluded from state comparisons.
  2. L2 gpu/vk/vk_replay.cpp:5783: The new renderer switches have no rows in the required switch table, and the changed frame-trace default contradicts its existing row. (more on the line) Do: Add rows for every new switch and update the frame-trace row, or remove the diagnostic switches and restore the existing default before merge. Choose any shipped defaults using the required measurements.

Should fix (2): not blocking, but worth doing before merging.

  • L3 gpu/vk/vk_memory.cpp:3206: The description omits several switches that change the repair and stamp-table behavior. (more on the line) Do: Document these switches and their defaults, or remove the unrelated experimental controls from this build.
  • L4 gpu/vk/vk_replay.cpp:5883: State duration is counted in qualifying windows, not gameplay frames as described. (more on the line) Do: Count gameplay presents individually and form reports from those frames, or describe and label the mixed-window rule accurately.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 gpu/vk/vk_memory.cpp:2678: The changed late-page rule and renderer timing need coverage on the other systems whose behavior they can change. (more on the line) Do: Run the diagnostic on the affected Tier 1 configurations, checking the picture and logs, and compare frame-time distributions with the base using matched scenes and settings. (@fix does its part first: Remove the experimental late-page rule and automatic state changes if this instrumentation is intended to ship without changing gameplay behavior.)

@fix can do L1, L2, L3, L4 and L5.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven. Three Windows RTX 4070 SUPER runs reportedly produced the diagnostic lines, and a pinned late-rule run reported 0.00–0.01 ms per frame of capture waits versus 0.88 ms for the merged row in the Market. These are not interleaved measurements against the base, and the added diagnostic waits can affect the comparison.

Other systems: The changed capture, replay, wait and frame-trace paths can affect both Windows and Linux, all GPU vendors, the Steam Deck and configurations without an upscaler. The reported run covers Windows and one NVIDIA GPU; AMD, Linux and Steam Deck behavior remain unverified.

Switches: RX_VK_TEST_AUTO defaults on; RX_VK_TEST_LATE_BY_PART defaults to automatic, or on when automatic states are disabled; RX_VK_TEST_LATE_DIAG defaults on. RX_VK_TEST_FIX_READ_PART and RX_VK_TEST_STAMP_LRU default off, RX_VK_TEST_STAMP_IDLE and RX_VK_TEST_STAMP_AHEAD_MIN default to 0. RX_VK_FRAME_TRACE changes from off to on. The new switches lack switch-table rows, and the defaults have not been selected from measurements across supported systems.

Reviewed: 78cd53a4fa against d6e819e084: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, commit and diff; traced changed capture, repair, reporting and present paths and their surrounding code. Skimmed the remaining portions of the large changed renderer files rather than reading all 34,708 lines in full. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance with a Co-Authored-By trailer.
  • The diff contains no committed game-derived files, generated binaries or renderer API version changes.
  • The author reports an in-game Windows NVIDIA run and the CI checks are still running.

Testing: No code or tests were run for this review, as requested. The author reports three diagnostic runs and one earlier short visual play session; the listed CI checks have not finished.

Overlaps and merge order: Not checked; the network is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as Veix took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The diagnostic adds state-dependent waits to the path it measures, so its comparisons can attribute the diagnostic’s own cost to the renderer. The new switches also lack the required switch-table entries and measured defaults. The build cycles through combinations of Skip Upscaler Wait and a late-page rule while logging waits and frame statistics. It can help investigate those paths, but it changes gameplay behavior and adds work to the renderer; it is explicitly described as a diagnostic build, not a merge candidate. **Blocking (2)**: must change before merging. 1. **L1** `gpu/vk/vk_memory.cpp:3735`: The diagnostic introduces an additional blocking wait in the path whose timing it is intended to compare. (more on the line) **Do:** Record the existing repair wait without inserting another wait into the gameplay path, or run the extra attribution wait in a separately labeled mode excluded from state comparisons. 2. **L2** `gpu/vk/vk_replay.cpp:5783`: The new renderer switches have no rows in the required switch table, and the changed frame-trace default contradicts its existing row. (more on the line) **Do:** Add rows for every new switch and update the frame-trace row, or remove the diagnostic switches and restore the existing default before merge. Choose any shipped defaults using the required measurements. **Should fix (2)**: not blocking, but worth doing before merging. - **L3** `gpu/vk/vk_memory.cpp:3206`: The description omits several switches that change the repair and stamp-table behavior. (more on the line) **Do:** Document these switches and their defaults, or remove the unrelated experimental controls from this build. - **L4** `gpu/vk/vk_replay.cpp:5883`: State duration is counted in qualifying windows, not gameplay frames as described. (more on the line) **Do:** Count gameplay presents individually and form reports from those frames, or describe and label the mixed-window rule accurately. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `gpu/vk/vk_memory.cpp:2678`: The changed late-page rule and renderer timing need coverage on the other systems whose behavior they can change. (more on the line) **Do:** Run the diagnostic on the affected Tier 1 configurations, checking the picture and logs, and compare frame-time distributions with the base using matched scenes and settings. *(`@fix` does its part first: Remove the experimental late-page rule and automatic state changes if this instrumentation is intended to ship without changing gameplay behavior.)* `@fix` can do L1, L2, L3, L4 and L5. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. Three Windows RTX 4070 SUPER runs reportedly produced the diagnostic lines, and a pinned late-rule run reported 0.00–0.01 ms per frame of capture waits versus 0.88 ms for the merged row in the Market. These are not interleaved measurements against the base, and the added diagnostic waits can affect the comparison. **Other systems:** The changed capture, replay, wait and frame-trace paths can affect both Windows and Linux, all GPU vendors, the Steam Deck and configurations without an upscaler. The reported run covers Windows and one NVIDIA GPU; AMD, Linux and Steam Deck behavior remain unverified. **Switches:** RX_VK_TEST_AUTO defaults on; RX_VK_TEST_LATE_BY_PART defaults to automatic, or on when automatic states are disabled; RX_VK_TEST_LATE_DIAG defaults on. RX_VK_TEST_FIX_READ_PART and RX_VK_TEST_STAMP_LRU default off, RX_VK_TEST_STAMP_IDLE and RX_VK_TEST_STAMP_AHEAD_MIN default to 0. RX_VK_FRAME_TRACE changes from off to on. The new switches lack switch-table rows, and the defaults have not been selected from measurements across supported systems. **Reviewed:** 78cd53a4fa26 against d6e819e08433: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, commit and diff; traced changed capture, repair, reporting and present paths and their surrounding code. Skimmed the remaining portions of the large changed renderer files rather than reading all 34,708 lines in full. docs/review-checklist.md and ../Tooling/AGENTS.md were unavailable.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance with a Co-Authored-By trailer. - The diff contains no committed game-derived files, generated binaries or renderer API version changes. - The author reports an in-game Windows NVIDIA run and the CI checks are still running. **Testing:** No code or tests were run for this review, as requested. The author reports three diagnostic runs and one earlier short visual play session; the listed CI checks have not finished. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as Veix took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -2553,3 +2675,4 @@
if (!wb_pages.empty())
for (int64_t i = 0; i < n; i++) {
const uint64_t pv = wb_pages.get(pages[i]);
if (pv > done && c->test_done_part) { // TEST latebypart: its part is done, its words are in guest memory
Member

L5 (should fix): The changed late-page rule and renderer timing need coverage on the other systems whose behavior they can change.

When: The reported run exercises one NVIDIA Windows configuration; AMD on Windows and Linux and the Steam Deck can have different write-back, memory and synchronization behavior, so a successful NVIDIA run does not show their output and pacing remain correct.

Do: Run the diagnostic on the affected Tier 1 configurations, checking the picture and logs, and compare frame-time distributions with the base using matched scenes and settings.

**L5** (should fix): The changed late-page rule and renderer timing need coverage on the other systems whose behavior they can change. *When:* The reported run exercises one NVIDIA Windows configuration; AMD on Windows and Linux and the Steam Deck can have different write-back, memory and synchronization behavior, so a successful NVIDIA run does not show their output and pacing remain correct. **Do:** Run the diagnostic on the affected Tier 1 configurations, checking the picture and logs, and compare frame-time distributions with the base using matched scenes and settings.
@ -3065,0 +3203,4 @@
int64_t st_tl_read_part, st_tl_read_whole; // TEST readpart: earlier recordings' fixes read by part / by the whole recording
// TEST lrufix_apply.py RX_VK_TEST_STAMP_LRU: the block needed least recently given back (not one made in this recording)
bool test_stamp_lru_on() {
static const bool on = [] { const char* e = getenv("RX_VK_TEST_STAMP_LRU"); const bool v = e && *e && *e != '0';
Member

L3 (should fix): The description omits several switches that change the repair and stamp-table behavior.

When: A tester with RX_VK_TEST_FIX_READ_PART, RX_VK_TEST_STAMP_LRU, RX_VK_TEST_STAMP_IDLE or RX_VK_TEST_STAMP_AHEAD_MIN already set can run a different experiment from the four states described, without the requested tester instructions identifying those controls.

Do: Document these switches and their defaults, or remove the unrelated experimental controls from this build.

**L3** (should fix): The description omits several switches that change the repair and stamp-table behavior. *When:* A tester with RX_VK_TEST_FIX_READ_PART, RX_VK_TEST_STAMP_LRU, RX_VK_TEST_STAMP_IDLE or RX_VK_TEST_STAMP_AHEAD_MIN already set can run a different experiment from the four states described, without the requested tester instructions identifying those controls. **Do:** Document these switches and their defaults, or remove the unrelated experimental controls from this build.
@ -3383,0 +3732,4 @@
if (!fixed && d.over && !d.wdone && wpart) { // (the writer's part first, timed apart, when the repair comes after it anyway)
const uint64_t fseq = lp.fix_part ? test_part_seq(lp.fix_part) : 0;
if (fseq && wseq && wseq <= fseq) {
const auto t = std::chrono::steady_clock::now();
Member

L1 (blocking): The diagnostic introduces an additional blocking wait in the path whose timing it is intended to compare.

When: When a read encounters an unfinished repair whose writer is still pending, this waits for the writer’s part before the existing repair wait. The frequency of that path depends on the late rule and workload, so its added synchronization and scheduling cost is not the same in all four states and can change the reported frame times.

Do: Record the existing repair wait without inserting another wait into the gameplay path, or run the extra attribution wait in a separately labeled mode excluded from state comparisons.

**L1** (blocking): The diagnostic introduces an additional blocking wait in the path whose timing it is intended to compare. *When:* When a read encounters an unfinished repair whose writer is still pending, this waits for the writer’s part before the existing repair wait. The frequency of that path depends on the late rule and workload, so its added synchronization and scheduling cost is not the same in all four states and can change the reported frame times. **Do:** Record the existing repair wait without inserting another wait into the gameplay path, or run the extra attribution wait in a separately labeled mode excluded from state comparisons.
@ -5699,0 +5780,4 @@
static int64_t presents;
static int64_t test_window_with; // TEST latediag4: the window's presents with the gameplay upscale
static int test_state = -1, test_state_age = 0; // (-1: not begun)
static const bool test_auto = !getenv("RX_VK_TEST_AUTO") || atoi(getenv("RX_VK_TEST_AUTO"));
Member

L2 (blocking): The new renderer switches have no rows in the required switch table, and the changed frame-trace default contradicts its existing row.

When: A build with the default environment enables automatic state changes and frame tracing, while switches.def still documents frame tracing as off and contains no entries for the new TEST switches. Developers and switch-table checks cannot discover the actual defaults.

Do: Add rows for every new switch and update the frame-trace row, or remove the diagnostic switches and restore the existing default before merge. Choose any shipped defaults using the required measurements.

**L2** (blocking): The new renderer switches have no rows in the required switch table, and the changed frame-trace default contradicts its existing row. *When:* A build with the default environment enables automatic state changes and frame tracing, while switches.def still documents frame tracing as off and contains no entries for the new TEST switches. Developers and switch-table checks cannot discover the actual defaults. **Do:** Add rows for every new switch and update the frame-trace row, or remove the diagnostic switches and restore the existing default before merge. Choose any shipped defaults using the required measurements.
@ -5699,0 +5880,4 @@
test_rb_report();
memory_test_window(false);
if (test_auto) { // TEST latediag4: the next state after two windows of play (500 or more presents with the upscale each)
if (test_window_with >= 500) test_state_age++;
Member

L4 (should fix): State duration is counted in qualifying windows, not gameplay frames as described.

When: A window containing 500 gameplay presents and 100 menu or load presents advances the state by a full 600-frame window. Two such windows change state after only 1,000 gameplay frames, and their reported averages include the other 200 presents.

Do: Count gameplay presents individually and form reports from those frames, or describe and label the mixed-window rule accurately.

**L4** (should fix): State duration is counted in qualifying windows, not gameplay frames as described. *When:* A window containing 500 gameplay presents and 100 menu or load presents advances the state by a full 600-frame window. Two such windows change state after only 1,000 gameplay frames, and their reported averages include the other 200 presents. **Do:** Count gameplay presents individually and form reports from those frames, or describe and label the mixed-window rule accurately.
All marked TEST, not for merge:
- the reader fix under test: a CPU read of a page under repair does not wait when the repair cannot change the bytes read
  (no word of them stamped by a pending write-back, or the page's snapshot holds what the repair copies); the stamps and
  the snapshots in host memory for it;
- four automatic states: main, Skip Upscaler Wait with the late rule, the same with the reader fix, and that with the GPU
  pass timer (switched while running); a window is play by its draws a frame;
- per window: the GPU's idle time between recordings and the window's copy by its own timestamps, the replay's memory
  reads and the time to get their lock, the render thread's present by step, the overlay's step in three, the presenter
  thread named in the wait lines.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Merge remote-tracking branch 'origin/main' into diag/late-pages
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
92a2281bea
test(vk): Skip Upscaler Wait finds the upscale on GPUs whose upscale network does not translate
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
2b89064bda
On a GPU without cooperative matrices (RDNA 2 and older) the game's upscale network is left out and
upscale_stub draws the scene into the picture with the temporal upscaler or FSR 3.1. That path returned
before dispatch() noted the upscale's program, so the part before the upscale was never cut and the frame
limiter waited for the whole frame on every frame ("no upscale"): an RX 6800 XT's log, 0 of 10,796 frames
by the part. The stub's scene upscale is now noted as the dispatch's own is, and the diagnostic's
"frame with an upscale" mark with it. Checked here with RX_VK_FORCE_UPSCALE_STUB=2 (4K DLSS 67 %, the
walking route): 561-598 of 600 play frames by the part, 0-1 "no upscale".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
This pull request has changes conflicting with the target branch.
  • gpu/vk/settings/options.h
  • gpu/vk/vk_draw.cpp
  • gpu/vk/vk_memory.cpp
  • gpu/vk/vk_menu.cpp
  • gpu/vk/vk_replay.cpp
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'diag/late-pages:Veix-diag/late-pages'
git switch 'Veix-diag/late-pages'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3178
No description provided.