Skip to content

GPU skips empty host submissions - #1424

Closed
BaggyALPHA wants to merge 1 commit into
Marvisak:mainfrom
BaggyALPHA:fix/skip-empty-host-submissions
Closed

BaggyALPHA wants to merge 1 commit into
Marvisak:mainfrom
BaggyALPHA:fix/skip-empty-host-submissions

Conversation

@BaggyALPHA

Copy link
Copy Markdown
Contributor

Addresses item 35 (VIC-BT-035) in #1242. A queue submission can have zero host lists after filtering. The host now returns before taking the submission lock or calling D3D12 when there are no lists. Previously this path still incremented the submission counter, signaled the host fence and waited for it.

The synthetic regression creates an isolated host queue and checks both the submission counter and the completed fence. On upstream WARP they advanced from zero to one for an empty batch. Both remain at zero with the fix. The GPU suite passed on Windows with WARP (54 passed, one ignored) and the default hardware adapter (51 passed, one ignored). Clippy with all targets and features and the asset-policy hook passed.

AI-assisted (Codex).

@acetonahard-code

Copy link
Copy Markdown

Tested this on a GPU with SM 6.6 support (RTX 4070 SUPER, driver 621.14, Windows 11, repo toolchain), merged into current main (ffe310e).

cargo test -p victory-gpu passed failed ignored
main 50 0 1
main + this PR 51 0 1
main, --all-features 53 0 1
main + this PR, --all-features 54 0 1
  • The new test passes.
  • Run with --nocapture, and no "no SM 6.6 ... device; skipped" lines were printed, so no GPU test skipped for lack of a device.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.
  • cargo fmt --check: no new diffs from this PR (the ones it reports are already on main).
  • frame::tests::waits_end_on_ticks_and_count_frames failed once and passed on a rerun. It's timing-flaky on main too (2 of 10 full-suite runs here), and unrelated to this PR.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026
nazmi added a commit to nazmi/VIctory that referenced this pull request Nov 24, 2026
Review workers over ~45 more PRs against the merged upstream tree.

Integrated: Marvisak#1394 (antisymmetric XUserCompare), Marvisak#1390 (A8_UNORM is not in
the R8 typeless family), Marvisak#1499 (deep 3D mips stay out of the thick tail,
plus a regression test the PR lacked), Marvisak#1366 (mesh stage I/O does not parse
VS inputs), Marvisak#1594 (the title's exit status reaches the shell), Marvisak#1299 (docs:
validator prerequisite), Marvisak#1515 (dialog commands before init), Marvisak#1424 (empty
submissions skip the lock), Marvisak#1144 (shader differential skips are reported),
Marvisak#1129 (64 MB pipeline-worker stacks), Marvisak#1564/Marvisak#1565/Marvisak#1566 (MakeResident,
Evict and SetStablePowerState succeed as the console's do), Marvisak#1250 (a zero
element count reads to the end of the buffer), Marvisak#1628 (texture-creation
failure logs its states).

Re-applied after the upstream merge dropped them: f32_to_half NaN and
ties-to-even (Marvisak#843), unique-temp library writes (Marvisak#1660),
VICTORY_PIPELINE_WORKERS (Marvisak#1728), VICTORY_MODE (Marvisak#1701).

Removed: the orphaned depth-bounds test file, whose implementation
(9a6d9e6) the merge dropped and which no module compiled.

Refused: Marvisak#1099 (writing 0 for an unpaired p1 interpolation computes wrong
values; two reviewers upstream and one here reached the same conclusion).
Duplicates: Marvisak#1217, Marvisak#529, Marvisak#531, Marvisak#590, Marvisak#1102, Marvisak#398, Marvisak#1150, Marvisak#1220.

Gate at efda2c5: fmt 0 differing, both Clippy gates 0 errors, policy 219
files, workspace 674 passed / 0 failed with the 10 documented pre-existing
GPU skips.

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Recommended for a maintainer's look. Host::execute in crates/victory-gpu/src/host.rs now returns at once when queue.rs execute filters a title submission down to no host lists. Before, it took the submission lock, called ExecuteCommandLists with an empty array, then signalled the host fence and waited on it. I checked what the early return also skips: descriptor::sync_heaps() runs again at the start of the next submission, before any list can use the heaps; release_retired() holds retired resources only until the next real submission; with no lists there are no copy-backs or deferred writes to miss. The new test builds its own Host and checks that neither the counter nor the fence moves. CI: passing.


Generated by Claude Code

@BaggyALPHA
BaggyALPHA force-pushed the fix/skip-empty-host-submissions branch from 4ef9371 to 7f6496c Compare November 25, 2026 02:09
@BaggyALPHA

Copy link
Copy Markdown
Contributor Author

Rebased onto main at 940d32f and resolved the host.rs conflict, keeping both the upstream scratch test and this PR’s regression.

On Windows, the focused synthetic empty-submission test and asset-policy check passed. The broader host filter hit a descriptor-heap test failure, which reproduced on the same upstream base without this PR. No game files were used.

AI-assisted (OpenAI Codex).

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@StExpeditus

Copy link
Copy Markdown

Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at 7f6496c. cargo test --workspace --locked --no-fail-fast -> 697 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the case can no longer occur on main. Since 9cc37c5 queue.rs no longer calls Host::execute directly: it pushes segments into hold, and pump() runs only non-empty pieces. Every other caller of Host::execute passes at least one list.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

@Marvisak Marvisak closed this Nov 25, 2026
DragonSouls233 added a commit to DragonSouls233/VIctory that referenced this pull request Nov 26, 2026
Marvisak PR Marvisak#1424 (BaggyALPHA), from the PR-merge line: a frame with no
list to run waited on the host fence anyway. execute returns before taking
the submission lock, with a test that an empty submission leaves the fence
untouched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants