Shader tests: BCPack's zigzag decode as console code matches the formats function #2593
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!2593
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2593"
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 16:22 UTC · original
Dathinel:shader-tests/bcpack-zz→main· +36 −0 · 1 files · 1 commits · openAdds one synthetic test to
emit/valu_tests.rs: BCPack's zigzag decode (zzincrates/victory-formats/src/bcpack.rs) written by hand as console code, translated by the emitter and run on the GPU, compared with the formats crate's function for every symbol.zzbecausevictory-shaderdoes not depend onvictory-formats.v_lshlrev_b32,v_add_nc_u32,v_bfe_u32,v_lshrrev_b32,v_cmp_ne_u32,v_cndmask_b32,v_xor_b32,v_and_b32) against a CPU function the repository already owns instead of hand-computed constants. Mnemonics in the comments were checked against the decoder.It is the first of a few small translations of the BCPack helpers to console code, one test per PR so each can be judged alone.
Tested
RTX 3050 Laptop (Ampere, 32-lane waves, driver 610.62), Windows 11 26200, Rust 1.98.1 MSVC, on
main67e8ae1:cargo test --locked -p victory-shader --features host --lib bcpack_zigzag -- --test-threads=1: 1 passed (hardware and WARP).cargo clippy --locked -p victory-shader --all-targets --all-features -- -D warnings: clean.cargo fmt --all -- --check: no diff in the added lines. (With my rustfmt 1.98.1 it reports existing diffs in many files onmain, earlier parts of this file included; this PR does not reformat them.)asset policy: 1 files ok.940d32fwith the D3D12 debug layer enabled by a local patch: 3,072/3,072 on both backends. Negative control, not included: withv_xnor_b32in place ofv_xor_b32only the 256 width-0 cases match.AI-assisted (Claude Code); synthetic data only.
🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-25 22:15 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main: it conflicts incrates/victory-shader/src/emit/valu_tests.rs. No content review was done this time; it will be reviewed once it is rebased onto currentmain.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.