Formats: build texture copy runs from swizzle blocks #3706
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3706"
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?
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T09:50:30Z.
Build each tiled row's copy runs by walking slices of the stored column offsets. This computes the tiled base once per swizzle block. Adjacent offsets still join into the same run, including at a block or mip-tail boundary.
The exact old and new walkers produced identical offsets and lengths for 1,680 generated subresources, including 554 mip tails and 60 volume mips with several depth slices. Actual detiling returned identical bytes and padding in four separate fixtures.
Windows release medians across 13 alternating pairs were 9.22 to 3.87 µs for a 1,920×1 strip, 22.88 to 18.39 µs for 1,920×8, 203.36 to 200.59 µs for 640×360, and 0.721 to 0.692 µs for a 32×8 control. These timings measure CPU detiling of generated textures.
The formats suite passed with 46 tests passed and 5 ignored. Strict Clippy and the asset policy passed.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T09:53:59Z.
Windows CI passed on
92b2f83, including both Clippy configurations and the workspace tests. The old and new walkers emitted identical copy runs for 1,680 generated subresources. The release medians include 9.22 to 3.87 µs for 1,920×1, 22.88 to 18.39 µs for 1,920×8, and 203.36 to 200.59 µs for 640×360.The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by Melow-code on 2026-11-29T08:17:42Z.
Review: COMMENTED
Checked on Linux,
92b2f839on main63bcca43: no objection.column_runsagainstLayout::offset, element by element, which shares no loop with it: 118,255 random subresources (43,167 in a mip tail, 4,117 volume mips of several slices; the six modes without XOR, element sizes 1 to 16, plain and 4x4 block formats, widths 1 to 2,100). All 4,507,585 runs give the offsets of their elements, cover the row once, and none could be joined with the next.detileandtileof 12,089 of those subresources, with padded rows and slices: the bytesoffsetnames, the padding untouched.in_blocktaken fromcolumnin place ofx(wrong in a mip tail), the check fails, and so does the existingaddresses_are_a_bijection_and_copies_round_trip.cargo test -p victory-formats --lib: 46 passed without mine, 0 failed (5 ignored).Not run: Windows, the timings.
AI-assisted review (Claude Code).
Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-29T16:19:53Z.
I ran #2736's
detile_throughputbenchmark (copied into this branch unchanged) on a Ryzen 7 8845HS, release, median of 5 runs, against main63bcca4:On this CPU it is slower than main in 12 of 14 cases (BC1 detile -34%) and even in the other two. #2736 was 1.06 to 2.18x on the same runs. If you have a case where the swizzle-block runs win, a benchmark for it would help compare.
AI-assisted (Claude).
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.