The NVIDIA fork built on this tree carries none of the wave64 work, so 8 compute pipelines are refused: a port, and what it measured #323
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#323
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?
@Razen114514 on GitHub · 2026-11-26 16:47 UTC · original
The NVIDIA fork built on this tree carries none of the wave64 work, so 8 compute pipelines are refused: a port, and what it measured
Posted here because
trustno1-coder/VIctory-NVIDIAhas issues disabled, and thistree is its direct parent — its README says "A fork of avatarmanz/VIctory-7900XTX,
itself a fork of VIctory". Close it if it belongs in a different place.
The problem there specifically
On
trustno1-coder/VIctory-NVIDIAat033be27, eight compute programs that declareWaveSize(64)cannot get a hostpipeline on an NVIDIA card. The card reports
WaveLaneCountMin = WaveLaneCountMax = 32,so
CreateComputePipelineStatereturnsE_INVALIDARG (0x80070057)— eight times, onan RTX 5060 8 GB:
Eight is a small number against what
Marvisak/VIctory#2220reports on other hosts(60–70, and
reboot0000-cmdarchived 394), but the consequence here is the sameshape: their dispatches never run.
What already exists upstream — I did not invent this
Marvisak/VIctory#2220tracks this, and by now it holds measurements from severalpeople, including whole-archive runs over the title's shader set and comparisons of
five candidate PRs.
PiloteCode's #854 / #993 (fxceless/victory-fork) is thepaired form that
ExoCalibra/victory-exocarries.Nereziel/victory#6portsKelvaroq 0052 for the same purpose on another lineage.
This fork,
trustno1-coder/VIctory-NVIDIA, carries none of them. That is the gapI filled — not the technique, the integration.
What the patches do
Four commits, three files that matter:
crates/victory-gpu/src/shader_cache.rsVICTORY_WAVE_PAIRSin the cache key — this fork's key path enumerates env vars here, and does not go throughemit/mod.rs::translation_fingerprint, so without this the switch has no effect on cachingcrates/victory-shader/src/emit/lower.rsnandn + 32; masks, permutes and reductions cover both halvescrates/victory-shader/src/emit/mod.rsWaveSize(32); a failed attempt falls back to the original resultThe original retry order is untouched. Nothing that worked before changes.
Attribution — the paired code is PiloteCode's, not mine
Per function, against
victory-exo-src/crates/victory-shader/src/emit/lower.rsandfloat64.rs:with_paired_lanesbothput_lanesjoin_halveshalf_treejoin_half_sumslane_scalarsblock_phispaired_crosspaired_shapeswap_lanespaired_section_instpaired_instpaired_sum64Origin: #854 (paired wave64) and #993 (Wave32 round 2), both by
PiloteCodeinfxceless/victory-fork, integrated intoExoCalibra/victory-exoatc2e3c8b.Correct the credit if any part belongs elsewhere.
What is genuinely new is the integration, because this fork has none of exo's
float64.rs,guarded.rs,forms.rsorlink.rs:paired_sum64lives infloat64.rsand has aFloat64context. This forkhas no such module, so it was rewritten inside
lower.rs— hence 32 % similarity.Without it the second round of refusals reports
a paired f64 wave reduction is not supported.paired_instandpaired_section_instneeded adapting to this fork's ownwave_base/guard/write_placed/lane_index/edgehandling, and itspermlane, DPP and cube-LOD paths had to stay untouched.
What it measured — RTX 5060 8 GB, 32 GB RAM, Windows 11
Quality profile (
VICTORY_RELAY=1,VICTORY_CARD_STEPS=0,VICTORY_TEXTURE_NO_WAIT=0),--console series-s, half render scale.host pipeline refuseddropped, 6000+ draws/framecopies, per framecopying back, per frameindirectdropped, 6000+ drawsTwo rounds were needed: the first fixed six of the eight and left
5dc3b25986622949,6f225b641c5b0708(and later926c46bab3b86bd6) failing on the f64 reduction.cargo test -p victory-gpu: 333 passed, 0 failed, 34 ignored, same as the parent.What it does not fix
The 6000+ draw cliff is unchanged. 175–201 ms before and after, and the
indirect-drop count is the same. The five dropped signatures are byte-for-byte
identical before and after:
So the refused
WaveSize(64)programs are not what refuses those. The likely guard isin
draw.rs::execute_indirect:— i.e. structure-builder dispatches, refused because
VICTORY_BVH_MISS=1keeps thebuilder off. Refusing them is correct with ray tracing disabled; the failed path is
just not free.
For a 6089 draw / 201 ms frame the measured budget covers only 93 ms (preparing 40.1
game thread in
Presentfor 148–172 ms. That is submit-pipeline drain, and it iswhere the next fix belongs.
Two configuration findings
VICTORY_RELAY=2corrupts faces on its own.avatarmanz#13documents the pair"
RELAY=2andCARD_STEPS>0". On Windows/NVIDIA I triedRELAY=2withCARD_STEPS=0andTEXTURE_NO_WAIT=0: the relay wait halved (41.5 → 22.7 ms) butindividual characters came back with corrupted, coloured faces. So on this platform
the guard is
RELAY=2itself. That may or may not generalise to the Linux/AMDreport, which is why I am noting it as a data point, not a correction.
VICTORY_TEXTURE_NO_WAIT=0fixes black faces and is faster. The speed set ships=1, and with it faces and skin are pure black. With=0they render correctly andthe median frame went from 11 to 13 fps on the same scene — the opposite direction
from what moving a wait to the slower setting suggests.
The configuration these numbers came from
--console series-splus 27 variables: this fork'sscripts/play-nvidia.ps1speedset with four changes —
TEXTURE_NO_WAIT=0,RELAY=1,CARD_STEPS=0(the Qualityblock, all three; without any one of them faces or bodies break) and
PIPELINE_WAIT_MS=150(that script's default 10000 cost multi-second freezes here:p99 1472 ms → 236 ms), plus
VICTORY_AMBIENT=constant:2.0(the estimate form findsno light on this card and the world renders black).
VICTORY_CARD_BUFFERS_MBis deliberately absent: on 8 GB the title's budget isalready at 5.3 GB of 6.7 GB with 3748 textures waiting, and reserving more made the
driver lower the system budget instead.
VICTORY_THIN_THREADS=6was tried against the default 8 and was worse at every drawcount (3000–3999: 96.5 → 113.5 ms; 5000–5999: 108.7 → 114.0 ms).
Offering
I can send the four patches as a branch or a PR if you want them. They apply cleanly
on
033be27withgit am, and the resultingshader_cache.rs,lower.rsandemit/mod.rsare byte-identical to the tree these numbers came from. I checked thatby applying them to a fresh worktree and diffing. They carry nothing else — no test
scripts, no unrelated commits.
How this was produced
Analysis, the port and every measurement were done with AI assistance:
DeepSeek-V4.1-Flash, as the DSH agent (measurement, diagnosis, upstream research,
driving the run) and as the Codex CLI (the
lower.rsport, one file at a time, eachcompiled and committed, then the f64 reduction). Every number came from running the
build on the machine described. Where a sample is small — the 6000+ bucket is 2 to 7
frames — the text says so instead of rounding it into a claim.
@Razen114514 on GitHub · 2026-11-26 17:26 UTC · original
Update: the paired form is not safe to play with on this title — black rectangles on water
Follow-up after living with the port for a while. This changes the recommendation in
the report above, so it goes first.
The A/B
Same tree, same build, same scene, only
VICTORY_WAVE_PAIRSchanged:VICTORY_WAVE_PAIRShost pipeline refused0(off)1(default)So the switch trades one visible defect for another. Neither setting is correct.
What that means
At least one of the eight programs that only the paired form can build produces wrong
output. The failure is not a refusal and not a crash — the pipeline is created, it
runs, and what it writes is wrong. On water that shows up as large black rectangles;
with the program absent entirely (paired off) those draws are dropped instead, which
corrupts the characters in crowded scenes.
The eight hashes involved:
I have not yet bisected which one it is.
VICTORY_SKIP_PIPELINESis a diagnostics-onlyswitch in this tree, so the bisect needs a diagnostics build and one run per hash —
that is the next step, not something I am claiming to have done.
A second finding: #2143 makes it much worse
Marvisak/VIctory#2143(merged ase04c078, "a program's constant table starts afterits instructions") is not the cause, but on top of the paired form it multiplies
the rectangles: the sea goes from a few to many. Reverting
#2143alone brings itback to "a few", so I am reporting the two separately rather than blaming either.
I could not measure a video-memory saving from
#2143either. On this 8 GB card thepool sat at 5.7 GB of 6.7 GB with 3.3–3.7 k textures still waiting, against 5.3 GB
of 6.7 GB before it. That is within noise on an unsettled sample, and the sample was
unsettled because changing the constant-table layout invalidates the whole shader
cache. It may well be a real win on a card with headroom; I am not claiming it here.
The correction to my own earlier numbers
In the report above I wrote "
indirectdraws dropped at 6000+: 1310 → 1147–1780"and framed the port as a net improvement. That framing was too generous for
playability. What is solidly true:
dropped,copiesandcopying backall fall measurably;current state, so those gains are not currently reachable in a session.
If you would rather keep this issue to the mechanism, the practical recommendation for
players on this fork today is
VICTORY_WAVE_PAIRS=0and a smaller crowd density,not the paired form.
@Razen114514 on GitHub · 2026-11-26 18:27 UTC · original
Resolved on my machine: gate the paired f64 reduction, keep the rest of the paired form
The bisect finished, and the answer is narrower than "the paired form is wrong".
The three programs that matter
victory translate --validate --pipelines --list --onlyover the game folder names them:All three reach the paired form's f64 reduction (
Shape::ActiveF64->paired_sum64). The first two are the ones that actually change behaviour when thatreduction is refused; the third builds either way.
The fix, such as it is
Rather than skipping three hashes, I gated the f64 reduction itself off by default:
With that, a release build reports exactly two refusals:
and the result is: sea clean, characters correct, 8.7–9 fps at 4 035 draws. The
other five paired programs (
vfx_triangleClip,sr_tracing,alphaResolve,GpuParticleUpdate) still build and run, which is what keeps the characters fromcollapsing — that was the defect with
VICTORY_WAVE_PAIRS=0, where all eight arerefused.
So the trade is now three-way, and only the middle setting is usable:
VICTORY_WAVE_PAIRS=0VICTORY_WAVE_PAIRS=1(as ported)=1, f64 reduction offOne thing to watch out for when reproducing this
The pipeline library is keyed such that a stale
host-pipelines.binhides the change.After editing the translator I had to move both
cache/shadersandcache/pipelines/host-pipelines.binaside before the two refusals appeared in a run;until then the old pipelines were reused and the log said zero refusals while the
water still drew wrong. Worth knowing before someone concludes a fix "did nothing".
What this implies for the candidate-PR comparison in #2220
The report above argued that a refusal count of zero is not sufficient evidence. This
is the concrete case: #854/#993 with the f64 reduction reaches zero refusals and
draws wrong water. Two refusals here are the correct state, not a regression. If the
comparison table in #2220 is read as "fewer refusals is better", this fork's best
configuration looks worse than its worst one.
The honest statement of what I now believe: the paired form is right for the
vfx_triangleClip/sr_tracing/alphaResolve/GpuParticleUpdateprograms, andwrong for the volumetrics reductions. I have not established why the f64 sum is
wrong — only that refusing it fixes the picture. Somebody with more time than me
should compare
paired_sum64's reduction order against what GFX10 actually does forthese three, which is where I would look next.
@Razen114514 on GitHub · 2026-11-26 19:40 UTC · original
Correction: the
VICTORY_AMBIENTnote in the report is about this fork, not about the cardOne line in the report above overreaches and I want it right before anyone acts on it.
I wrote, in "The configuration these numbers came from":
The measurement is real for
trustno1-coder/VIctory-NVIDIAat033be27: withVICTORY_AMBIENT=0.8(the bare estimate form) the world came out effectively black onthis machine, and switching to the
constant:form lit it.But "on this card" is the wrong scope, and I have since measured a tree where it does
not hold. On
DoubleGhosty/cool_foxat3277b15, whose launcher shipsVICTORY_AMBIENT=constant:0.8(not0.8), the same RTX 5060 renders daylightcorrectly. There, dropping the
constant:prefix gives a dark world rather than ablack one — 6.3 % of the frame above 60/255 against 58.2 % with the prefix — so the
estimate form is not "no light", it is "much less light", and how much less depends on
the tree's ambient implementation, not on the GPU.
Two further things I got wrong while chasing this, in case they save someone a night:
constant:does not blacken the sun. I concluded that after tryingVICTORY_AMBIENT=constant:2.0, which blew the exposure out so that the sun disc andits reflection on the water read as black against everything else. The shipped value
is
constant:0.8. The form was fine; my number was not.first reproduced this fork's preset from the first fourteen lines of
Play-VIctory.cmdand missedPORT_CBV,PORT_CONSTANTS,TEXTURE_GUARD,LEVELS_ON_DEMAND,SHOW_AFTER,THIN,JOIN_PARTS,UPLOAD_AHEAD,CARD_BUFFERS_MIN_KBand the correctAMBIENTvalue — eleven settings out oftwenty-five. Every conclusion I drew from those runs about lighting and speed was
measured against something no upstream author ships. The launcher file is the
tested configuration.
Nothing else in the report changes: the eight refusals, the two that remain with the f64
reduction gated off, the
water_shadingprogramme names, the stale-pipeline-librarytrap, and the argument that a refusal count of zero is not sufficient evidence all stand
on their own measurements.