Formats: recover texel coordinates in configured XOR texture layouts #2468
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2468
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2468"
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?
@ghptc on GitHub · 2026-11-29 13:20 UTC · original
ghptc:fix/native-texture-layout→main· +81 −3 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCGetTexelCoordinate rejects valid byte offsets in standard mips of configured pipe/bank XOR textures on both Series S and Series X. The forward mapping added in #932 and the inverse API added in #1510 meet here. The inverse currently searches the non-XOR address tables, which are empty for these layouts.
This change recovers the unknown in-block coordinate bits from the same parity equations used by the forward path. The block and array/depth slice supply the known high bits. A final forward-address check rejects padding. All 120 current pattern/element-size combinations resolve in at most three passes over the equations.
Validation on
829188e9Reproduce the new regression with
cargo test --release --locked -p victory-formats coordinates_invert_configured_xor_standard_blocks. All test inputs are generated.The BCPack reference failures are also addressed separately by #2236 and #2419. Both correct the BC7 dictionary test oracle.
@Dukestar69 on GitHub · 2026-11-29 13:23 UTC · original · approved these changes
Tested locally merged onto
main(829188e9).crates/victory-formats/src/texture.rs.cargo test -p victory-formats --lib texture::passed (36 passed; 0 failed, includingcoordinates_invert_configured_xor_standard_blocksandcoordinates_invert_offsets).cargo clippy -p victory-formats --lib -- -D warningspassed with 0 warnings.Clean inverse texel-coordinate recovery for configured XOR texture layouts. LGTM.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).