Stability: bound direct compute dispatch work #79

Open
github-bot wants to merge 1 commit from github-bot/gh-79 into main AGit
Owner

@⁠space-de on GitHub · 2026-11-24 21:18 UTC · original
space-de:stability/bound-direct-dispatch-work → main · +34 −0 · 1 files · 1 commits · open

Summary

Bound direct compute dispatches before recording them. D3D12 allows at most 65,535 groups in each dimension (Microsoft documentation); the existing indirect path also limits total groups to 1<<20. Direct dispatches previously passed the title's counts straight to D3D12.

Counts outside either limit are dropped, reported once, and included in diagnostics. If the dispatch belongs to the ray-tracing structure builder, the builder is disabled for the run because its stages must run all or none.

This is a defensive guard for malformed or pathological direct counts. I found no current report showing that an oversized direct dispatch caused a hang, so this is not presented as a fix for a confirmed FPS regression.

Tradeoff

A legitimate direct dispatch above these existing indirect-work limits will now be dropped, which can omit GPU work. Typical recorded dispatches should be checked on hardware before raising or changing the caps.

Validation

  • git diff --check passed.
  • cargo check -p victory-gpu passed.
  • cargo clippy -p victory-gpu -- -D warnings passed.
  • No tests or in-game run were performed.
  • Checked the current open PRs; no direct-dispatch bound was already proposed.
**@⁠space-de** on GitHub · 2026-11-24 21:18 UTC · [original](https://github.com/fxceless/victory-fork/pull/79) `space-de:stability/bound-direct-dispatch-work` → `main` · +34 −0 · 1 files · 1 commits · open ## Summary Bound direct compute dispatches before recording them. D3D12 allows at most 65,535 groups in each dimension ([Microsoft documentation](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-dispatch)); the existing indirect path also limits total groups to 1<<20. Direct dispatches previously passed the title's counts straight to D3D12. Counts outside either limit are dropped, reported once, and included in diagnostics. If the dispatch belongs to the ray-tracing structure builder, the builder is disabled for the run because its stages must run all or none. This is a defensive guard for malformed or pathological direct counts. I found no current report showing that an oversized direct dispatch caused a hang, so this is not presented as a fix for a confirmed FPS regression. ## Tradeoff A legitimate direct dispatch above these existing indirect-work limits will now be dropped, which can omit GPU work. Typical recorded dispatches should be checked on hardware before raising or changing the caps. ## Validation - `git diff --check` passed. - `cargo check -p victory-gpu` passed. - `cargo clippy -p victory-gpu -- -D warnings` passed. - No tests or in-game run were performed. - Checked the current open PRs; no direct-dispatch bound was already proposed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:47 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/79/head:github-bot/gh-79'
git switch 'github-bot/gh-79'

Merge

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