DARNER_RELAY 1 and 2: models stretch and glitch; gone with the relay off; bisected to stage 3's present (no settle at the title's Present) #575

Open
opened 2026-12-05 14:40:30 +00:00 by indy21 · 2 comments

What looks wrong

With the relay on (DARNER_RELAY=1 or 2, late stage 3, which frame generation needs), parts of characters and some other models are pulled out of shape (stretched). It flickers: from one frame to the next the model switches between its normal shape and the stretched one. It looks like the vertex positions are wrong in some frames (I can't tell whether it really is the vertices). The models do not flicker in general, only the stretching does. At the default settings it happens all the time. With DARNER_RELAY=0 it never happens (same settings, same places). It looks the same at DARNER_RELAY=1 and 2. No single spot triggers it.

I bisected it with about 28 runs on my build. What I saw is in the tables. What I think it means is under "My guess" and is not confirmed.

Related, possibly the same problem: #488 (characters intermittently flicker black; the reporter says DARNER_RELAY=0 causes no issues). What I see is similar (parts of characters go wrong, flickering between normal and wrong), but I can't tell whether it is the same thing, so I'm not posting this there. #310 (DARNER_LAND_LEAVE) touches the same landing code. I found no issue or pull request about the relay glitch itself (searched open and closed issues and pull requests for relay, stretch, triangle, late wait).

What I saw (each run: me playing a few minutes, same save, then saying whether the glitch is there)

Runs with the relay on, one switch changed from the default:

Change Glitch
none (relay 2) there, all the time
DARNER_RELAY_COPY=0 (no copy queue) there
DARNER_CARD_STEPS=0 there (maybe rarer, worse when it happens)
DARNER_WC_NO_BACK=0 there
DARNER_THIN=0 (no line of submissions) there
DARNER_PICKED_WRITES=1 / =2 there / much worse
DARNER_PICKED_WRITES=1 with a bigger limit there
shader-picked buffers marked as left on the card (local switch) there
three of the safety switches together there
DARNER_GPU_OWNED=1 with relay 2 there (the log shows the trap never fired)
value writes put into title memory at submit time, not at landing (local switch) there

Runs where the glitch is gone:

Change Glitch Cost
DARNER_LATE_WAIT=1 or =2 gone frame generation turns off
the title's Present settles every flight at stage 3, with the line off (local switch) gone slower
the same with the line on, frame generation on gone felt slower
DARNER_LATE_WAIT_WRITES=0 (every submission with a bottom-of-pipe write settles at once) gone about 20 settles a frame, bad fps
settle only after submissions whose bottom-of-pipe write is a plain value (local switch) gone about 16 settles a frame, about 55 ms a frame waiting
settle only after submissions that write the six marker addresses described below gone about 7 settles a frame, about 46 ms a frame waiting

And one that moves it:

Change Glitch
settle only after submissions that write the three low halves of the markers (about one a frame) there, in other places on the models, more often, fps about normal

What is going on at those writes (logs, local counters)

The bottom-of-pipe writes are 92 % plain Value writes and 8 % GPU timestamps. The values are the title's own WriteValueImmediate calls. They are held and written into title memory by the CPU when the flight lands (list.rs defer_write, host.rs Late::Write). Most go to three 64-bit slots near one address (0x998700000 +0x08/0x0c, +0x50/0x54, +0x98/0x9c): the low word is a frame number that rotates over three slots, the high word is a tag written about 14 times as often, and the title clears them. About 300 more slots, around 0x90417fe00 to 0x90417ff00, get frame stamps.

My guess (not confirmed)

  • Not the cause (each tested above): the copy queue, the card's steps, WC_NO_BACK, the line of submissions, shader-picked buffers, the timing of the value writes themselves, GPU timestamps, held cross-queue waits (one host queue, no forced-wait warnings in the logs).
  • Stage 3 sends the present ahead and settles nothing at the title's Present. A later submission, or the title's own CPU, probably reads data a flight has computed but not landed yet, and which data differs from place to place: settling after any subset of the submissions closes some of the glitches and moves the rest.
  • I could not find which data is read too early or by what. A detector for "a read of memory a flight may still write, logging the reading code" is what is missing. DARNER_UPCOPY_CHECK finds undeclared overwrites, but they happen with the glitch gone too.
  • Stage 2 (LATE_WAIT=2) is a workaround that removes it at the price of frame generation.

What would help: where do you think the relay misses a read (or a write) at stage 3 that stage 2's settle around release_held at the Present covers? The one difference in the Present path between the stages is queue.rs (the late() and late_free_present() branches near the Present).

Latest main (fetched 2026-12-05, 351 commits ahead of f3840d73): I compared the relay, the Present path in queue.rs and the landing code in host.rs. The only change in queue.rs is the new frame argument of render_submit_begin (#283); nothing there or in the relay's code touches the logic this issue is about. I have not run the game on that newer main, so I can't say the glitch is still there on it. The tracking issue #541 does not cover this either.

Before you post (form checkboxes)

I read the pinned thread (#499); the relay glitch is not among its known issues (the nearest is trees flickering for a single frame, which is a different thing).

RAY TRACING in F1

Off (my settings file also has hardware RT via DARNER_RT_HARDWARE=0 for this test).

GPU and driver

RTX 3060 12 GB, NVIDIA driver 621.47

CPU, RAM and Windows version

Intel Core i5-12400F, 16 GB RAM, Windows 11 Home 10.0.26200

Darner release or commit

f3840d73 (main) with local diagnostic switches on top (none of them is in this issue's fix; they only log or settle). The relay settings were forced by launch switches, as the settings file had DARNER_RELAY=0.

Settings

Series S 720p, DLSS Quality, frame generation 2x, texture quality half, ray tracing off, ambient 0.8, fullscreen. Relay set with DARNER_RELAY=2 (default stage 3) unless a row says otherwise.

Log files attached

One log of a run with DARNER_RELAY=2 and the glitch (run 28, gzipped, paths and user name removed): darner-run-relay2-glitch.log.gz.

Are you working on a fix?

No. I can run any build or switch you want and report.

### What looks wrong With the relay on (`DARNER_RELAY=1` or `2`, late stage 3, which frame generation needs), parts of characters and some other models are pulled out of shape (stretched). It flickers: from one frame to the next the model switches between its normal shape and the stretched one. It looks like the vertex positions are wrong in some frames (I can't tell whether it really is the vertices). The models do not flicker in general, only the stretching does. At the default settings it happens all the time. With `DARNER_RELAY=0` it never happens (same settings, same places). It looks the same at `DARNER_RELAY=1` and `2`. No single spot triggers it. I bisected it with about 28 runs on my build. What I saw is in the tables. What I think it means is under "My guess" and is not confirmed. Related, possibly the same problem: #488 (characters intermittently flicker black; the reporter says `DARNER_RELAY=0` causes no issues). What I see is similar (parts of characters go wrong, flickering between normal and wrong), but I can't tell whether it is the same thing, so I'm not posting this there. #310 (`DARNER_LAND_LEAVE`) touches the same landing code. I found no issue or pull request about the relay glitch itself (searched open and closed issues and pull requests for relay, stretch, triangle, late wait). ### What I saw (each run: me playing a few minutes, same save, then saying whether the glitch is there) Runs with the relay on, one switch changed from the default: | Change | Glitch | |---|---| | none (relay 2) | there, all the time | | `DARNER_RELAY_COPY=0` (no copy queue) | there | | `DARNER_CARD_STEPS=0` | there (maybe rarer, worse when it happens) | | `DARNER_WC_NO_BACK=0` | there | | `DARNER_THIN=0` (no line of submissions) | there | | `DARNER_PICKED_WRITES=1` / `=2` | there / much worse | | `DARNER_PICKED_WRITES=1` with a bigger limit | there | | shader-picked buffers marked as left on the card (local switch) | there | | three of the safety switches together | there | | `DARNER_GPU_OWNED=1` with relay 2 | there (the log shows the trap never fired) | | value writes put into title memory at submit time, not at landing (local switch) | there | Runs where the glitch is gone: | Change | Glitch | Cost | |---|---|---| | `DARNER_LATE_WAIT=1` or `=2` | gone | frame generation turns off | | the title's Present settles every flight at stage 3, with the line off (local switch) | gone | slower | | the same with the line on, frame generation on | gone | felt slower | | `DARNER_LATE_WAIT_WRITES=0` (every submission with a bottom-of-pipe write settles at once) | gone | about 20 settles a frame, bad fps | | settle only after submissions whose bottom-of-pipe write is a plain value (local switch) | gone | about 16 settles a frame, about 55 ms a frame waiting | | settle only after submissions that write the six marker addresses described below | gone | about 7 settles a frame, about 46 ms a frame waiting | And one that moves it: | Change | Glitch | |---|---| | settle only after submissions that write the three low halves of the markers (about one a frame) | there, in other places on the models, more often, fps about normal | ### What is going on at those writes (logs, local counters) The bottom-of-pipe writes are 92 % plain `Value` writes and 8 % GPU timestamps. The values are the title's own `WriteValueImmediate` calls. They are held and written into title memory by the CPU when the flight lands (`list.rs` `defer_write`, `host.rs` `Late::Write`). Most go to three 64-bit slots near one address (`0x998700000` +0x08/0x0c, +0x50/0x54, +0x98/0x9c): the low word is a frame number that rotates over three slots, the high word is a tag written about 14 times as often, and the title clears them. About 300 more slots, around `0x90417fe00` to `0x90417ff00`, get frame stamps. ### My guess (not confirmed) - Not the cause (each tested above): the copy queue, the card's steps, `WC_NO_BACK`, the line of submissions, shader-picked buffers, the timing of the value writes themselves, GPU timestamps, held cross-queue waits (one host queue, no forced-wait warnings in the logs). - Stage 3 sends the present ahead and settles nothing at the title's Present. A later submission, or the title's own CPU, probably reads data a flight has computed but not landed yet, and which data differs from place to place: settling after any subset of the submissions closes some of the glitches and moves the rest. - I could not find which data is read too early or by what. A detector for "a read of memory a flight may still write, logging the reading code" is what is missing. `DARNER_UPCOPY_CHECK` finds undeclared overwrites, but they happen with the glitch gone too. - Stage 2 (`LATE_WAIT=2`) is a workaround that removes it at the price of frame generation. What would help: where do you think the relay misses a read (or a write) at stage 3 that stage 2's settle around `release_held` at the Present covers? The one difference in the Present path between the stages is `queue.rs` (the `late()` and `late_free_present()` branches near the Present). Latest `main` (fetched 2026-12-05, 351 commits ahead of `f3840d73`): I compared the relay, the Present path in `queue.rs` and the landing code in `host.rs`. The only change in `queue.rs` is the new frame argument of `render_submit_begin` (#283); nothing there or in the relay's code touches the logic this issue is about. I have not run the game on that newer `main`, so I can't say the glitch is still there on it. The tracking issue #541 does not cover this either. ### Before you post (form checkboxes) I read the pinned thread (#499); the relay glitch is not among its known issues (the nearest is trees flickering for a single frame, which is a different thing). ### RAY TRACING in F1 Off (my settings file also has hardware RT via `DARNER_RT_HARDWARE=0` for this test). ### GPU and driver RTX 3060 12 GB, NVIDIA driver 621.47 ### CPU, RAM and Windows version Intel Core i5-12400F, 16 GB RAM, Windows 11 Home 10.0.26200 ### Darner release or commit `f3840d73` (main) with local diagnostic switches on top (none of them is in this issue's fix; they only log or settle). The relay settings were forced by launch switches, as the settings file had `DARNER_RELAY=0`. ### Settings Series S 720p, DLSS Quality, frame generation 2x, texture quality half, ray tracing off, ambient 0.8, fullscreen. Relay set with `DARNER_RELAY=2` (default stage 3) unless a row says otherwise. ### Log files attached One log of a run with `DARNER_RELAY=2` and the glitch (run 28, gzipped, paths and user name removed): `darner-run-relay2-glitch.log.gz`. ### Are you working on a fix? No. I can run any build or switch you want and report.
Contributor

I checked the Present paths on c8258f9. With the submission line on, the title waits on its outstanding Present jobs. The relay separately publishes completed flights and their deferred writes. This gives us a smaller A/B while keeping late stage 3 and frame generation enabled. Present queue

If the stretching still reproduces on this main, could you try fresh launches with DARNER_SUBMIT_FRAMES=1 and 0, keeping the same save, relay 2, FG 2x and an active submission line? At 0, the current Present job is sent before the title returns. The relay still lands flights in its usual order. This would tell us whether removing the Present lead is sufficient on that setup.

If you have a diagnostics build, a few frame chain: lines for both arms would help separate the wait to send Present from the card completion and the CPU publication. Frame-chain fields

I checked the Present paths on `c8258f9`. With the submission line on, the title waits on its outstanding Present jobs. The relay separately publishes completed flights and their deferred writes. This gives us a smaller A/B while keeping late stage 3 and frame generation enabled. [Present queue](https://git.gtahub.st/TrustNo1/Darner/src/commit/c8258f95569c10fe75b5bfb785d3865b5deeefd9/crates/darner-gpu/src/queue/behind.rs#L1175) If the stretching still reproduces on this main, could you try fresh launches with `DARNER_SUBMIT_FRAMES=1` and `0`, keeping the same save, relay 2, FG 2x and an active submission line? At 0, the current Present job is sent before the title returns. The relay still lands flights in its usual order. This would tell us whether removing the Present lead is sufficient on that setup. If you have a diagnostics build, a few `frame chain:` lines for both arms would help separate the wait to send Present from the card completion and the CPU publication. [Frame-chain fields](https://git.gtahub.st/TrustNo1/Darner/src/commit/c8258f95569c10fe75b5bfb785d3865b5deeefd9/crates/darner-gpu/src/chain.rs#L15)
TrustNo1 changed title from [bug][rendering][frame-generation][NVIDIA] DARNER_RELAY 1 and 2: models stretch and glitch; gone with the relay off; bisected to stage 3's present (no settle at the title's Present) to DARNER_RELAY 1 and 2: models stretch and glitch; gone with the relay off; bisected to stage 3's present (no settle at the title's Present) 2026-12-06 03:19:01 +00:00
Owner

assigned to @Jesper-A

assigned to @Jesper-A
Sign in to join this conversation.
No milestone
No project
No assignees
3 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
TrustNo1/Darner#575
No description provided.