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

Merged
anes66 merged 1 commit from upstream-pr/165 into main 2026-11-27 06:13:33 +00:00
anes66 commented 2026-11-27 05:23:11 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by anes66 on 2026-11-27T05:23:11Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5521666590 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/165). Originally posted by [anes66](https://github.com/anes66) on 2026-11-27T05:23:11Z. --- 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.
TaynanGT commented 2026-11-27 05:34:52 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T05:34:52Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7210757897 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/165#issuecomment-7210757897). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T05:34:52Z. --- 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 commented 2026-11-27 05:39:00 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T05:39:00Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7210817304 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/165#issuecomment-7210817304). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T05:39:00Z. --- 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.
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
TaynanGT/Vice-Tay!165
No description provided.