Water surface drawn in screen-space rectangles, angle-dependent (RX 9070 XT) #73
Labels
No labels
accessibility
bench-bm-v1
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/PastiiJay--klbf-lab#73
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@PastiiJay on GitHub · 2026-11-26 11:45 UTC · original
On our AMD test machine (RX 9070 XT 16 GB, Ryzen 7 9800X3D, Windows), the sea is only drawn in some rectangular screen tiles. Which tiles show water depends on camera angle and position: from some angles it is always there, from others never, and in between it flickers. A lone water rectangle can show over sand, and one tile once landed on the player character's chest.
What we already ruled out (no change):
VICTORY_TEXTURE_BACKoff,VICTORY_PORT_CONSTANTSoff,VICTORY_CUT_WRITES=1, mesh vertex indices masked to 9 bits (Marvisak c0228d9).What changes it:
VICTORY_DEPTH_TWINS=0(more rectangles),VICTORY_INDIRECT_RAW=1(regular fast flicker, independent of the camera), and waiting for all earlier writes before clamping indirect records (frame-to-frame flicker gone, angle dependence stays).Our guess: the water pass builds a tile list or indirect arguments on the GPU, and something between that pass and the indirect draw is wrong on our side. Any idea on where to look, or a small test that isolates it, is very welcome.
If you run an RX 9000-series card and the water looks right for you, which build and settings do you use? That alone would narrow it down a lot.
@HandshakeHackin on GitHub · 2026-11-26 11:57 UTC · original
I built a small WARP test on
beta-2(74a7e38) that isolates when the indirect arguments are copied. A GPU producer changes a dispatch record from one group to five. The actual beta-2 clamp copies the record, thenExecuteIndirectmarks one bit for each group that ran. Only the clamp’s position in the command list changes.0x01(one tile)0x1f(all five tiles)That gives a concrete signature to look for: reading correct arguments after the frame can hide the stale snapshot the draw actually consumed. It is a synthetic compute dispatch, so the next question is whether a real water draw goes through that path. On
beta-2, I’d keep the same camera and other settings, with raw mode off, and change onlyVICTORY_CLAMP_AHEADfrom its default to0. Check theindirect records per frameline to make sure ahead clamps actually moved in place. If the rectangles change, trace the argument address of one affected draw against the earlier writer range checked byHostList::gpu_written. If the baseline already reports zero ahead clamps, this comparison won’t distinguish the paths.Fixture source · Windows readbacks · Prelude eligibility check. The focused job temporarily excluded three unrelated beta-2 test bodies that fail compilation.
@PastiiJay on GitHub · 2026-11-26 11:58 UTC · original
Thanks @HandshakeHackin, your fixture matches what we see in game. We had just run exactly that A/B at the same spot:
indirect records per frame: ~2,540 clamped ahead in their lists' preludes, ~1,340 clamped in placeVICTORY_CLAMP_AHEAD=0:0 clamped ahead, ~3,780 clamped in placeThe pattern did change: the rectangles stopped following the camera and the sea flickers on its own rhythm instead. So the water does go through that path. Our reading is the same as yours: the ahead clamp snapshots the record before the tile pass writes it, and
HostList::gpu_writtenmisses the writer because it reaches its buffer through the view heap by a computed index. Next we'll try closing indirect batches after every writer, copy and barrier instead of clamping ahead, and report back here.@PastiiJay on GitHub · 2026-11-26 12:15 UTC · original
Following your suggestion we captured a still-camera run (diagnostics build,
VICTORY_DUMP_TARGETS=1, frames 2086–2095 and 2686–2689 dumped). Thanks again, it paid off right away.The sea is all-or-nothing per frame, not a partial tile list: in "sand" frames the water draws (vertex
1707628854aa2241, pixel7933d968ca095766, which write the 1280x720 water depth plus an R16_UINT and an R16G16_FLOAT target) are not recorded at all. There are 54 of them in frames 2090/2093 and 39 in 2689, but 0 in 2688. Frame 2088 has water on the left half only. Downstream, compute42848ef43117d945builds the 80x45 tile mask from that depth: 21–22 % water tiles in water frames, 0 % in sand frames. So nothing downstream drops the water; the title simply doesn't submit those draws on some frames. That points to something CPU-side the title reads (a visibility or readback result) that we serve stale or empty on alternate frames. Next capture will useVICTORY_DUMP_AFTER=7933d968ca095766,42848ef43117d945.@PastiiJay on GitHub · 2026-11-26 12:30 UTC · original
Correction to my last comment: the "0 water draws in frame 2688" was wrong. It came from a bug in our capture tool, not from the title. The ops file for a frame could be recreated after a late recording thread wrote to it, which wiped the start of 2688 (and emptied 2088, 2089, 2092, 2686 and 2687). In every intact frame the main water pass is there, 54 draws (39 in 2689), and all five water passes are present in 2688 too. Sorry for the noise.
Also ruled out: queries cannot be the cause, since our resolve always reports "visible", and the title never calls
SetPredication.So the water is always submitted, and what flashes is what reaches the screen. The image dumps are taken at present, and with our delayed present an image can be caught while the water list is still running. That points to GPU ordering or timing between the water lists and the present (held queues, delayed present), which fits your fixture's reading. We fixed the capture tool and will redo the still-camera capture, looking at the presented image.
@PastiiJay on GitHub · 2026-11-26 17:24 UTC · original
New finding, tested today on RX 9070 XT with the same 5-min bench at the same spot (BM-v1), changing only the console profile and the upscaler:
So the upscaler is not the cause, the Series S profile is. A tester on another 9070 XT in Series X also sees the sea correctly, even facing the sun. That points to something the title does differently at the smaller console's resolution (720p internal, maybe half-res water/tile passes) that our layer handles wrongly. Any idea where Series S takes a different path for water is welcome.
@HandshakeHackin on GitHub · 2026-11-26 20:15 UTC · original
There is a way to split the two profiles one step further. On
3a2c4dd,VICTORY_RENDER_S=1changes the title-facingConsoleModequery independently of the selected console. I verified the registry, analytics and memory results in fresh native Windows processes:0x6410x600x60For the same BM-v1 save and camera, the useful pair is
-SeriesXand-SeriesX -RenderSwith this launcher-only change. No executable rebuild is needed on3a2c4dd. Use the same flags for pre-build and play. Windows PowerShell 5.1 delivered the same command-line arguments in each pair and left FSR unset in all four launches. Launcher and runtime checksIf the second run also loses the sea, the render-mode query alone is sufficient to trigger the difference with the X memory profile held constant. If the sea stays stable, the full S profile still distinguishes the failing run. The Windows checks establish the inputs for that comparison. The water itself still needs the same-camera Radeon run.
@PastiiJay on GitHub · 2026-11-26 20:16 UTC · original
Thanks @HandshakeHackin, holding the X memory profile and flipping only the render-mode query is a neat way to split this. We'll run the
-SeriesX/-SeriesX -RenderSpair on the same save and post both results here.