perf(formats): add AVX2/SSE2 256B micro-tile texture detiler and DetilePool (stable-amd) #178

Open
Vladimir-Human wants to merge 1 commit from upstream-pr/178 into stable-amd
Vladimir-Human commented 2026-11-28 18:07:25 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by Vladimir-Human on 2026-11-28T18:07:25Z.


Re-port of #42 onto stable-amd (v26.11.6, 75022ba).
Supersedes #42 (which targeted main and became conflicting/closed across disjoint branch histories).

Verification on stable-amd (commit cc3cd3c, Cargo.lock untouched)

  • cargo check --workspace --tests --locked: passed
  • cargo test --locked -p victory-formats:
test result: ok. 45 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 5.10s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
<!-- greyfinch-sync:PastiiJay/klbf-lab:issue:5543138990 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/178). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-28T18:07:25Z. --- Re-port of #42 onto `stable-amd` (`v26.11.6`, `75022ba`). Supersedes #42 (which targeted `main` and became conflicting/closed across disjoint branch histories). ### Verification on `stable-amd` (commit `cc3cd3c`, `Cargo.lock` untouched) - `cargo check --workspace --tests --locked`: passed - `cargo test --locked -p victory-formats`: ``` test result: ok. 45 passed; 0 failed; 6 ignored; 0 measured; 0 filtered out; finished in 5.10s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ```
HandshakeHackin commented 2026-11-28 19:38:51 +00:00 (Migrated from github.com)

Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-11-28T19:38:51Z.


One build detail for the hardware A/B: the usual release command leaves simd-detile off on this PR. I built both victory.exe variants on cc3cd3c and checked the resolved features from Cargo. The control reported ["default"]. The test binary reported ["default", "simd-detile"] with this invocation:

cargo build --profile diag --locked -p victory -p klbf-start -p victory-formats --features diagnostics,victory-formats/simd-detile

The default formats suite passed 45 tests. With the feature enabled 49 passed, and all 49 also passed when forcing the SSE2 fallback on the same x64 runner. That includes the byte-for-byte tiling and detiling comparisons and concurrent callers. I added a CI step for the opt-in suite. Windows build and test results for both variants.

<!-- greyfinch-sync:PastiiJay/klbf-lab:comment:7244701007 --> Imported from [PastiiJay/klbf-lab](https://github.com/PastiiJay/klbf-lab/pull/178#issuecomment-7244701007). Originally posted by [HandshakeHackin](https://github.com/HandshakeHackin) on 2026-11-28T19:38:51Z. --- One build detail for the hardware A/B: the usual release command leaves `simd-detile` off on this PR. I built both `victory.exe` variants on `cc3cd3c` and checked the resolved features from Cargo. The control reported `["default"]`. The test binary reported `["default", "simd-detile"]` with this invocation: ```text cargo build --profile diag --locked -p victory -p klbf-start -p victory-formats --features diagnostics,victory-formats/simd-detile ``` The default formats suite passed **45 tests**. With the feature enabled **49 passed**, and all 49 also passed when forcing the SSE2 fallback on the same x64 runner. That includes the byte-for-byte tiling and detiling comparisons and concurrent callers. I added a [CI step for the opt-in suite](https://github.com/HandshakeHackin/klbf-lab/commit/214527eb533caa88440737b20a72cc044215d843). [Windows build and test results for both variants](https://github.com/HandshakeHackin/klbf-lab/actions/runs/46180474904/job/141088656945).
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/178:upstream-pr/178'
git switch 'upstream-pr/178'

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 'stable-amd'
git merge --no-ff 'upstream-pr/178'
git switch 'upstream-pr/178'
git rebase 'stable-amd'
git switch 'stable-amd'
git merge --ff-only 'upstream-pr/178'
git switch 'upstream-pr/178'
git rebase 'stable-amd'
git switch 'stable-amd'
git merge --no-ff 'upstream-pr/178'
git switch 'stable-amd'
git merge --squash 'upstream-pr/178'
git switch 'stable-amd'
git merge --ff-only 'upstream-pr/178'
git switch 'stable-amd'
git merge 'upstream-pr/178'
git push origin 'stable-amd'
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
PastiiJay/klbf-lab!178
No description provided.