Tests: cover repeated texture-change compaction and range bounds #165

Manually merged
github merged 1 commit from github-bot/gh-165 into main 2026-11-27 06:14:53 +00:00 AGit
Owner

@⁠anes66 on GitHub · 2026-11-27 05:23 UTC · original
anes66:test/texture-change-coverage → main · +69 −0 · 1 files · 1 commits · merged 2026-11-27 06:13 UTC

The regression in #137 covers one full queue of disjoint texture changes. Add CPU-only coverage for repeated compactions, overlapping/nested writes and 64-bit address bounds, so those cases cannot silently lose pending texture updates.

The checks assert that every original changed interval remains covered and the queue stays within its limit. Coverage is checked independently of the production join helper. This changes tests only.

Validation:

  • cargo test --locked -j2 -p victory-gpu --lib --features diagnostics pending_texture_changes_ -- --test-threads=1: 4 passed, including the existing regression (Rust 1.100.0, Windows/MSVC).
  • Extracted-source CPU controls: the unmodified helpers pass; truncating compacted endpoints to 32 bits and shrinking nested overlaps each fail the checks.
  • Added test block checked with Rust 1.98.1 rustfmt; git diff --check passed.

The full GPU suite and title runtime were not run. These tests use local integer vectors and do not create a graphics device. No rendering or FPS improvement is claimed.

**@⁠anes66** on GitHub · 2026-11-27 05:23 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/165) `anes66:test/texture-change-coverage` → `main` · +69 −0 · 1 files · 1 commits · merged 2026-11-27 06:13 UTC The regression in #137 covers one full queue of disjoint texture changes. Add CPU-only coverage for repeated compactions, overlapping/nested writes and 64-bit address bounds, so those cases cannot silently lose pending texture updates. The checks assert that every original changed interval remains covered and the queue stays within its limit. Coverage is checked independently of the production `join` helper. This changes tests only. Validation: - `cargo test --locked -j2 -p victory-gpu --lib --features diagnostics pending_texture_changes_ -- --test-threads=1`: 4 passed, including the existing regression (Rust 1.100.0, Windows/MSVC). - Extracted-source CPU controls: the unmodified helpers pass; truncating compacted endpoints to 32 bits and shrinking nested overlaps each fail the checks. - Added test block checked with Rust 1.98.1 rustfmt; `git diff --check` passed. The full GPU suite and title runtime were not run. These tests use local integer vectors and do not create a graphics device. No rendering or FPS improvement is claimed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 05:23:58 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 05:34 UTC · original

I checked the coverage helper against the compactor, including the fallback that combines neighboring ranges. Each input should still have one covering entry, so the prefix maximum checks the right invariant. The repeated passes and the near-u64::MAX endpoints both add coverage beyond the existing full-queue case.

**@⁠TaynanGT** on GitHub · 2026-11-27 05:34 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/165#issuecomment-7210757897) I checked the coverage helper against the compactor, including the fallback that combines neighboring ranges. Each input should still have one covering entry, so the prefix maximum checks the right invariant. The repeated passes and the near-u64::MAX endpoints both add coverage beyond the existing full-queue case.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 05:39 UTC · original

Thanks for adding this coverage, @⁠anes66. I ran pending_texture_changes_ on Windows at 580e169 with diagnostics enabled. All four tests passed, including the existing full-queue regression. The new cases exercise repeated compactions, nested writes and addresses near u64::MAX, and check coverage independently of the queue’s merge helper.

**@⁠TaynanGT** on GitHub · 2026-11-27 05:39 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/165#issuecomment-7210817304) Thanks for adding this coverage, @⁠anes66. I ran `pending_texture_changes_` on Windows at `580e169` with diagnostics enabled. All four tests passed, including the existing full-queue regression. The new cases exercise repeated compactions, nested writes and addresses near `u64::MAX`, and check coverage independently of the queue’s merge helper.
github manually merged commit 4a5458f412 into main 2026-11-27 06:14:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.