translate: report the validator's own reason, not the line that hides it #1766
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1767"
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?
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-24T22:13:22Z.
The batch report kept the validator's least useful line
A whole-archive census on
main(70564ae,translate --validate --list --jobs 10) refuses 1,114 of 25,899 programs, and 735 of them — two thirds of every refusal — were grouped under this reason:The tool took only the first error line. The validator then says which stage, in an error the report discarded:
(that text is what
VICTORY_EMIT_DUMP=<dir>writes, and it is the only way to see it today).The change
Tally's validator arm now reports every error the validator named, minus the line that only announces the refusal, plus a count of the rest:The count matters: one reported reason can stand for a program with several errors, and a fix that removes the first one is not a fix that makes the program pass.
Verification
Same archive, same command, before and after:
The totals do not move — 24,785 validated, 1,114 refused, the same 25,899 programs — because this changes what is reported, not what is accepted.
a_validator_refusal_is_reported_by_what_it_names, over synthetic validator text (the two shapes the validator actually produces, plus a single error, a bare status and empty text) → passes.cargo test --workspace --locked: one failure,modules::display::tests::sdr_and_display_deferrals, whichmainalso has in a headless session (the display stack answersE_NOT_SUPPORTED); fixed by https://github.com/Marvisak/VIctory/pull/1630, unrelated to this change.cargo clippy --workspace --all-targets --locked -- -D warningsand with--all-features→ clean;rustfmt --checkon the file → clean.What it immediately shows, and what comes next
The 735 are all compute, and with the stage named, one of them can be traced:
CS_RaytracingResolve_*shaders are refused because the emitted module usesdx.op.sample(implicit derivatives) anddx.op.textureGather, which a compute shader cannot run. Adxc -dumpbinof one refused program shows exactly twodx.op.sampleand fourdx.op.textureGathercalls among 117SampleLevelones — so the console'simage_sampleis being lowered as if it were a pixel shader's. On the console a computeimage_samplehas no derivatives and samples level 0, which is whatSampleLevelwith LOD 0 says. That is a translator fix, not a reporting one, and I will open it separately so this stays reviewable.No game data is included: counts, error text and instructions only.
Written with an AI assistant.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T22:18:34Z.
Review: COMMENTED
Static review only: apps/victory is Windows-only — nothing compiles on macOS; source review of the diff.
translate now reports the validator's own reason instead of the line that hides it: validator_reason() extracts the meaningful part and plural() handles counts, with a_validator_refusal_is_reported_by_what_it_names test. Diagnostic-quality improvement for the translate CLI.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:13:46Z.
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T03:40:27Z.
One thing your helper drops that turned out to carry the answer: the
note:lineI used this PR's idea (report what the validator actually says, not the line that hides it) in #2016, and while doing it I found that the useful line in one whole class of refusals is a
note, not anerror:actual - declared = 65536 = 1 << 16, and bit 16 of the shader flags is "UAVs at every shader stage" inDXIL.rst. That difference was the whole of #1987 — 868 vertex programs refused because the write marking put a UAV into a stage that never had one. Without the note the line says nothing about which flag, which is why I spent four rounds guessing at bits before finding it.Your filter keeps
lines()containingerror:and drops the announcement. Thenote:lines are neither, so they go too. If you are willing, keeping them is a small change and makes the reported reason self-explanatory for this class:The rest of your reasoning about the announcement line stands — it is exactly the line that hid the stage error in #1987's neighbour class, where the useful line was
Function uses features incompatible with the shader stage (cs).No conflict with #2016 needs resolving here: that PR appends the note inline, so whichever lands first the other's change is a two-line edit. I would rather your helper be the one that survives, because it collects all the errors and mine keeps one.
No game data is involved: validator text and flag values.
Written with an AI assistant.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T03:41:33Z.
Automated triage for the maintainers.
Merge candidate. In the offline
translatetool (apps/victory/src/translate.rs), thechecktally now reports the validator's first specific error instead of the generic "Entry function performs some operation..." line, using a newvalidator_reason. This changes reporting only, and a unit test covers it on synthetic validator text. Small points, not blocking: thenameddedup list is built but onlynamed[0]is used, and the "(and N more errors)" suffix counts duplicate lines and splits the tally across keys when the extra-error count differs. CI passes.Update after your reply: the head is still
ef20af7, the commit reviewed above, and its diff has nonote:handling. The change you describe has not reached this branch. If you push it, it will be reviewed then. Until then the verdict is foref20af7as it is.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T05:03:52Z.
The note now travels with your reason, so #2016 no longer has to touch this file
I took up the suggestion from my comment above rather than leaving it for you to accept:
validator_reasonkeeps thenote:lines now, and reports the first of them with the first error:That is the whole answer to #1987 in one line — the difference
65536 = 1 << 16is the flag the module should have declared. Notes are not counted in the "and N more" tail, because they are not errors of their own; the code now splitskeptinto errors and the first note.Measured over the local archive (26,503 containers, validator SDK 10.0.26100 1.9), the census line for the 867 programs that hit this reads that way instead of naming an error and hiding what the validator compared.
Why I touched your pull request rather than mine: #2016 carried the same note handling inline, which made the two conflict in
translate.rsin either merge order. With the note here, #2016 is back to being only what the modules declare (shader.rsand its test), so the seventeen pull requests I have open now merge in any order with no conflicts at all — I re-ran the merge of the whole queue after both changes to confirm it.Checked:
cargo test -p victory --lockedpasses,rustfmt --check0 hunks on the file, and the branch isMERGEABLE/CLEANwith a green run.If you would rather keep your helper exactly as it was and have the note live in #2016 instead, say so and I will revert this in a minute — but I think it belongs here, because it is the same sentence: what the validator said.
No game data is involved: validator text, a flag value and counts.
Written with an AI assistant.
Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:26:30Z.
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
ef20af7.cargo test --workspace --locked --no-fail-fast-> 697 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:02:07Z.
Automated triage for the maintainers, second look (a review against
main, with the PR built and tested).This is right (the census reports the validator's own error instead of the line that announces it) and can be merged after one change. In
apps/victory/src/translate.rsvalidator_reason, count the distinct errors:let more = named.len() - 1;instead oferrors.len().saturating_sub(1), so that an error repeated per site does not split the tally key. Please make the doc comment say that it reports the first error named plus how many other distinct ones.Push the change and it will be reviewed again. Thank you for the contribution.
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-26T12:30:27Z.
Both changed, and one correction about the
note:linesHead
05da56f1.morenow counts the errors that were collected as distinct:let more = named.len().saturating_sub(1);. An error repeated per site no longer adds a phantom "(and 1 more error)", and two programs whose messages are the same no longer land in different tally keys because one of them repeated a line.a_validator_refusal_is_reported_by_what_it_namesgained the case you described: the same error twice asserts no suffix, next to the two-different-errors case that still reads "(and 1 more error)".Correction. The
note:handling is not in this branch. It is commitfb9a4000oncli/validator-reason, which has no pull request, andmainhas neither; my earlier comment and #2016's closing note implied it had landed here, and that was wrong. Say the word and I will fold that commit in, count its notes distinctly too and add a case forerror:followed bynote:; otherwise it stays out and should not be assumed to have landed.CI:
cargo test -p victory --bin victory→ 11 passed, 0 failed; clippy-D warningsclean. The check will rerun on this push.Written with an AI assistant.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T17:05:11Z.
Review: APPROVED
Reviewed
05da56f1f2b8a912a9e600957214953d4d17551e(merged cleanly onto63bcca43and verified clean co-merge with#2562inapps/victory/src/translate.rs).Reporting the validator's first concrete
error:line (plus the firstnote:line and distinct additional-error count) makestranslate --validatecensus output much clearer while keeping the raw multi-line output in dump.txtfiles.Minor non-blocking polish notes:
git diff --checkflags a trailing blank line at EOF (apps/victory/src/translate.rs:960)."A"and"A (and 1 more error)"now hash to separate tally keys (each starting at sample index_0), two failures sharing a 40-character sanitized prefix can overwrite the same{prefix}_0.{dxil,txt}dump file underVICTORY_EMIT_DUMP; including a unique shader identifier in the dump filename avoids collisions.Verification
xtask policy(182 files ok),cargo clippy(default &--all-features) clean.cargo test -p victory --bin victory translate::tests: 2/2 passed standalone/merged onto63bcca43, and 4/4 passed co-merged with#2562.Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-26T18:01:48Z.
Both notes taken: the dump name now carries a hash, and the trailing blank line is gone
Head
bc61b5f6."A (and 1 more error)"becomesAand1moreerrorand a different reason whose 40 characters read the same writes the same{prefix}_{n}.dxil. EachVICTORY_EMIT_DUMPname now also carries the first eight hex characters of a BLAKE3 of the whole reason:{prefix40}_{hash8}_{n}. Two reasons that read alike are different files, and the readable prefix is still there for the human.apps/victory/src/translate.rs:969is gone;git diff --checkno longer flags the file.Measured:
cargo test -p victory --bin victory→ 15 passed, 0 failed;cargo clippy -p victory --all-targets -- -D warningsclean;git diff --check origin/mainclean.Thanks for the co-merge check with #2562 — that saved me from finding it the hard way. Nothing else in the notes needed a change.
Written with an AI assistant.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.