perf(formats): add AVX2/SSE2 micro-tile texture detiler and DetilePool #41

Closed
github-bot wants to merge 1 commit from github-bot/gh-41 into main AGit
Owner

@⁠Vladimir-Human on GitHub · 2026-11-27 12:50 UTC · original
Vladimir-Human:perf/simd-detile-avx2-pool → main · +2936 −10 · 3 files · 1 commits · closed without merging

Summary

Ports the 256-byte micro-tile AVX2/SSE2 texture detiler/tiler and persistent DetilePool into victory-formats, routing Layout::detile and Layout::tile through the vectorized thin micro-tile fast paths with portable scalar fallback for unaligned/edge remainders and thick 3D layouts.

  • New: crates/victory-formats/src/detile.rs — 256B micro-tile AVX2/SSE2/portable kernels across 1/2/4/8/16-byte elements (R8, RG8/R16, RGBA8/R32, BC1–BC7) for Standard (_S) and Display (_D) swizzle families, guarded fast-path geometry validation (prepare_thin_geometry), and persistent worker DetilePool for large subresources.
  • Updated: crates/victory-formats/src/lib.rs, crates/victory-formats/src/texture.rs — delegates Layout::detile / Layout::tile to detile, keeps walk/copy_run/copy_runs under #[cfg(test)] for parity verification, adds exhaustive scalar-reference parity, edge/tail/3D/array, concurrent pool, and panic-recovery tests, and parenthesizes (i * 7) >> 3 in an existing test to satisfy Rust 1.98.1 clippy::precedence.

Verification

  • cargo clippy -p victory-formats -p xtask --all-targets --locked -- -D warnings (default & --all-features): 0 warnings
  • cargo test -p xtask --locked: 6 passed; 0 failed (repository_passes_policy green)
  • cargo test -p victory-formats --locked -- --test-threads=1 (default & --all-features): 47 passed; 0 failed; 6 ignored
**@⁠Vladimir-Human** on GitHub · 2026-11-27 12:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/41) `Vladimir-Human:perf/simd-detile-avx2-pool` → `main` · +2936 −10 · 3 files · 1 commits · closed without merging ## Summary Ports the 256-byte micro-tile AVX2/SSE2 texture detiler/tiler and persistent `DetilePool` into `victory-formats`, routing `Layout::detile` and `Layout::tile` through the vectorized thin micro-tile fast paths with portable scalar fallback for unaligned/edge remainders and thick 3D layouts. - **New:** `crates/victory-formats/src/detile.rs` — 256B micro-tile AVX2/SSE2/portable kernels across 1/2/4/8/16-byte elements (R8, RG8/R16, RGBA8/R32, BC1–BC7) for Standard (`_S`) and Display (`_D`) swizzle families, guarded fast-path geometry validation (`prepare_thin_geometry`), and persistent worker `DetilePool` for large subresources. - **Updated:** `crates/victory-formats/src/lib.rs`, `crates/victory-formats/src/texture.rs` — delegates `Layout::detile` / `Layout::tile` to `detile`, keeps `walk`/`copy_run`/`copy_runs` under `#[cfg(test)]` for parity verification, adds exhaustive scalar-reference parity, edge/tail/3D/array, concurrent pool, and panic-recovery tests, and parenthesizes `(i * 7) >> 3` in an existing test to satisfy Rust 1.98.1 `clippy::precedence`. ## Verification - `cargo clippy -p victory-formats -p xtask --all-targets --locked -- -D warnings` (default & `--all-features`): **0 warnings** - `cargo test -p xtask --locked`: **6 passed; 0 failed** (`repository_passes_policy` green) - `cargo test -p victory-formats --locked -- --test-threads=1` (default & `--all-features`): **47 passed; 0 failed; 6 ignored**
Port the 256-byte micro-tile SIMD texture detiler/tiler and persistent
DetilePool to victory-formats, routing Layout::detile and Layout::tile
through the AVX2/SSE2 thin micro-tile fast paths with portable fallback
for unaligned/edge remainders and thick 3D layouts.

Also parenthesizes `(i * 7) >> 3` in an existing texture.rs test so
strict clippy (`-D warnings` on Rust 1.98.1) stays green.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 13:02:03 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 19:01 UTC · original

Thanks for this. I'm closing it without merging: it conflicts with #36 (GPU texture detiling), merged now, in crates/victory-formats/src/texture.rs, and the two overlap in what they do. If you'd still like the AVX2/SSE2 detiler in, please rebase it on the current main and open a new pull request, ideally with a measurement against #36's path.

**@⁠trustno1-coder** on GitHub · 2026-11-28 19:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/41#issuecomment-7244237106) Thanks for this. I'm closing it without merging: it conflicts with #36 (GPU texture detiling), merged now, in crates/victory-formats/src/texture.rs, and the two overlap in what they do. If you'd still like the AVX2/SSE2 detiler in, please rebase it on the current main and open a new pull request, ideally with a measurement against #36's path.
github-bot closed this pull request 2026-11-28 19:08:46 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!41
No description provided.