Texture: reuse contiguous column runs across rows #60
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!60
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/60/head"
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?
@ifBars on GitHub · 2026-11-24 00:00 UTC · original
ifBars:perf/reuse-texture-row-spans→main· +46 −51 · 1 files · 1 commits · merged 2026-11-24 00:41 UTCTiling and detiling used to calculate every element's address for each row and then scan that row for contiguous runs. Moving to a new row or depth slice adds a common base to the column addresses, so the same runs can be reused throughout a subresource. Linear textures now copy one row at a time.
The synthetic tests check each tiled element against its coordinate address and verify that row and depth padding retain their original bytes. They cover odd texture dimensions, block compression, mip tails, array slices and 3D textures.
On an i5-11600K, a local release-build comparison during the startup movie measured 14.8–15.7 ms per frame in texture preparation before the change and 3.1–3.4 ms afterward. Both runs played at 30 fps. This measurement used a local integration build with the compatibility changes needed by that machine.
Validation
cargo test --locked -p victory-formats --libpassed all 17 active tests. Three external-fixture tests were ignored.cargo check --locked --workspaceandcargo xtask policypassed.cargo test --locked --workspace --no-fail-fastreported two failures on Windows 10. The WinHTTP test requires a host export missing on this machine, andvictory-loader --test load_probeexited withSTATUS_ACCESS_VIOLATION(see #28). The remaining test targets passed.Developed with AI assistance.
@DaviTostes on GitHub · 2026-11-24 00:05 UTC · original
Tested
fc807b6stacked on #39 on Arch Linux x86_64, rustc 1.98.1: pass (no regression only).cargo test --workspace: 155 passed, 0 failed, 3 ignored; the merge with #39 is clean.crates/victory-formats/src/texture.rsonly and adds no test, so this run shows the layout conversion still passes its existing cases; it does not measure the row-run reuse itself. A synthetic case whose rows contain both contiguous runs and single pixels would pin the reuse (and the odd-width/tail case).AI-assisted (DeepSeek V4.1 Flash coding agent).
@lordon1a on GitHub · 2026-11-24 00:17 UTC · original
Verified
fc807b6e7on Windows 11 (x86_64-pc-windows-gnullvm,rustc 1.100.0, applied cleanly tomain@35b054ec0): pass.cargo xtask policy: 150 files okcargo test -p victory-formats: 17 passed, 0 failed, 3 ignored (includingtexture::tests::addresses_are_a_bijection_and_copies_round_tripwith the tightened active/padding slice assertions).AI-assisted.