Textures: wide non-XOR textures detiled a few block columns at a time #4546
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!4546
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4545"
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?
@Alilou92 on GitHub · 2026-11-30 22:15 UTC · original
Alilou92:perf/detile-block-order→main· +90 −33 · 1 files · 1 commits · openWhat it changes
CPU detiling of the non-XOR modes (
walk). The XOR modes (walk_xor, #2543) are untouched.walkcopied one full row of a mip at a time. On a wide texture a row of 64 KiB blocks is about 2 MB (4096 × 128 × 4 bytes), so a block's cache lines were evicted before the next row came back to them. Rows of blocks larger than 512 KiB are now walked a band of block rows at a time, about 256 KiB of block columns per pass; smaller ones keep the row order. Equal runs are kept asu32chunk numbers instead of 24-byte(usize, usize, usize)tuples, and 4-byte runs (3D textures of 1- and 2-byte elements) get a fixed-size copy like the 8, 16 and 32-byte ones. Every run is still copied once, to the same place.#623 worked on this path too (an AVX2 transpose); it was closed without merging, so there is no overlap now.
How it was tested
main(e1251c31), bothdetileandtile: 16,132 random layouts (odd sizes, mips and tails, arrays, 3D, padded pitches)cargo test -p victory-formats: 85 passed; clippy clean; the changed lines need no rustfmt change;cargo xtask policy --stagedokBC1 64KB_S, RGBA8 4KB_D and RGBA8 3D are within noise (−4 to +9 %); 2048² and below are neutral.
Not measured in game: the
texture detiling per framelog line gives the MB per frame by swizzle mode, which would show how much of the load these modes carry.Checked for overlap
🤖 Generated with Claude Code
c9923871catob7149af743View 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.