GPU: extend HostHeap wraparound search range to cursor bounds (fixes #871) #974

Manually merged
github merged 3 commits from gh-pr/974/head into gh-pr/974/base 2026-11-26 04:15:27 +00:00
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 14:36 UTC · original
pushkarreddyy:fix/descriptor-cursor-range → main · +33 −2 · 1 files · 3 commits · merged 2026-11-25 00:20 UTC

Summary

Extends the second chained wraparound search range in HostHeap::dynamic() to prevent premature heap exhaustion, resolving #871.

Changes

  • In crates/victory-gpu/src/descriptor/host.rs:
    • Changed wraparound search range from 0..*next to 0..cursor.saturating_add(n - 1).min(end).
    • Added regression test host_heap_finds_contiguous_run_spanning_cursor_on_wraparound.

Verification

  • Tested and verified on RTX 4090 under Wine/vkd3d-proton 3.2.
  • Complies with Rule #1 asset policy.
**@⁠pushkarreddyy** on GitHub · 2026-11-24 14:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/974) `pushkarreddyy:fix/descriptor-cursor-range` → `main` · +33 −2 · 1 files · 3 commits · merged 2026-11-25 00:20 UTC ### Summary Extends the second chained wraparound search range in `HostHeap::dynamic()` to prevent premature heap exhaustion, resolving #871. ### Changes - In `crates/victory-gpu/src/descriptor/host.rs`: - Changed wraparound search range from `0..*next` to `0..cursor.saturating_add(n - 1).min(end)`. - Added regression test `host_heap_finds_contiguous_run_spanning_cursor_on_wraparound`. ### Verification - Tested and verified on RTX 4090 under Wine/vkd3d-proton 3.2. - Complies with Rule #1 asset policy.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:15:26 +00:00
github manually merged commit c1be75f7b7 into gh-pr/974/base 2026-11-26 04:15:27 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-24 15:06 UTC · original

Ran the new test at c1be75f:

Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p victory-gpu dynamic_search_can_find
1 passed; 0 failed; 0 ignored      (exit 0)

descriptor::host::tests::dynamic_search_can_find_a_run_across_the_cursor passes. This is a unit-level test over the heap search, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain.

Not tested: the title run that hit #871 (no game data here), RDNA2/RDNA4 and Intel GPUs.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test, wrote this report; no game data was used.

**@⁠Aniseto** on GitHub · 2026-11-24 15:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/974#issuecomment-7135474865) Ran the new test at `c1be75f`: Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by `rust-toolchain.toml`), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-gpu dynamic_search_can_find 1 passed; 0 failed; 0 ignored (exit 0) ``` `descriptor::host::tests::dynamic_search_can_find_a_run_across_the_cursor` passes. This is a unit-level test over the heap search, so the adapter is not the variable; the datapoint is the pinned 1.98.1 toolchain. Not tested: the title run that hit #871 (no game data here), RDNA2/RDNA4 and Intel GPUs. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the test, wrote this report; no game data was used.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 15:13 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at c1be75f: cargo test -p victory-gpu passes, 51 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/974#issuecomment-7135652281) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at c1be75f: `cargo test -p victory-gpu` passes, 51 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠pushkarreddyy on GitHub · 2026-11-24 15:28 UTC · original

Thank you @⁠Aniseto (NVIDIA RTX 5070 Ti) and @⁠Zipettte (AMD Radeon RX 7700 XT) for verifying the wraparound search test across both GPU architectures!

**@⁠pushkarreddyy** on GitHub · 2026-11-24 15:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/974#issuecomment-7136093919) Thank you @⁠Aniseto (NVIDIA RTX 5070 Ti) and @⁠Zipettte (AMD Radeon RX 7700 XT) for verifying the wraparound search test across both GPU architectures!
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/Marvisak--VIctory!974
No description provided.