World-frame translation failures, classified: 303 in three minutes, 93% dataflow, not instructions #1481
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#1481
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?
@MoonYueya on GitHub · 2026-11-24 18:20 UTC · original
What this is
A second, independent GTA VI Xbox→PC attempt (project Project Leonida) ran this repository, built from source at
ffe310e, against a retail title dump, and classified every shader that failed to translate during world load. Counts, error strings and hashes only — no game bytes, no shader names, no paths.Assembled with AI assistance, then checked line by line against the raw logs. Every number below is reproducible with the commands in the appendix.
The short version:
Setup and window
cargo build --profile diag -p victory --features diagnostics, no source changestaskkill /F(exit 1 is ours, not the title's); 0 panics, no crash logbound ...: 88 hle, 427 host, 72 title, 0 missing— nothing fell through to a stub(The logs do not record the adapter model; they record only whether WARP was in use. We are not asserting a GPU model here.)
The failure taxonomy
shader does not translate; its pipelines' draws are dropped stage=<s> hash=<h> error=<e>fired 303 times in run 3 (272 in run 2). Grouping by error string:a select on an untracked mask(64),a lane mask holding lanes elsewhere read as data(60),a lane-mask join of an untracked mask(3)a descriptor read only as data(51),a descriptor read from the first lane of computed VGPRs(4),a descriptor's address or format read as data(3),a descriptor neither loaded nor built(2),a descriptor partly joined by control flow(1),a descriptor chosen by control flow(1)an address in an SGPR that is no root parameter(31),an address not from a root parameter(16),an address from a phi(2)a structured buffer of unknown stride(27),a scalar memory read as data(18)image_gather4_l(7),image_sample_d_cl(3),an LDS write of bytes or halves(2)a 64-bit image atomic(6)barycentrics read directly(1),an LDS operation(1)xboxbvhbuilder.dllmaps with 0 missing imports; no program of it was reachedwave64/64-lane: 0 hits in all three logsThe split that matters: A through D are the translator has not modelled a dataflow — mask provenance, descriptor provenance, address provenance, buffer element size. E through J are this instruction or semantic is not implemented. 283 vs 20.
By stage: compute 272, mesh 14, pixel 13, vertex 4.
Hashes, for correlating with your own runs (stage in brackets). A:
ce79e9eba7ae0348(compute),b2ff2ef0d6c98dd7(compute),8b9483919d8d5e99(compute). B:00167d58cc5a78d7(compute),fb5e4cf7091f9525(mesh),fe660f2d6d57de76(mesh),11eeb27c2d15980d(compute). C:3cea4534bbc15632,6d7fe7745ab9c6d8,d9978c76c746d809(all compute). D:17af15c4015cb4b6(compute),4e35b816f2f91d68(vertex). E:fc5e66f8f873d3bb(compute),ee41ebc3eb3fbbdc(pixel),e535cfd7baac93b8(compute).The world frame draws more than it drops, but it drops a lot
The log line is
N draws/frame, dropped M without a host pipeline (K being made) and I indirect. Note the range lower bounds: the first world frames drop little (draw 5 / drop 25 as the world starts), so the peak figure is not a floor. We have written the full range rather than the peak-loading subset, because the peak-loading subset is the misleading one.No GPU hang.
device removed,0x887a0005,TDRandgpu hangare 0 in both real-GPU runs. There were 24 (run 2) and 26 (run 3)slow host submissionevents over 250 ms, worst 5,727 ms — close enough to the default 2 s TDR threshold that the risk you document is real, but it did not fire here.Read together with the taxonomy: the dark world is not a GPU that stopped. It is a frame that issues 900–3,900 draws and simultaneously drops 1,200–3,600 because the pipelines do not exist.
Title-memory copies during the world segment
Same runs, CPU-side preparation per frame:
Several hundred MB of copy per frame at ~1.5 ms/MB sits in the same order of magnitude as the GPU time on those frames. Anything that reduces copied bytes hits both sides. We are not proposing a design here —
watch.rsalready journals dirty 64 KiB pages with an asking number so overlapping host copies do not re-copy each other's pages, andshadow.rs'scopy_stalecoalesces stale pages into runs before copying. This section is only the numbers.For comparison, from a different title state in our own project, four independent implementations we compared: a content hash on top of write watching measured 25 MB/frame down to 3 MB/frame of actual upload on their corpus. That is a different title state and a different corpus, so treat the ratio as an illustration, not a prediction.
What we are not claiming
Related PRs will be linked here. Anything we propose as code goes there rather than into this thread.
Measurements by Project Leonida, 2026-11-24. AI-assisted write-up, human-verified against the logs.
Follow-ups: analysis rules for the largest failure classes in #1482; comments on #694 and #1343. Related PRs will be linked here.
@Ingenioeren on GitHub · 2026-11-24 18:24 UTC · original
One way to make the 93.4% figure easier to use for prioritization: on
ffe310e,Shader::translatedlogs a failed translation once per distinct container in the process. The 303 warnings measure the breadth of shader failures. Their relative frequencies do not weight how often a shader's pipelines drop work. Container deduplication and translation warningI verified the distinction with a synthetic
victory-gpudiagnostics unit test against that revision. Two distinct non-translatable containers, with the first requested eight times, emitted two warnings. Feeding the same sequence into the drop counter recorded nine shader-related drops. A separate sample recorded three drops underbeing madewithout any new translation warnings. One test passed. No title or GPU was involved.For a second, workload-weighted view, the existing
dropped …/frame without a host pipelinelines can rank the biggest reasons within logged samples. They report the top 40 reasons for the sampled interval, and a failed pipeline can list multiple shaders on one line. Treat those combined entries as one drop bucket if aggregating them. Drop reasons · Sampling and outputAI-assisted source review and synthetic test.
@Marvisak on GitHub · 2026-11-25 10:21 UTC · original · edited 2026-11-25 21:47 UTC
Automated triage for the maintainers.
A census of translation failures (
ffe310e, three-minute world window). The translation-failure census and which refusals cost the most draws are collected in #293, so this is tracked there. The warning is logged once per distinct shader, so the counts measure breadth, not how many draws each failure drops; the per-framedropped … without a host pipelinereasons weight it by draws.Offline censuses posted since (whole archive,
translate --list --validate, DXC 1.8 validator, programs not draws):67e8ae1/13f91ca: 25,665 programs emit, 24,846 validate, 29 do not emit. The 867Flags must match usage.rejections on940d32fare gone, fixed bya1a2077(Shader::finishincrates/victory-shader/src/emit/shader.rssetsflags::UAVS_EVERY_STAGEfor vertex, geometry and mesh programs with UAVs). Every vertex and pixel program that emits now validates.an address in an SGPR that is no root parameter, 71 mesh output-size rejections (#201, #1961), then a tail of 29 emit refusals in classes of 13 or fewer.mainhas no geometry-stage path, so the census contains noGsprograms at all, and the tracker refusal is only the first wall. Open PR #1315 (single-stream triangle geometry programs) takes the 195 to 0 with no other count changing, per the measurement on that PR. #2387, #2546, #2154 and #2295 move no count on this archive.#139 (merged after
13f91ca,crates/victory-shader/src/resource.rs) changes how memory addresses are traced, so a rerun on currentmain(61bfc77) would show whether any of these counts moved; please name the commit.Generated by Claude Code
@BaggyALPHA on GitHub · 2026-11-25 16:29 UTC · original
Refreshed this census on
main940d32f, 319 commits after theffe310eit was taken on: the translator now emits all but 100 programs of the archive, and what stops the other 1,673 is the validator, not dataflow.Your classification is the thing people prioritise shader work from, and it was measured 319 commits ago in the area of the tree that takes the most pull requests per day, so I re-ran the equivalent offline over the whole shader archive. CPU only, no GPU and no world run:
translate <archive> --list --validate --jobs 6, 204 s and 215 s. Validator is the official DXC archivedxil.dll(release 1.8), not the installed SDK one, because of what #1945 found about the installed engine misreporting.Coverage on
main940d32f, 26,503 containers / 26,084 programsEvery refusal, by count
Flags must match usage.Entry function performs some operation that is incompatible with the shader stage or other entry properties.an address in an SGPR that is no root parametervertex plus primitive output size is greater than 32768a register joining a lane mask and data, read as dataa descriptor read only as dataa lane mask read as dataa lane-mask join of an untracked maskv_cvt_f32_f64a descriptor neither loaded nor builtbarycentrics read directlyv_permlanex16_b32a descriptor chosen by control flowThe
emit:rows sum to exactly 100, which is the 42 vertex/pixel plus 58 compute that did not emit, so the table accounts for itself. The 195 and 3 are resource-tracking failures (resources 25,886 of 26,084 tracked) and do not stop emission.What changed, and what it means for where effort goes
emit:classes are 90 of 25,591 emitted programs, and the whole emit tail is 100. The translator has evidently absorbed most of that in 319 commits.Flags must match usage— the same count #1973 and #1987 report as a regression sincecd94d35, and #2016 is open against it. The 735 matchesFIND-10's 735 compute programs exactly, thedx.op.samplederivatives problem #2027 and #1065 address. I did not know those would land on the published numbers to the program when I started; that they do is a good sign for both reports.So on the current tree the ranked translator-side work is: the 867 flags regression, then the 735 compute derivatives, then the 195 address-tracking gap, then the 71 mesh budget — and only then the dataflow classes that most of the open shader pull requests are aimed at, which are worth 40, 36, 8 and 6 programs archive-wide.
What this does not say. It counts programs in the archive, not draws in a frame, so it cannot replace your world-window weighting — one refused program used by thousands of draws still costs more than fifty that never run. It is also translator plus validator only: no host pipeline creation and no host-specific options (wave size, mesh support), so it says nothing about what a given GPU then refuses. And it is one archive on one build; the commands above reproduce it.
Counts, validator strings and stage totals only — no program names, hashes, offsets or paths, and nothing from the game.
AI-assisted (Claude Code); every figure is from the two runs described.
@BaggyALPHA on GitHub · 2026-11-25 19:52 UTC · original
Update, and a correction to my own figures:
mainmoved 82 commits while I was measuring, and the largest item in that table is now zero. One issue is left holding 91% of the validator rejections.My census above was taken on
940d32f. By the time I posted itmainwas at67e8ae1— 82 commits in about three hours, includinga1a2077("vertex, geometry and mesh programs with UAVs say so in their flags"), which is the fix for the 867. I also wrote that "#2016 is open against it", which understated things: the fix had already landed onmain, and #1989 was closed as superseded while I was running. Re-ran the same archive with the same validator on67e8ae1.940d32f67e8ae1Per reason, both runs:
940d32f67e8ae1Flags must match usage.an address in an SGPR that is no root parametervertex plus primitive output size is greater than 32768a register joining a lane mask and data, read as dataa descriptor read only as dataa lane-mask join of an untracked maska lane mask read as datav_cvt_f32_f64barycentrics read directlya descriptor neither loaded nor builta descriptor chosen by control flowv_permlanex16_b32Vertex and pixel programs now validate 14,242 of 14,242 emitted — every one that emits passes. So
a1a2077recovered the 867 on the corpus, which is the confirmation #1973 and #1987 were asking for, and850b66f/54ab406tooka descriptor read only as datafrom 36 to 1.What this leaves, ranked. The compute entry-point rejection is now 748 of the 819 rejections, 91% — the
dx.op.samplederivatives problem ofFIND-10, which #2027 and #1065 are the competing answers to. Thenan address in an SGPR that is no root parameterat 195, unchanged by any of the 82 commits. Then the mesh output budget at 71 (#201, #1961). Then 29 programs that do not emit at all, spread over six classes of 13 or fewer.That is a different ordering from the one I posted an hour ago and very different from the
ffe310eclassification: the dataflow classes most of the open shader pull requests aim at are now worth 13, 8, 5 and 1 programs archive-wide, while one compute issue holds 748.The meta-point, which I think matters more than either table. A census of this tree is stale within hours — mine was superseded before I posted it, by commits that moved its biggest line from 867 to 0. Anything that prioritises shader work off a fixed snapshot (including the
ffe310eone at the top of this issue, and both of mine) should carry its commit and be re-run rather than cited later. The two commands take seven minutes on six cores, so re-running is cheaper than reasoning from an old number.Same caveats as before: programs in the archive, not draws in a frame; translator plus validator only, no host pipeline creation; official DXC archive
dxil.dllrather than the installed SDK one. Counts and validator strings only — nothing from the game.AI-assisted (Claude Code); both runs are as described.
@BaggyALPHA on GitHub · 2026-11-25 20:51 UTC · original
Class C on current
main: the one refusal that still fires 195 times has no open pull request aimed at it, and the three that quote it fix neighbours this archive never hits.Following the census above, I took the Class C cluster and measured the candidates rather than reading their titles. Same tree for every row (
main13f91ca), each pull request merged onto it on its own, rebuilt from scratch (four crates recompiled per row, build logs checked so no row could be a stale binary), then the same offline census over the same archive and validator.address in an SGPR that is no root parametermain13f91caNo row moves any number. The reason is not that the changes are wrong — it is that they target different strings, which do not occur in this archive at all:
mainovershaders.rpfresource.rsan address in an SGPR that is no root parameteran address not from a root parameteran address from a phian offset from a root parameteran address into a descriptor heap with an untracked high halfSo all four code paths still exist and none is reached by the title's shaders on current
main. My own search is what conflated them: I had looked for pull requests quoting the 195's string, and these quote it because they cite this issue's Class C, not because they fix it.What I am not saying. "Recovers nothing here" is not "worth nothing". #2387 measures itself against the native compute corpus of #815 (
418 → 339 → 64), which is not this archive, and a tracer that keeps origins across XOR swaps or stops checking the high half of a table address can be right on its own terms and guard against regressions, with no program in this corpus to show for it. #2295 isvictory-gpuonly, and the offline census creates no host pipelines (0 pipelinesin every row), so this method cannot measure it at all — its row above is evidence of nothing.What it does mean for whoever triages this cluster. Of Class C's 49 in the
ffe310ewindow, what is left onmainis one refusal at 195, and I can find no open pull request addressing it. That looks like the largest translator-side gap with nobody on it — the 748 has #1065 ready for review, the 867 landed asa1a2077, and the mesh 71 is #201/#1961.Method as before: counts and refusal strings only, no program names, hashes, offsets or paths; translator plus validator, no host pipelines; official DXC archive
dxil.dllrather than the installed SDK engine. Every row reproducible withtranslate <archive> --list --validate --jobs 6.AI-assisted (Claude Code); all figures from the five runs described.
@BaggyALPHA on GitHub · 2026-11-25 21:03 UTC · original
Correcting my comment above: the 195 do have a pull request aimed at them, and they are not a tracking gap. #1315 clears the whole bucket.
I wrote that the 195
an address in an SGPR that is no root parameterlooked like "the largest translator-side gap with nobody on it" and that I could find no open pull request addressing it. Both halves were wrong, and @kotekompotek had already shown why thirty minutes before I posted it: all 195 are one geometry program family failing at the same instruction, where the base pair is an ABI-provided GS pointer, and the tracker refusal is only the first wall —Gsprograms do not reach emit onmainat all. The real gap is the geometry stage path.My own census says the same thing, and I had the evidence in hand without reading it: the baseline contains 12,051
Ps, 8,765Ms, 2,658Cs, 2,191Vsand zeroGs. An absent stage is not a tracking bug, and loosening the tracker would not have translated one of those programs. My mistake was to treat a refusal count as a work item without asking which stage it came from.So I measured the geometry-stage pull request I had skipped, the same way as the others:
main13f91ca195
Gsprograms appear, emit and validate; every other refusal is unchanged, so nothing is traded. Details on that pull request.Two corrections to the ranking I gave earlier, then:
mainnow resolve to something other than what their string suggests: the 748 is a validator-version question (#1065), the 71 is an output budget (#201 / #1961), and the 195 is an absent stage (#1315). Only the small emit tail is what it looks like.AI-assisted (Claude Code); the table is from the two runs described, and the stage counts from the same censuses as above.