fix(gpu): return split submissions' descriptor slots; keep min level on moved views #223

Open
github-bot wants to merge 2 commits from github-bot/gh-223 into main AGit
Owner

@⁠mutlusinan on GitHub · 2026-11-27 19:53 UTC · original
mutlusinan:fix/gpu-slots-and-view-levels → main · +28 −23 · 2 files · 2 commits · open

Problem

  1. Split submissions leak descriptor slots. The lists a split submission runs at once are not detached, so nothing returned their fresh tables' dynamic slots before the title reset them; a long run lost slots it never got back. submit_cut already does this after the same execute; the split path did not.
  2. A moved view shifted its minimum level. show_from lowers ResourceMinLODClamp by the number of levels it skips, but the clamp is measured from mip 0 of the resource, not from the view's first level — so the minimum level changed when the view's start moved.

Fix

  • queue.rs, submit_split: call crate::list::tables_done(&lists[..cut]) after host.execute, as submit_cut does.
  • tiles.rs, show_from: leave ResourceMinLODClamp alone; the device test now samples the same resident level through the adjusted and the original view instead of expecting the adjusted one to read level 1.

Verification

  • cargo check --workspace --target x86_64-pc-windows-msvc --locked — clean.
  • cargo run -p xtask -- policy — 286 files ok.
  • The tiles.rs device test needs a GPU and was not run here.

Ported from fxceless/victory-fork af23c65 (fork PR #1320) and 41f9857 (fork PR #1210), GPL-3.0-or-later.

**@⁠mutlusinan** on GitHub · 2026-11-27 19:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/223) `mutlusinan:fix/gpu-slots-and-view-levels` → `main` · +28 −23 · 2 files · 2 commits · open ### Problem 1. **Split submissions leak descriptor slots.** The lists a split submission runs at once are not detached, so nothing returned their fresh tables' dynamic slots before the title reset them; a long run lost slots it never got back. `submit_cut` already does this after the same `execute`; the split path did not. 2. **A moved view shifted its minimum level.** `show_from` lowers `ResourceMinLODClamp` by the number of levels it skips, but the clamp is measured from mip 0 of the resource, not from the view's first level — so the minimum level changed when the view's start moved. ### Fix - `queue.rs`, `submit_split`: call `crate::list::tables_done(&lists[..cut])` after `host.execute`, as `submit_cut` does. - `tiles.rs`, `show_from`: leave `ResourceMinLODClamp` alone; the device test now samples the same resident level through the adjusted and the original view instead of expecting the adjusted one to read level 1. ### Verification - `cargo check --workspace --target x86_64-pc-windows-msvc --locked` — clean. - `cargo run -p xtask -- policy` — 286 files ok. - The `tiles.rs` device test needs a GPU and was not run here. Ported from fxceless/victory-fork `af23c65` (fork PR #1320) and `41f9857` (fork PR #1210), GPL-3.0-or-later.
The lists a split submission runs at once are not detached, so nothing
returned their fresh tables' dynamic slots before the title reset them:
a long run lost descriptor slots it never got back. `submit_cut` already
does this after the same `execute`, for the same reason.

