Shader tests: translate BCPack pixel-pair residual lookup #2681
No reviewers
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!2681
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2681"
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?
@Dathinel on GitHub · 2026-11-25 18:04 UTC · original
Dathinel:shader-tests/victory-bcpack-pixel-pairs→main· +51 −0 · 1 files · 1 commits · openTranslates BCPack’s
pairslookup into a synthetic console compute shader. Each symbol selects one of 64 table entries and yields two 3-bit residuals. The test checks all 256 symbol bytes against a test-local copy of the private formats helper (verified identical on13f91ca). All 64 addresses produce distinct pairs, and both padding bits vary.On Windows,
cargo test --locked -p victory-shader --features host --lib bcpack_pixel_pair_residuals -- --nocapturepassed on the RTX 3050 Laptop and WARP in 15.14 s. Two local mutations failed on hardware at symbol 255: using three address bits returned 0x0202, and shifting by half the byte stride returned 0x0107. Both should yield 0x0502. Targeted Clippy, formatting of the added code and the asset-policy hook passed. The full workspace suite was not run.AI-assisted. Claude Code wrote the original synthetic translation and audited the port. Codex changed the fixture and ran the hardware checks.
@cloph-dsp on GitHub · 2026-11-25 18:12 UTC · original
Independent Windows WARP verification of PR #2681 (head
1423e5d), claimPR-2681-BCPACK-PIXEL-PAIR-RESIDUALSon #1633.Toolchain: rustc/cargo 1.100.0, Windows MSVC,
VICTORY_WARP=1withdxil.dllfrom Windows SDK 10.0.26100.0 on PATH. Synthetic inputs only, no game data, no source edits.cargo test --locked -p victory-shader --lib emit::valu_tests::bcpack_pixel_pair_residuals_match_the_cpu_reference -- --exact --test-threads=1-> 1 passed, 0 failed, 273 filtered.origin/main13f91ca: the same filter reports 0 tests (the new test is absent).No bug found. AI-assisted (Hy4 flash).
@Vedoxdev123 on GitHub · 2026-11-25 18:16 UTC · original
RTX 4060 test (AI-assisted)
Windows 64-bit, Ryzen 5 5600X, GeForce RTX 4060 (8 GB).
cargo test -p victory-gpu --lib: 193 passed, 2 failed, 1 ignored, identical tomain(descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_viewsfail on both). No change from this PR.cargo test -p victory-shader: segfaults on bothmainand this PR, so there is no summary line and I can't confirm the new BCPack test on this hardware. No change from this PR.@kotekompotek on GitHub · 2026-11-25 18:38 UTC · original
Solid coverage - all 256 symbol bytes against all 64 distinct table entries, with both padding bits varied so the high nibble path is really exercised. The dword-select chain (one cmp+cndmask per row) is a clean way to keep the whole 64-byte table in registers.
@fuzeofficlal on GitHub · 2026-11-25 19:19 UTC · original
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP +
dxil.dllverification and review of1423e5db(on13f91ca):Verification (
rustc 1.98.1MSVC, Windows SDK10.0.26100.0dxil.dll)cargo xtask policy: 184 files ok.cargo clippy --locked -p victory-shader --all-targets -- -D warningsand--features host: 0 warnings.cargo test --locked -p victory-shader --features host --lib bcpack -- --nocapture: 1 passed, 0 failed (bcpack_pixel_pair_residuals_match_the_cpu_reference,dxil.dllvalidation + RTX 5090 hardware + WARP all executed cleanly).Review Notes
pairs_referencematchesvictory-formats/src/bcpack.rs::pairsverbatim across all 256 byte symbols with 64 distinct lookup entries and padding-bit flip checks (bits 3, 7) using exact 16-bit equality assertions.valu_tests.rs, merging cleanly alongside #2676, #2685, #2687, and #2700.@Marvisak on GitHub · 2026-11-25 22:20 UTC · original
Automated triage for the maintainers.
Needs work. The new test in
crates/victory-shader/src/emit/valu_tests.rschecks a hand-written shader against a copy of the privatebcpack::pairshelper. VIctory never runs that helper as console code, so the test mostly checks that the hand-written shader matches the copy, and the copy can drift from the formats crate unnoticed. The instructions it uses (v_bfe_u32,v_lshrrev_b32,v_lshlrev_b32,v_cmp_eq_u32,v_cndmask_b32,v_lshl_or_b32) are basic and already exercised by instruction-level tests such asbfe_signed_and_unsigned_match_rdna2. The two mutations described in the PR break the hand-written shader, not the translator.What would change the verdict: a focused test of a translator edge case that the existing
valu_tests.rs/semantics_tests.rscases do not cover, named after the instruction, with expected values from the public RDNA ISA.Generated by Claude Code
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.