GPU/descriptor: cap Rule::Start head block at texture size #1391

Open
github-bot wants to merge 1 commit from github-bot/gh-1391 into main AGit
Owner

@⁠n-romanovich on GitHub · 2026-11-26 22:30 UTC · original
n-romanovich:fix/923-cap-head-block-size → main · +34 −5 · 1 files · 1 commits · open

Related to #923 and #1284.

Under Rule::Start (default), Spans::note treated any placed texture view starting within HEAD (4096 bytes) of another view's start as replacing it, regardless of the actual texture size. When the title packs small textures or tint palettes (e.g., 256 B – 2 KiB) consecutively within 4 KiB, each new view marked its non-overlapping neighbours stale and nulled their host views.

Changes in crates/victory-gpu/src/descriptor/host.rs:

  • Cap each texture's Rule::Start head block at its own size (end.min(start + HEAD) for the incoming span and old_end > start for preceding spans), so non-overlapping neighbours packed within 4 KiB remain valid while overlapping views still replace stale ones.
  • Add unit test descriptor::host::tests::small_non_overlapping_neighbours_within_head_stay.

Verified locally:

  • cargo test --locked -p victory-gpu --lib (224 passed, 0 failed, 6 ignored)
  • cargo test --locked -p victory-gpu --features diagnostics --lib descriptor (40 passed, 0 failed)
  • cargo build --release --locked -p victory
**@⁠n-romanovich** on GitHub · 2026-11-26 22:30 UTC · [original](https://github.com/fxceless/victory-fork/pull/1391) `n-romanovich:fix/923-cap-head-block-size` → `main` · +34 −5 · 1 files · 1 commits · open Related to #923 and #1284. Under `Rule::Start` (default), `Spans::note` treated any placed texture view starting within `HEAD` (4096 bytes) of another view's start as replacing it, regardless of the actual texture size. When the title packs small textures or tint palettes (e.g., 256 B – 2 KiB) consecutively within 4 KiB, each new view marked its non-overlapping neighbours stale and nulled their host views. Changes in `crates/victory-gpu/src/descriptor/host.rs`: - Cap each texture's `Rule::Start` head block at its own size (`end.min(start + HEAD)` for the incoming span and `old_end > start` for preceding spans), so non-overlapping neighbours packed within 4 KiB remain valid while overlapping views still replace stale ones. - Add unit test `descriptor::host::tests::small_non_overlapping_neighbours_within_head_stay`. Verified locally: - `cargo test --locked -p victory-gpu --lib` (224 passed, 0 failed, 6 ignored) - `cargo test --locked -p victory-gpu --features diagnostics --lib descriptor` (40 passed, 0 failed) - `cargo build --release --locked -p victory`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:03:00 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1391/head:github-bot/gh-1391'
git switch 'github-bot/gh-1391'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1391'
git switch 'github-bot/gh-1391'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1391'
git switch 'github-bot/gh-1391'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1391'
git switch 'main'
git merge --squash 'github-bot/gh-1391'
git switch 'main'
git merge --ff-only 'github-bot/gh-1391'
git switch 'main'
git merge 'github-bot/gh-1391'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.