Linux/RADV, RX 7800 XT: 96–108 ms frames at 4.5k–7.2k draws, the wineserver is worth 11%, and PORT_DESCRIPTORS helps here #240
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#240
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?
@Aruku448 on GitHub · 2026-11-26 12:26 UTC · original
Linux/RADV on an RX 7800 XT: 96–108 ms frames, and what the wineserver costs
(prepared for the tracker of avatarmanz/VIctory-7900XTX — cross-refs #111, #156, #163, #136, #13)
Setup
71cae09, dxil-spirv 2.79)victory.exe,d3dcompiler_47=n,bcargo build --locked --profile diag -p victory --features diagnostics --target x86_64-pc-windows-msvc, clang-cl + lld-link + xwin SDK9576c45Two notes for other Linux builders:
INCLUDE. Exporting the SDK include paths is not enough for the C parts(
libudis86-sysand friends); the paths have to be baked into aclang-clwrapper as-imsvcarguments. A
lld-linkwrapper adding/LIBPATH:is needed as well, and on an NTFS-shared SDK theuppercase
.Libnames are symlinks to case-different files that break under a case-sensitive mount —copy the real lowercase libs to a Linux directory first.
inside
vkCreateComputePipelineson this title, and the 3.2.0 builds (GE-Proton11-14, CachyOS) recursewithout end in dxil-spirv on the same compute programs. Master compiles them.
What runs
The prologue prison scene, 4,500–7,200 draws a frame, with the launcher's
-Safeswitch set(
play.ps1 -Safe, plusVICTORY_SHADER_LOOP_LIMIT=256):For comparison, the README's reference machine (RTX 4070, Windows 11) lists 97–104 ms at about 3,850
draws and 122 ms in a heavier view at 6,774 draws. So on this hardware + Wine we are at roughly the
reference numbers, and slightly ahead at the heavier view (7,168 draws in 107.8 ms).
Finding 1: the launcher's switch set is worth ~14x over plain defaults
We first ran with no
VICTORY_*switches at all (only the log and loop limit). Same scene, same build,same machine, frames in the same 3,500–4,400 draw band:
texturescopies-SafesetThe defaults are not a broken configuration — they do reach the world (our untouched-default run got to
4,994 draws / 8.1 fps) — but they stall on the runtime's remap lock exactly as the comment on
VICTORY_TEXTURE_NO_WAITdescribes: 840 ms of every frame intextures, all of it waiting.Suggested: have
play.ps1state the set it applies (it does), and consider making the measured set thedefault in the layer, or printing a one-line warning when the layer sees that none of the tuning
switches are set. Reporting "300 ms a frame" from a default run is currently the easiest way to
conclude the wrong thing about this port.
Also worth a line in the README:
-Safereads like "fewer features, slower", but it is the launcher'sbase set minus
UNDER_WIDEandLAND_ECHO, i.e. still ~15 switches on. Defaults are the slow case.Finding 2: the wineserver is a real cost, and the fix has one trap
Wine's server keeps each process's mapped views in a list, and
is_valid_view_addr,find_mapped_viewandfind_mapped_addrwalk it (WineHQ bug 60868, fixed upstream by3217449b1f719c8f7a73a6de768df536495ddcbf— views moved to an rbtree). This layer maps and unmaps alot of views per frame, so the server's share grows with the view count. Sampled on our run:
Building a wineserver with that commit brings it to a flat 4–6%, and the frame time follows, measured
over the same draw band (3,000–5,200) on the same machine and switch set:
copiesAbout 11%. (The 1–3.5 s → 115–200 ms in #111 was on a fork with a much worse baseline; on this tree
the copy path is already off the critical part of most frames, so the fix is worth less here. It is still
worth having: the cost grows with the scene, and it is the difference between a flat 6% and a climbing 71%.)
The trap, if anyone else builds it: take the server sources from wine-staging for your exact
version, not upstream. Our client is 11.22-staging, whose
SERVER_PROTOCOL_VERSIONis 980; upstream11.22 generates 979, and bumping the constant by hand lets the client connect but the server lacks
whatever staging added — the title then hangs in the intro. With the staging tree,
tools/make_requestsgenerates 980 by itself and it works.Second trap, ours: the upstream commit restricts the per-process view list to image mappings, because
its tree only needs the list for load order. We merged it onto a list that still holds every view, so
free_memory_view()'slist_remove()had to stay unconditional. With the commit applied verbatim theserver walks freed memory and dies a few minutes into a run — the visible symptom is the intro animation
freezing part way through and the game going quiet. Worth a comment in the patch if it is carried in a
tree that keeps the full list.
Finding 3: what is left
In the ~104 ms frame above:
copies48–75 ms for ~100 MB,textures~5–9 ms,copying back~59 ms but onVICTORY_RELAY's own thread, so not on the critical path.So
copiesis the largest single item left, and it is ~100 MB for ~50 ms — about 2 GB/s, far below whatthe memory can do. On our own Vulkan measurements the same 100 MB moves in 7 ms when the calls are
aggregated into a few spans, so this looks like per-call overhead rather than bandwidth:
the layer makes a few thousand copy calls a frame of ~40 KB each.
VICTORY_PORT_DESCRIPTORS=1is safe here, and helpsAdded to the
-Safeset, on the same machine and scene: the picture is correct (no black frames, nomissing geometry), and it is faster. Last 30 world frames above 3,000 draws:
copiestextures-Safe-Safe+PORT_DESCRIPTORS=1The live window sat at 10–11 fps / 93–95 ms at 5,176–6,168 draws. One caveat worth knowing: the first
couple of minutes after the world starts are slower with it (698 ms median while the level streams in,
against roughly 160 ms without), and it settles afterwards. So it is a win in the steady state and a
regression during streaming — if anyone else sees a bad first minute with it on, that is this.
VICTORY_PORT_CONSTANTS=1we did not measure: our first attempt ran with it and the window was closedbefore the world loaded, and #163 reports it black-screens world frames on RADV, so we left it off.
What we would find most useful
copiesper-call overhead can be attacked (we are considering coalescing theframe's ranges into spans before copying — is that already
VICTORY_MERGE_RUNS' territory on theinbound path, or is the inbound path deliberately one call per declared range?).
only supported entry point.
Happy to test a patch or provide longer runs; the machine is available.
@Aruku448 on GitHub · 2026-11-26 17:03 UTC · original
Follow-up: the renderer ports and
THINmeasured on the same stack (Linux, Wine 11.22-staging, vkd3d-protonmaster, RADV, RX 7800 XT). Same scene, same build (
c9c932c), same-Safebase unless stated. Median ofthe last 40 world frames above 3,000 draws;
copiesis the layer's own per-frame copy time from the frame line.copies-Safe(baseline)-Safe+PORT_DESCRIPTORS=1play.ps1default set (THIN=1 JOIN_PARTS=8 UPLOAD_AHEAD=1)-Safe+PORT_GUARD=1 PORT_JOURNAL=1-Safe+PORT_JOURNAL=1aloneSo on this stack:
PORT_DESCRIPTORS=1is the one that transfers, and it is a big win (1.5x here — more than theWindows numbers suggest, because the ~600,000-slot scan is hurting us more).
THINis not usable here: 9x slower, andcopiesgoes 73 → 426 ms. Not a memory problem — themachine was not swapping (31.9 MB of zram in use, 14 GB RSS). My guess is the per-chunk hand-over
between the title's recording threads and ours, but I have not profiled it.
PORT_GUARD=1looks harmful under Wine: with it (andPORT_JOURNAL) the copy path itself goes73 → 230–291 ms, i.e. the guard's claim-per-64 KiB accounting lands on the path the copies take.
Since the switch's stated gain is about 2 ms and the regression here is 150–370 ms, it is a clear no
on RADV at the moment.
PORT_JOURNALalone we could not measure cleanly: the run had not reached the world after 7 minutes.PORT_CBV=1changes the emitted shaders, so the shader cache is invalidated and the first loadre-translates everything; we saw the slow load and did not get a steady-state number yet. Worth noting
in the switch's docs that it costs a full re-translation once.
PORT_CONSTANTSwe skip entirely (#163).One caveat on the last three rows: part way through this session the NTFS volume the build lives on was
remounted read-only, so I moved the shader cache and the data dir to a Linux filesystem and those runs
started with a fresh data dir. The
copiesfigures come from steady frames and should be comparable; thetime-to-world figures are not.
If it helps, I can rerun any of these with
VICTORY_GPU_TIMING=1to split card time from submit time —that is the one number I do not have for this machine.
@Aruku448 on GitHub · 2026-11-26 17:12 UTC · original
Correction and a cleaner set, all on the same machine/build (
c9c932c), world frames ≥3,000 draws,median of the last 40 frames each. "stock ws" / "patched ws" = system wineserver vs one built with the
rbtree fix from bug 60868.
copiestextures-Safe(baseline), stock ws-Safe+PORT_DESCRIPTORS, stock ws-Safe+PORT_DESCRIPTORS+PORT_JOURNAL, patched ws-Safe+PORT_GUARD+PORT_JOURNAL, stock wsCorrections to my earlier comment:
PORT_JOURNALwe can now measure, and on this stack it does nothing for the frame (118.3 ms against106.3 ms with
PORT_DESCRIPTORSalone at about the same draw count), while it makes the load phase muchlonger — the run needs several extra minutes to reach the world. Not harmful like
PORT_GUARD, but not awin here either.
-Safe+PORT_DESCRIPTORS=1— 106.3 ms median (9.4 fps),with the window sitting at 11 fps / 93.6 ms at 5,176–6,168 draws in the better stretches. That is 1.45x
over the same base without the port.
one sits at 56.5% in the same scene).