GPU: optional parallel detiling of large 2D subresources #271

Open
fffluffy-dev wants to merge 1 commit from upstream-pr/271 into main
fffluffy-dev commented 2026-11-24 23:06:06 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by fffluffy-dev on 2026-11-24T23:06:06Z.


VICTORY_TEXTURE_DETILE_WORKERS=2..4 (off by default) splits tiled 2D subresources of 4 MiB or more into row bands on scoped threads; output is byte-identical (odd mips, array slices, the last unpadded row; new test parallel_detile_preserves_odd_mips_and_the_last_unpadded_row). Synthetic CPU timings: 16 MiB BC7 1.45 → 0.40 ms, RGBA8 2.19 → 0.53 ms, 64 MiB RGBA8 9.28 → 6.21 ms. Detile time is reported on the texture refresh line.

Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; cargo clippy --workspace --all-targets -D warnings clean with and without --all-features; cargo xtask policy ok. Not measured on a real frame.

AI use: written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593213229 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/271). Originally posted by [fffluffy-dev](https://github.com/fffluffy-dev) on 2026-11-24T23:06:06Z. --- `VICTORY_TEXTURE_DETILE_WORKERS=2..4` (off by default) splits tiled 2D subresources of 4 MiB or more into row bands on scoped threads; output is byte-identical (odd mips, array slices, the last unpadded row; new test `parallel_detile_preserves_odd_mips_and_the_last_unpadded_row`). Synthetic CPU timings: 16 MiB BC7 1.45 → 0.40 ms, RGBA8 2.19 → 0.53 ms, 64 MiB RGBA8 9.28 → 6.21 ms. Detile time is reported on the texture refresh line. Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; `cargo clippy --workspace --all-targets -D warnings` clean with and without `--all-features`; `cargo xtask policy` ok. Not measured on a real frame. **AI use:** written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
kaayzouee commented 2026-11-25 02:10:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by kaayzouee on 2026-11-25T01:23:48Z.


Duplicate of #92?

<!-- greyfinch-sync:fxceless/victory-fork:comment:7149501460 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/271#issuecomment-7149501460). Originally posted by [kaayzouee](https://github.com/kaayzouee) on 2026-11-25T01:23:48Z. --- Duplicate of #92?
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/271:upstream-pr/271'
git switch 'upstream-pr/271'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/271'
git switch 'upstream-pr/271'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/271'
git switch 'upstream-pr/271'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/271'
git switch 'main'
git merge --squash 'upstream-pr/271'
git switch 'main'
git merge --ff-only 'upstream-pr/271'
git switch 'main'
git merge 'upstream-pr/271'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!271
No description provided.