Proton/vkd3d-proton (RADV, 7900 XTX): RELAY=2 and CARD_STEPS>0 hand back wrong skinned meshes; what runs here instead #13
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#13
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?
@firefloc on GitHub · 2026-11-25 23:26 UTC · original
Report from a Linux box: the fork runs, and it is 10-30x faster than the tree we were using, but two of the new switches hand back wrong data on vkd3d-proton. Everything below is measured, one switch at a time, on one machine.
Where this ran
0a43566on Linux, no MSVC needed (about 4 minutes cold,cargoreporting 39 s of compiling, links withlld-link):cargo xwin build --locked --profile diag -p victory --target x86_64-pc-windows-msvc --features diagnosticsscripts/play.ps1sets, translated to a shell script, in a prefix holding Microsoft'sd3dcompiler_47.dllfromwinetricks— without it the picture is black, exactly as upstream needs on Windows.So: not Windows, not your driver, less RAM than you recommend, and the fork still beats what we had by an order of magnitude.
What breaks the picture, and it is two separate things
play.ps1defaults (VICTORY_RELAY=2,VICTORY_CARD_STEPS=2)-Safe(noTHIN/JOIN_PARTS/UPLOAD_AHEAD)VICTORY_RELAY=1(stage 1)VICTORY_RELAY=1 VICTORY_CARD_STEPS=2VICTORY_RELAY=1 VICTORY_CARD_STEPS=01.
VICTORY_RELAY=2reads what shaders wrote too earlyhost.rssays stage 2 lets a submission that reads title memory a flight's shaders may write wait only until the flights that declared it are done, and at1it waits for everything. On vkd3d-proton, stage 2 is not enough: skinned meshes come back as garbage — no face at all — while stage 1 draws the same characters correctly. Your own note says the walls of the first room were drawn in every run with2and in fewer than half without it; on this stack2behaves like "without it".2.
VICTORY_CARD_STEPSabove 0 breaks skinned meshes, and 2 removes the deviceWith
RELAY=1andCARD_STEPS=2the device was removed during a load, after a submission of one list:(+0x23cf683 is also where runs of the unpatched title die in our other tree, so it is the title's own failure path, not yours.)
With
CARD_STEPS=0, no crash in 14 minutes and geometry correct. We have not measured what turning it off costs here; your findings put card steps at 7 ms of a 48 ms preparing thread.3. A soft lock in the second section
Past the prison, the section asked for a weapon that never appeared in the character's hand while the scene loaded, so it cannot be progressed. Same family as the two above: something written on the card and read back by the title never arrived.
4. Faces are not animated
Faces draw, but there is no facial or lip animation, and skin shading is flat (glossy or matte, never both). We did not isolate which switch removes it.
vkd3d-proton warnings in every run (the Windows driver would not print these)
The
QueryInterfaceone fires thousands of times a second while loading; if a code path is chosen on its result, that is worth knowing.Why it seems worth your time
Same box, same prefix, same scenes: the tree we ran before this (fxceless base plus a handful of Proton fixes, all in launcher scripts and one DXC fallback) gives 3,132-14,996 ms a frame at 5,385-5,695 draws. This fork gives 143.9-208 ms at the same draw counts, on the wrong driver, with 8 cores and 30 GB instead of 24 threads and 64 GB. That is 10-30x.
Your 46-65 ms is still 2-3x away from us and part of that is the machine; it would be good to know how much is the driver.
The switches that make it run here
Prefix needs Microsoft's
d3dcompiler_47.dll(winetricks d3dcompiler_47) or the cinematic is black;VKD3D_CONFIG=descriptor_heap; andWINEDLLOVERRIDES="d3d12,d3d12core,dxgi=n"plus Proton's ownwine(rather thanproton run) to seeVICTORY_LOGlines, becauseproton runswallows the child's output.Happy to re-measure anything you want isolated:
CARD_STEPS=1, the cost ofRELAY=1, or which switch costs the facial animation. Every run here is one switch and four minutes.@itsonewi on GitHub · 2026-11-25 23:43 UTC · original
This is the most useful report on the tracker and it has had no answer, so here is what the source says about the two switches, and three asks that follow from it.
VICTORY_RELAY=2is only as sound as the write declarationsStage 2 does not wait for everything; it waits for the flights whose shaders declared a write that meets the read. The declaration comes from the pipeline's own list of shader writes, which is also what
card_steps::writersbuilds itsWriters from (crates/victory-gpu/src/host/card_steps.rs:138-192). So the guarantee holds exactly when every write a shader makes is in that list. When a shader writes through a descriptor the runtime classifies as data rather than as a binding — this fork logs precisely that case for five shaders in #1 (a descriptor read only as data is not supported) and for theu4/u5null-heap-slot reads in #11 — the write is missing from the declaration and stage 2 has nothing to wait for. Stage 1 waits for all flights, which is why it is correct on the same shaders on your stack.That makes your table readable:
RELAY=1correct,RELAY=2garbage, on a driver whose submissions the title waits on differently, is what an under-declared write looks like. If you want to test the hypothesis on your box, the two runs worth four minutes each areRELAY=2with the five descriptor-as-data shaders dropped, versusRELAY=2with everything else dropped instead; if the first is correct, the declaration is the bug and not vkd3d.VICTORY_CARD_STEPSabove 02is the stage that copies on the card (crates/victory-gpu/src/host/card_steps.rs:258-262:a buffer copy (VICTORY_CARD_STEPS=2 does it on the card)),1only does constant-buffer fills. SoCARD_STEPS=1is the run that separates "fills on the card corrupt skinned meshes" from "copies on the card corrupt them", and it is the one you offered first — it would be the most informative of the four runs.The device removal at
2withRELAY=1arriving during a load, on one submission of one list, is consistent with an invalid copy source state on a shared resource under vkd3d; if1is clean, the copy path is the one to look at, and the alignment warnings you pasted are in the same family (Requested alignment 65536 < 131072for a 3D texture). Note the fork does queryGetResourceAllocationInfoand retries withAlignment = 0(crates/victory-gpu/src/pool.rs:470-475), so that warning is vkd3d asking for a 128 KiB alignment the D3D12 spec lets us treat as 64 KiB — it is a host difference, not a bad descriptor here.Three asks
CARD_STEPS=1alone (withRELAY=1), andCARD_STEPS=0withRELAY=2, so the two switches are separated in both directions.RELAY=1on your box at the same draw counts: you already have 143.9 ms withRELAY=1 CARD_STEPS=0, and the difference to the default set is what the maintainer needs in order to decide whether stage 2 can stay the default.DROPPEDlines. The drops are counted by reason (crate::pipeline::note_why, printed bytake_drops), so if the face is not animated because pipelines or dispatches are missing, the reason and the hash are already in your log and that is a one-line answer instead of a switch hunt.The
QueryInterface {696442be-a72e-4059-bc79-5b5c98040fad}line firing thousands of times per second during loads is worth its own report: something in the load path asks every object for an interface that does not exist, and if any branch is taken on that result it is a wrong path on every host, not only on vkd3d.AI use
AI-assisted reply (source reading). No build, no hardware run, no game files.
@UwUCammie on GitHub · 2026-11-25 23:47 UTC · original · edited 2026-11-26 00:02 UTC
The suggested
VICTORY_RELAY=1 VICTORY_CARD_STEPS=0settings also reached a visible first room on a 20 GB RX 7900 XT, Ryzen 7 9700X, RADV 26.3.1, Wine 11.22 and vkd3d-proton v3.1-83. The character, room and movement prompt were visible at 170 s. I measured 234 accepted presents in 73.15 s (3.20 FPS, 4,948 draws/frame), with no device loss during the 230-second run.I used the Series X profile and
0a43566with the accepted-present counter. In the preceding cold run with the Windows preset, the movement prompt was visible over black at 216 s. The second run had also warmed the cache. These two runs establish one working configuration here, but they don’t isolate either switch or verify facial animation. Benchmark source and both measurementsAfter precompiling shaders offline, a repeat with the same RADV settings accepted 236 presents in 74.14 s (3.18 FPS, 4,959 draws/frame). The first room was visible at 175 s and the session completed without device loss. The pooled rate for the two visible-room runs is 3.19 FPS.
@itsonewi on GitHub · 2026-11-26 00:09 UTC · original
This is the measurement the thread needed, and it has two numbers in it worth pulling apart.
What the numbers say. 234 accepted presents in 73.15 s is 3.20 fps, so 312 ms per frame with 4,948 draws in it: about 63 µs per draw. The warm repeat (236 presents, 74.14 s, 4,959 draws) is the same to within 1 %, so the shader cache is not the variable — whatever costs 312 ms is per-draw submission, not pipeline compilation. On vkd3d-proton that is the expected shape: each draw crosses the translation layer, and the cost scales with draw count rather than with shader complexity.
Why the pair is a good "does it work" setting and a bad "which switch did it" experiment — you say so yourself, but it is worth writing down for the next reader:
VICTORY_RELAY=1waits for every flight (correct on any write declaration), whileCARD_STEPS=0removes the stepped staging whose writer lists stage 2 consults. The two are self-consistent — one waits for all, the other has nothing to book-keep — so a run with both says the title can reach the first room when neither mechanism is asked to be clever. It cannot say which of the two the other configurations need.The two single-variable runs that would settle it, both cheap given you already have the present-counter:
VICTORY_RELAY=1,CARD_STEPSat its defaultRELAYat its default,CARD_STEPS=0If A passes and B does not, the staging path is the suspect and #13's stage-2 write declarations are where to look. If both pass, the failure needs both switches changed at once and it is not either mechanism alone — which would be a much more interesting result than either.
The 4,948 draws/frame figure is also the first number in this tracker that explains the pacing complaints: at 63 µs a draw, no amount of shader warming reaches 30 fps, and the vsync-locked 30.0 fps reports people post are being reached only where the frame is mostly waits. Worth a line in the performance thread if you keep the counter.
(AI-assisted: arithmetic from your numbers; switch semantics from the source at
0a43566.)@schmiticle on GitHub · 2026-11-26 01:23 UTC · original
Windows, RX 9070 XT:
VICTORY_CARD_STEPS=2alone is what breaks skinned meshes here;VICTORY_RELAY=2is fineMachine: RX 9070 XT 16 GB (RDNA 4), Adrenalin 26.11.2 (32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 26300.
0a43566+ Marvisak/VIctory #317, diag build, Series X,scripts\play.ps1settings otherwise. Native D3D12, no Wine or vkd3d.The same place each time, the crowded room in the prison, people walking about:
VICTORY_RELAYVICTORY_CARD_STEPSVICTORY_RELAY_COPYSo on this card and Windows, card steps alone hands back wrong skinned vertices, and turning them off costs next to nothing (in line with the 7 ms of a 48 ms preparing thread in
docs/findings.md). Relay stage 2 drew the same characters correctly, unlike on vkd3d-proton above. One session each; I looked for the triangles in the same room in each.If it helps the default:
-SafekeepsVICTORY_CARD_STEPS=2(as #25 notes), so it would not have helped here.AI-assisted (Claude Code): measured on this machine with my own copy of the game. Names and counts only; no screenshots or game data.
@ThatZaliaSGuy on GitHub · 2026-11-26 01:57 UTC · original
Windows confirmation on an RX 7900 XTX (Adrenalin 26.11.2,
0a43566diag): here it'sVICTORY_CARD_STEPSalone. With theplay.ps1defaults (RELAY=2,CARD_STEPS=2), the main characters' faces are missing (only eyes, teeth and hair draw), while secondary characters such as the guard draw completely.VICTORY_CARD_STEPS=0withRELAY=2kept brings every face back (cutscene close-ups and crowd scenes), at about 15–16 fps in the opening cutscene.RELAY=1plusCARD_STEPS=0also has faces, but is slower.victory-image-b99f876b74d4a77f.dll+0x23cf6837.5-12 min in, with its physical pool at 95-96%, on any settings or profile (RTX 3070 8 GB, 16 GB RAM) #76@Deilach on GitHub · 2026-11-26 03:28 UTC · original
Linux numbers on an RX 9070 XT, one more symptom of the switches, and a setting that nearly tripled the frame rate here.
Setup. CachyOS, Wine 11.22 (system Wine, not Proton), vkd3d-proton master
ec207194, Mesa/RADV26.3.1, RX 9070 XT 16 GB, Ryzen 7 5800X3D, 31 GB RAM, Series X profile.
0a43566built on Linuxwith the
diagprofile anddiagnostics, shaders translated ahead (victory shaders: 25,782 inthe cache, 203 not translated), native
d3dcompiler_47. Launched withplay.ps1's environment.play.ps1defaults (RELAY=2,CARD_STEPS=2)RELAY=1 CARD_STEPS=0So on this card, the two switches cost correctness and gain no speed: both rows are about the
same once the world is up. I only tried them together, so I can't say which one causes the
backward jumps. Given the two Windows results above,
CARD_STEPSis the likelyone for the faces. A frame that reads what a flight's shaders were still writing would show older
contents, and in motion that looks like time going backwards.
The frame line in the second configuration (gameplay, ~5,700 draws):
Two more observations from the same runs:
defaults), levelling off at ~15 GB after minute 10. That's far below the README's 40-46 GB. Wine
only counts pages that are touched, so the Windows figure may include a lot of commit that's never
used. 31 GB of RAM was enough.
dropped without a host pipeline. I haven't looked into which pipelines those are yet; could they be
the RDNA 4 compiler case from #60?
The biggest win on this card:
VICTORY_PIPELINE_WAIT_MS=50. The six pipelines above neverfinish ("host pipelines all made" is never logged), so the recording threads spend the whole
500 ms shared budget waiting on them in nearly every frame ("500.1 ms waiting for pipelines"). Same
save and route, minutes 4-8 of gameplay, with
RELAY=1 CARD_STEPS=0(andVICTORY_VRAM_KEEP=75,70, a localthreshold patch, in all three rows):
VICTORY_PIPELINE_WAIT_MSRAM and VRAM didn't change (13.4 GB / 13.0 GB). With 0, the number of dropped draws per frame is the
same, yet the female heads never appear, so their first draw seems to matter (something drawn once
and reused?). A small budget keeps that and drops the rest of the stall. Maybe 50 would be a better
default, or the wait could skip pipelines that have already been waited on for a whole budget.
For comparison on the same PC and save: Marvisak/VIctory
mainat63bcca4runs this gameplay at0.2-1.0 fps, so the fork is 3-5x faster here even with its defaults. (
mainonly gets there with a localdxil-spirv fix for a 64-bit image load; otherwise it aborts while loading under vkd3d-proton. I'll
report that upstream separately.)
This was AI-assisted: the tests, log analysis and write-up were done with Claude (Anthropic's Claude Code). I ran the game and checked what was on screen, and every number above comes from these runs' logs.
@bordersky on GitHub · 2026-11-26 05:17 UTC · original · edited 2026-11-26 06:57 UTC
Before blaming a switch for missing faces: clear the checkpoint save between runs. It changed a conclusion here.
On Linux (RX 7900 XT, Wine + vkd3d-proton master, RADV,
b0cfe2b), a run withVICTORY_RELAY=2lost the main characters' faces, as in this issue, and I had concluded that stage 2 was unusable on vkd3d-proton. That run came right after one that had been ended by closing the window, and runs ended abruptly (a closed window, an out-of-memory guard, a device removal) can leave the title's checkpoint saveSARC0015bad: loaded from it, the main characters have no faces (eyes, teeth and hair only), with any setting, builder on or off (#67).With the checkpoint moved aside (
<data>/7952987A/saves/<user>/<title>/SARC0015~…; the game starts again from the beginning, thePlayersave stays),VICTORY_RELAY=2withVICTORY_CARD_STEPS=0draws the faces correctly here, with the ray-tracing builder on too. So at least part of "RELAY=2 breaks skin on vkd3d-proton" may have been a bad save, as it was for me; it would be worth re-running the switch tables of this issue from a clean checkpoint.What I do now for every A/B run:
SARC0015aside (or restore a known-good copy) before each run of a comparison, so every run starts from the same, good state;VICTORY_CARD_STEPS=2still needs its own clean run here; the Windows reports above already point at it on their own.github-bot referenced this issue2026-11-26 06:12:47 +00:00
@bordersky on GitHub · 2026-11-26 06:57 UTC · original
On Linux (RX 7900 XT, Wine + vkd3d-proton master, RADV) the faces lost with
VICTORY_RELAY=2come from fetches of card copies caught while a later flight was rewriting them (one or two pieces a frame).VICTORY_FETCH_CHECK=1fixes it: withRELAY=2 CARD_STEPS=2and the check, a new game keeps the main characters' faces at ~66 ms a frame, against ~82 ms with theRELAY=1 CARD_STEPS=0workaround in the same build and scene. The fork's testa_result_caught_in_between_is_put_rightfails 11-12 of 12 rounds under Wine without the check and passes with it. Details and the other opt-in tests under Wine: #138.@Jrjy3 on GitHub · 2026-11-26 19:20 UTC · original · edited 2026-11-27 04:31 UTC
The
CARD_STEPS=1run asked for above: on Windows, stage 1 keeps the meshes right and is as fast as stage 2. Stage 2's copies on the card are what break skinned meshes.Radeon AI PRO R9700 (RDNA 4, 32 GB), driver 32.0.32015.2008, Ryzen 9 9950X3D, Windows 11 26300, native D3D12. Release build of main
c9c932c+ #55 (with its faces fix) + Belobug5d6bd84.scripts\play.ps1settings otherwise, with renderer ports 1, 5, 6 and 7 andVICTORY_OUTPUT=2560x1440. Same idle spot on the water each time, two minutes each, measured once nothing was being compiled. Characters and the boat checked by eye (with stage 2, a vertex or two flies off and stretches the mesh):VICTORY_RELAYVICTORY_CARD_STEPSplay.ps1)RELAY=1doesn't test card steps. Card steps run only with the relay's second stage (card_steps.rs: "Only with the relay's second stage (relay_exact)"), soRELAY=1with anyCARD_STEPSvalue is in effect "both off". That row is slow because relay 2 is off, not because of the steps. ACARD_STEPS=1test needsRELAY=2.Suggestion:
VICTORY_CARD_STEPS = '1'asscripts\play.ps1's default (and in-Safe, see #25) until stage 2's copies are sound. Every report run throughplay.ps1would then show the meshes right at no measured cost. One PC, one scene, so a second machine's numbers on stage 1 would be worth having.AI-assisted (Claude Code).
@UwUCammie on GitHub · 2026-11-26 19:30 UTC · original
On the RX 7900 XT with RADV 26.3.1 I checked the actual card-step counters in the 32-minute session that produced my waterfront save. At RELAY=2 / CARD_STEPS=2, 1,790 of 1,850 intervals showed fills, but only three showed any buffer copies per frame. Those three were at about 34, 39 and 41 seconds after startup. A separate first boot also showed buffer copies around 93–103 seconds. A stationary sample late in a session could therefore miss the part that differs between stages 1 and 2 on this setup. I’ve queued a cold 720p run with just CARD_STEPS=1 changed. I haven’t tied those early copies to a particular mesh.
@UwUCammie on GitHub · 2026-11-26 20:22 UTC · original
I checked stage 1 on the 7900 XT / RADV 26.3.1 at 720p with the relay at 2. In the first 150 seconds, 20 of 45 reporting intervals had GPU fills and zero had GPU buffer copies. Stage 2 on the same stock binary showed copies in four intervals in one cold boot and three in the other.
Stage 1 still showed a blue-white washed-out street at 100 s and severe yellow glare at 115 s. By 130 s the diner and characters were visible. The dark stretched shape I saw in a separate stage-2 trial occurred in a different shot, so I can’t compare that mesh at the same pose or say anything about the boat. Another workload started at 186 s and I excluded this run from the FPS comparison. The lighting observations and counters above precede the interruption.
@UwUCammie on GitHub · 2026-11-26 20:37 UTC · original
The GPU-copy isolation run finished on the RX 7900 XT. With
VICTORY_RELAY=2andVICTORY_CARD_STEPS=1, it recorded GPU fills in 117 of 148 reporting intervals and GPU buffer copies in none. The two stage-2 controls recorded nonzero copy rates in 4 of 163 and 3 of 181 intervals.The stage-1 captures at 70, 85 and 100 seconds were black. The world was visible at 115 seconds. Later it reached a lit interior while the controls were still showing credits. I couldn't match the suspected stretched geometry across those scenes. Turning off GPU buffer copies alone was insufficient to give a consistently visible opening here.
The full cold 300 seconds gave 2,480 presents (8.27 FPS), versus 3,298 (10.99) and 3,954 (13.18) for the stage-2 controls on the same executable. Loading and stalls are included. Eight interrupted attempts were excluded. Timing and settings
@Jrjy3 on GitHub · 2026-11-27 04:31 UTC · original
Correction to my comment above:
VICTORY_CARD_STEPS=1does not keep the meshes right. It stretches them too, just more slowly. OnlyCARD_STEPS=0was clean here.Same PC (Radeon AI PRO R9700, Windows 11). Build: main
014d52d+ #55,VICTORY_RELAY=2.2de9980), stage 1 does the same but less often.CARD_STEPS=0, same cutscene and camera moves: no stretching at all. It costs about 9 ms a frame here (the 52.8 against 43.4 ms in the table above).So the suggestion above is wrong.
play.ps1's default should beCARD_STEPS=0(relay 2 still on) until card steps are fixed. What stage 1 alone takes on the card is the constant-buffer fills in descriptor tables (Step::Fill). If I readcard_steps.rsright, one of those sometimes reads a constant buffer before or beside a skinning pass's write that it doesn't account for. I'm looking into which one and will report back here.AI-assisted (Claude Code).
@UwUCammie on GitHub · 2026-11-27 04:54 UTC · original
The earlier RX 7900 XT run here used stage 2 as its control, so it only isolated the buffer-copy part of stage 1. It didn't establish that stage 1 keeps the meshes right. I've queued stage 0 and stage 1 from the same saved route, with relay 2 and the same executable in both. I'll look for comparable views before comparing the deformation. The pictured eye and mouth issues are being tracked separately.
@Jrjy3 on GitHub · 2026-11-27 06:13 UTC · original
Follow-up to my correction above: the cause of the stretching with card steps is in #434. The title writes some constant buffers again after sending the submission that reads them, and a taken submission's fills (on the card and on the CPU) read them too early. With that change,
CARD_STEPS=1showed no stretching here, at the same frame time as without card steps.AI-assisted (Claude Code).