f85101b/a253706 on an RTX 4070 (power-limited): ASYNC_SUBMIT+QUEUE2 about -15 to -20% frame time; window-mesh difference turned out to be per-run, not the switches #873
Labels
No labels
accessibility
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/fxceless--victory-fork#873
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?
@xunbreakablex on GitHub · 2026-11-25 11:29 UTC · original
Needs human attention: two world runs per setting on one machine, power-limited, so a second data point for the new switches, not a recommendation to change a default.
AI-assisted (Claude); runs done on my machine. RTX 4070 (100 W power limit, core at most ~2300 MHz), Ryzen 5 5600 held at 3.95 GHz, Windows 11, driver 621.01,
mainatf85101bbuilt from source (diagnostics build), Series X profile, warm shader cache, the same binary in every run, noVICTORY_*setting other than the ones named. Each run is the world reached and ~5 minutes; "steady" is three consecutive 6 s lines under 400 ms with over 4,800 draws, and the table gives mean ± sd of the steady lines (n = 16-27 per run, no frame capture running).VICTORY_ASYNC_SUBMIT=1ASYNC_SUBMIT=1+VICTORY_QUEUE2=1ASYNC_SUBMITalone: -3% in one run, inside the spread, so not distinguishable from the run-to-run variation.QUEUE2is for, so the direction fits.Not measured:
VICTORY_FILL_WAIT,MERGE_GAP/MERGE_RUNS,VICTORY_PROFILE; a longer run than ~5 minutes; other GPUs. Visually I compared captured world frames with and without the two switches (VICTORY_CAPTURE, short capture runs, same world-frame numbers; frame times from those runs are not used), and it is not clean:My guess, not measured: copy-back fetch went from 111 to 7.9 ms, a drop of about 14x, which is more than overlap alone would explain, so part of the gain may be data that the GPU wrote not reaching the title's copies. I did not separate
ASYNC_SUBMITfromQUEUE2for the visual difference (ASYNC_SUBMITalone did not change the frame time).@Ym1r1710 on GitHub · 2026-11-25 11:38 UTC · original
I checked this on a 5080 (Series X profile), same shot: Lucia at the cell window right after "Move around", about world +300.
On my side the window doesn't follow the switches:
ASYNC_SUBMIT=1+QUEUE2=1, with and withoutRELAY=2: the same frosted glass and fine mesh.9376fd6with neither switch is the odd one out: clear window, a much coarser mesh, yard sharp behind it.So here it changes between builds/runs rather than with the two switches. I'm not sure which look is the right one. The frosted one has refraction that looks like intended wired glass, and the clear one could be the glass layer not drawing at all. Can't tell without a console reference.
Frame time with the three switches is ~164-169 ms median over two runs here, no device loss.
@Ym1r1710 on GitHub · 2026-11-25 11:49 UTC · original
Small follow-up: I went back through my notes. On my tree the frosted glass showed up right when I added #799 (NVIDIA wave32 fixes: CBV clamp, loose-LDS fallback, scalar ops). The clear-window run is the one before it. So on mine it's #799 that changes the window, not ASYNC/QUEUE2. Worth checking whether your two arms had different shader caches or translator commits.
@xunbreakablex on GitHub · 2026-11-25 12:07 UTC · original
Follow-up on which of the two switches changes the picture (same machine as above: RTX 4070 at 100 W, Ryzen 5 5600 at 3.95 GHz,
f85101b, one run per setting, short capture runs of ~270 s with the same world-frame numbers, compared with a default-settings capture run of the same binary; AI-assisted, Claude).VICTORY_QUEUE2=1onlyVICTORY_ASYNC_SUBMIT=1onlyQUEUE2was too narrow.QUEUE2alone: copy-back 168-181 ms down to 73 ms and fetch 111 to 7.2 ms; frame time -3% to -13% against the two default runs (the default itself moved by ~30 ms between runs). So most of the copy-back gain comes fromQUEUE2, the rest of the frame-time gain needs both.ASYNC_SUBMITalone the cell scene was brighter (black pixels 32% against 65% by default, mean 44 against 33);QUEUE2alone 56%, both 64.5%. The scenes are not guaranteed to be the same moment, so I would not read it as an effect yet; I mention it because it is a large difference.VICTORY_TEXTURE_GUARD=0gave the same picture as the default (mesh present, same black ratio).VICTORY_HEAP_SYNC=0also lost the wire mesh (0.41), which may mean the mesh's texture view is late or wrong when the descriptor sync is off, and perhaps also when both new switches are on; a guess, not tested.@xunbreakablex on GitHub · 2026-11-25 12:25 UTC · original
Thanks @Ym1r1710, that is a useful counter-check, and it makes me less sure that the switches are the cause.
On the shader-cache question: all my capture runs use the same binary and the same cache directory; in the two runs that carry the comparison (both switches on, default) the log shows the same number of translated shaders (2,746 and 2,746), and the default shot has the same mesh in three separate default runs (fine-detail measure 16.7 / 16.9 / 17.1). So for me the cache was not what changed between those two arms. But
VICTORY_HEAP_SYNC=0on the same binary also lost the mesh, andQUEUE2alone orASYNC_SUBMITalone did not, so something that depends on timing or on the descriptor sync decides this shot, which fits your "it changes between runs/builds" better than "it is the switches".One more thing that may matter for the glass: on this card the compute pipeline
2da4beb3(the alpha-transmission prefilter, per #799/#419) is refused every frame (wave64 on a 32-lane card, 0x80070057), so the glass blur chain is never running here; your runs with #799 have it, and yours show frosted glass. So my "mesh present / mesh missing" may be two looks of a layer that is half-missing on my side rather than a regression of the switches. I would not treat the visual difference in the issue as caused byASYNC_SUBMIT+QUEUE2until it is seen again on a build where that pass runs; the frame-time numbers do not depend on this.@xunbreakablex on GitHub · 2026-11-25 13:14 UTC · original
Retraction of the visual part of this issue, plus the speed numbers on the newer
main(same machine: RTX 4070 at 100 W, Ryzen 5 5600 at 3.95 GHz; AI-assisted, Claude).The window mesh is not caused by the switches. I now have twelve capture runs of the same cell-window shot (world +200 to +340). The mesh is missing in three of them: both switches on
f85101b,VICTORY_HEAP_SYNC=0onf85101b, and plain defaults ona253706. It is present in the other nine, which include both switches ona253706and every single-switch run. In a run where it is missing it stays missing for the whole series (fine-detail measure 6-8 from the first to the last captured frame), so it is not late loading either. That looks like a per-run state, the same class as "the first room is randomly incomplete in about one run out of four" (#168, #62), and @Ym1r1710's observation that it changes between builds and runs rather than with the switches holds. One capture per setting was not enough to tie it to a setting. I was wrong to put it in the title; I am changing the title.The indoor brightness (#512 darkness) also varies from run to run: below-luminance-12 pixels in the cell scene are 26-30% in two runs with
ASYNC_SUBMITon and 64-65% in a third, so I am not claiming anything there either.Speed on
a253706(no capture, steady 6 s lines, two default runs in an ABAB order around the others):VICTORY_INDIRECT_WINDOW=1ASYNC_SUBMIT=1+QUEUE2=1INDIRECT_WINDOW=1So on this CPU-bound machine the copy-queue pair is the bigger win and the draw windows add nothing on top of it; the commit message's 6.0 -> 8.9 fps for draw windows was measured on a faster machine. No device loss and no driver-watch entry in any of these runs.
@xunbreakablex on GitHub · 2026-11-25 13:20 UTC · original
Confirmation of the per-run reading above: two runs of the same
a253706binary with the same default settings and the same capture method, one after the other on this machine: in one the window mesh is missing for the whole run (fine-detail 7.5), in the other it is present and stays present up to world frame +832 (16-19 over 24 captured frames). So the mesh state is decided per run, not by settings. (AI-assisted, Claude.)@xunbreakablex on GitHub · 2026-11-25 15:20 UTC · original
Update on the newer
main(0b0074e), same machine (RTX 4070 (undervolted, 100 W limit), Ryzen 5 5600 at 3.95 GHz (6 cores), Windows 11, driver 621.01, Series X profile; AI-assisted, Claude), diagnostics build, one 480 s run, steady window world +300..+480 s.a253706defaults (long 900 s run)0b0074e+ASYNC_SUBMIT QUEUE2 INDIRECT_WINDOW MERGE_GAP=64 MERGE_RUNS=4096 COPY_PLAIN TEXTURE_NO_WAITWhat the frame log says for the usual frame (165 ms) of that run: the card is ~77% busy (~120 ms), of which our send-and-hash lists 22.6 ms and compare lists 12.1 ms, the title's lists 85.7 ms; the card is idle 41 ms behind us. The submitting thread works 144 ms (copies 55 ms / 127 MB, copy-back 79 ms / 56 MB). In a sampled profile the submit threads are on a processor only ~64 ms a frame; the rest is the present waiting for the line (by design) and waits on the card. Per frame ~2,450-2,520 indirect commands bounded. So on a 6-core CPU this set moves the limit to the card, mostly the per-record clamps as the README says. No device loss or driver-watch entry. I did not check the picture for the wall/speckle effects Flamingo reported with a similar set; a capture run is queued.