Formats/BCPack: BC7 channel rotation only in modes 4 and 5 (port of Marvisak/VIctory#3111) #412
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!412
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-412"
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?
@Jesper-Andersson on GitHub · 2026-11-27 01:14 UTC · original
Jesper-Andersson:bc7-rotation→main· +107 −2 · 1 files · 1 commits · openFixes #411.
crates/victory-formats/src/bcpack.rs:bc7_precision()andbc7_pack()readctrl >> 3 & 3as a channel rotation for every BC7 mode, but only modes 4 and 5 have a rotation field. Modes 0/1/3 with rotation 1 panic on a shift, modes 0-3 with rotation 2/3 drop a colour channel, and modes 6/7 skip red's p-bit and pack the endpoints out of order. In game this shows as a mosaic of wrong-coloured 4x4 blocks on textures (clothing, on an RTX 2070 SUPER, Series S).This is Marvisak/VIctory#3111 by RVZO6, applied unchanged.
Change
rotation(ctrl)returns the rotation bits only for modes 4 and 5, and 0 otherwise;bc7_precisionandbc7_packuse it.Where it does nothing
Modes 4 and 5 rotate exactly as before; the test checks their precisions and a packed mode 4/5 block with rotation 1.
Measured
RTX 2070 SUPER 8 GB (driver 621.14), Ryzen 7 5800X, 32 GB, Windows 11, main @
014d52d+ #203 (DLSS) + pr0vId3nce's own-bytes pool, diag build, Series S + DLSS,play.ps1settings plusVICTORY_CARD_BUFFERS_MIN_KB=64,CARD_BUFFERS_MB=1024,RESIDENCY=1,WIDE_MERGE=1,WINDOW_KB=1024,SUBMIT_FRAMES=2,CARD_ROOM_FOR_TARGETS_MB=1280. One run each, in the world:It's a picture fix: no frame-time change is expected or claimed (the runs were in different spots).
Checks
cargo test -p victory-formats --lib --locked: 42 passed, 5 ignored (new:bc7_rotation_applies_only_to_modes_4_and_5)bc7_packcargo clippy -p victory-formats --all-targets --locked -- -D warnings: cleancargo fmt -p victory-formats --check: no change inbcpack.rs(one existing difference intexture.rs, untouched here)cargo xtask policy: 1 file okNot checked
AMD; Series X; in game on plain main without the pool.
Related
Marvisak/VIctory#3111 (this fix) and #3386 (the same rotation guard plus a fix to the first BC7 dictionary entry, for that fork's faster decoder, which main doesn't have). fxceless/victory-fork
06702fe, ExoCalibra/victory-exoc1ce2fadand pr0vId3nce/VIctory-NVIDIA41791231carry it. No open upstream PR touchesbcpack.rsfor this.This change was made with AI assistance (Claude Code).
@UwUCammie on GitHub · 2026-11-27 01:27 UTC · original
I carried this to the AMD branch. The native formats suite passed all 42 active tests, including the generated BC7 rotation cases in every mode. I haven't checked the clothing artifact in game on this branch. AMD backport
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.