app: pin shader::sources (SGD5 records and the raw DXBC scan) with unit tests #471
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!471
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-467"
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?
@AnastasisKon on GitHub · 2026-11-27 21:31 UTC · original
AnastasisKon:vibe/shader-sources-tests-1705ac→main· +148 −0 · 1 files · 2 commits · merged 2026-11-28 01:34 UTCWhat this changes
Refs #469. One change: unit tests for
apps/victory/src/shader.rs'ssources(), the function behindvictory shaderand the pre-build. No production code changes.Pinned behavior, with synthetic bytes only (a hand-built DXBC header, a hand-built stored-deflate SGD5 record — no game data, no new dependencies):
DXBCmagic whose size field disagrees with the data is skipped, while a valid container after a fake magic is still found;Container::parsebounds it by the size field) with the@0x…label;Packedfirst, labeled with offset and name, and unpacks to its container; the raw scan also finds the container inside the stored payload;bytes()returnsNone.How it was tested
cargo test -p victory— 13 lib tests pass, including the 5 newshader::sources_tests; integration tests pass (run on the arm64 host, toolchain 1.98.1)cargo test -p victory-hle -p xtask— pass (144 + 2 native-probe + 6 xtask);cargo test -p victory-gpu— 402 passed, 10 failed, all ten pre-existingdlopen libmetalirconverter.dylibfailures on this Mac without Apple's Metal Shader Converter (#382); CI runs that suite on Windowscargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— passcargo xtask policy— pass (398 files ok)Checklist
VICTORY_*variable and documented — n/a, none added@Olima34 on GitHub · 2026-11-28 01:34 UTC · original · approved these changes
Check report (helping the maintainer clear the queue):
checkandmacos-scriptsgreen on the current head.shader::sources: raw DXBC scan, SGD5 records, fake magics, corrupt records. All inputs are synthetic.226645f9) merged with this PR and the other test/docs/tools PRs we're landing in this batch (#401 #403 #426 #471 #475 #479 #483 #485 #490 #493 #498 #502 #509 #515). On it, thevictory-gpu(arm64),victory-shader,victory-backend,victory-metalandvictorytests pass, as do the macOS script tests (rustup-path.sh,run-summary-compare.sh,run-summary.sh --self-test), Windows clippy (-D warnings) andcargo xtask policy. Onevictory-gpurun in four failed main's ownmulti_mip_array_and_placed_depth_twins_preserve_all_subresources_and_remirror_immediately. That test also flakes on main alone, so it isn't from this batch.Thanks @AnastasisKon!