Ported from fxceless/victory-fork af23c65 (fork pull request #1320).
`ResourceMinLODClamp` is measured from mip 0 of the resource, not from the
view's first level, so moving a view's start must not shift it. The test
now samples the same resident level through the adjusted and the original
view instead of expecting the adjusted one to read level 1.

Ported from fxceless/victory-fork 41f9857 (fork pull request #1210).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:58:38 +00:00
Author
Owner

@⁠mutlusinan on GitHub · 2026-11-27 20:21 UTC · original

Risk assessment (porting review)

  • Slot release is safe here: Host::execute is submit(..., late = false), which holds the submission lock for the whole passage, i.e. the lists have run when it returns. submit_cut has used exactly this sequence (queue.rs:171-177), and tables_done skips null lists and lists that still have earlier work.
  • The freed subset is the same one submitted (now filters out entries without a host list).
  • Min level: ResourceMinLODClamp is measured from mip 0 of the resource per D3D12, so leaving it untouched is spec-correct. The device test that covers it was not run here (needs a GPU).
  • Compatibility: merges cleanly and type-checks against main at e69e39c.
**@⁠mutlusinan** on GitHub · 2026-11-27 20:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/223#issuecomment-7227420969) ### Risk assessment (porting review) - **Slot release is safe here:** `Host::execute` is `submit(..., late = false)`, which holds the submission lock for the whole passage, i.e. the lists have run when it returns. `submit_cut` has used exactly this sequence (`queue.rs:171-177`), and `tables_done` skips null lists and lists that still have `earlier` work. - The freed subset is the same one submitted (`now` filters out entries without a host list). - **Min level:** `ResourceMinLODClamp` is measured from mip 0 of the resource per D3D12, so leaving it untouched is spec-correct. The device test that covers it was not run here (needs a GPU). - **Compatibility:** merges cleanly and type-checks against `main` at `e69e39c`.
Author
Owner

@⁠1tsethan on GitHub · 2026-11-27 23:00 UTC · original

Independent Windows validation of PR #223.

Tested commit: 4bdf2b31f95f099091aa192791685ff2ba0c14ce.

cargo test --locked -p victory-gpu tiles:: -- --nocapture --test-threads=1

Exit: 0.

  • test result: ok. 3 passed; 0 failed; 1 ignored; 0 measured; 451 filtered out; finished in 1.62s

Tested commit: 4bdf2b31f95f099091aa192791685ff2ba0c14ce.

cargo test --locked -p victory-gpu levels_on_demand_on_the_card -- --ignored --nocapture --test-threads=1

Exit: 0.

  • test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 454 filtered out; finished in 0.90s

Tested commit: 4bdf2b31f95f099091aa192791685ff2ba0c14ce.

cargo test --locked -p victory-gpu levels_on_demand_on_the_card -- --ignored --nocapture --test-threads=1

Exit: 0.
Test-specific environment: VICTORY_TILES_TEST_CARD=1

  • test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 454 filtered out; finished in 0.00s
  • no adapter with tiled resources of tier 2, or no debug layer for a run on the card; skipped

The first explicitly ignored device-test invocation selected the software adapter and passed. The recheck sets VICTORY_TILES_TEST_CARD=1; its adapter/progress notes are listed separately. The debug layer is not installed.

Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.

**@⁠1tsethan** on GitHub · 2026-11-27 23:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/223#issuecomment-7229797423) Independent Windows validation of PR #223. Tested commit: `4bdf2b31f95f099091aa192791685ff2ba0c14ce`. `cargo test --locked -p victory-gpu tiles:: -- --nocapture --test-threads=1` Exit: **0**. - test result: ok. 3 passed; 0 failed; 1 ignored; 0 measured; 451 filtered out; finished in 1.62s Tested commit: `4bdf2b31f95f099091aa192791685ff2ba0c14ce`. `cargo test --locked -p victory-gpu levels_on_demand_on_the_card -- --ignored --nocapture --test-threads=1` Exit: **0**. - test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 454 filtered out; finished in 0.90s Tested commit: `4bdf2b31f95f099091aa192791685ff2ba0c14ce`. `cargo test --locked -p victory-gpu levels_on_demand_on_the_card -- --ignored --nocapture --test-threads=1` Exit: **0**. Test-specific environment: `VICTORY_TILES_TEST_CARD=1` - test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 454 filtered out; finished in 0.00s - no adapter with tiled resources of tier 2, or no debug layer for a run on the card; skipped The first explicitly ignored device-test invocation selected the software adapter and passed. The recheck sets `VICTORY_TILES_TEST_CARD=1`; its adapter/progress notes are listed separately. The debug layer is not installed. Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result. <!-- victory-native-validation-20261128 -->
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/223/head:github-bot/gh-223'
git switch 'github-bot/gh-223'

Merge

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