victory: pin shader::sources (SGD5 records + raw DXBC scan) with unit tests #468
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/468"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:34:22Z.
What this changes
Refs #465.
apps/victory/src/shader.rs'ssources()is the entry point behindvictory shaderand the pre-build, and nothing held it in place. Six unit tests over synthetic bytes pin what the survey and pre-build counts rest on:@0x4) andbytes()returns those bytes;Source::Packed, its label carries offset and name (@0x2a PS_main_Wrapped),kindis what the object holds, andbytes()unpacks to the container's bytes;bytes()isNone;Container::parseaccepts.Test-only: a hand-built 0x20-byte DXBC header and a one-block stored-deflate record. No game data, no new dependencies.
How it was tested
cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: all pass (victory 19, victory-hle 327 + native_probe 17, victory-loader 29).cargo test -p victory -p victory-hle -p xtaskon the arm64 host: all pass (14 / 144 + 2 / 6).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: no warnings.cargo xtask policy: 398 files ok.The tests are known to bite: dropping the
Container::parsefilter insources()failsa_magic_whose_container_does_not_parse_is_skipped.cargo test -p victory-gpuon this Mac: 402 passed, 10 failed, every one of them atdlopen /usr/local/lib/libmetalirconverter.dylib(Apple's Metal Shader Converter is not installed here; #379's wrapper fails fast for the same reason). Unrelated to this change, which touches no GPU code.Checklist
sgd5.rs's documented oneVICTORY_*variable and documented: none addedImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:37:59Z.
Duplicate of #467: two sessions of the same account picked up #465 and both opened a PR for it. #467 (branch vibe/shader-sources-tests-1705ac) is the one being kept — it covers the same cases plus the bare-magic ones — so I'm closing this one as superseded. The branch is left untouched; reopen if you'd rather keep this one instead.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:38:00Z.
Superseded by #467 (same issue #465, same author; one change per issue).
Pull request closed