Stability: bound direct compute dispatch work #79
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/79"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by space-de on 2026-11-24T21:18:52Z.
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 --checkpassed.cargo check -p victory-gpupassed.cargo clippy -p victory-gpu -- -D warningspassed.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.