GPU: specialize the indirect argument clamp for single records #1016
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1016
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1016"
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?
@Lkxex on GitHub · 2026-11-25 16:18 UTC · original
Lkxex:perf/single-record-indirect-clamp→main· +151 −11 · 3 files · 1 commits · openThe latest frame breakdown reports about 2,400 indirect calls per frame that still run separate clamps with draw windows enabled, including about 960 compute calls and 1,000 scattered mesh draws. This targets the one-record calls that reach the inline clamp, including pipelines that are ineligible for draw windows.
With VICTORY_INDIRECT_SINGLE=1, one-record calls use a one-thread variant of the existing shader. Both variants share argument decoding, bounds checks and record writes. The specialized shader drops group-memory synchronization and the lane scans, and preserves the saturating atomic budget charge, mesh diagnostics, padding, count-buffer rules and D3D12 barriers. Larger calls and windows continue through the group shader. The switch defaults to off and falls back to the group shader if compilation fails.
RX 6600, 3,200 synthetic indirect draws, GPU timestamp medians of nine samples per case, device-local budget and identical barriers in both cases:
The benchmark includes the clamp and tiny graphics draws. These figures describe the synthetic workload. A game run and NVIDIA measurements are pending.
The diagnostics indirect suite passed 14 tests on Windows with VICTORY_D3D12_DEBUG=1 and VICTORY_INDIRECT_SINGLE=1. The new WARP parity test compares scratch and all three budget words across draw, indexed draw, dispatch and mesh, including a zero count, exact budget fit, saturation, and an unfilled ahead record. The ignored timestamp benchmark also passed on the hardware adapter.
Related: #1001 reduces the number of clamp passes for compatible prefixes. This change reduces the cost of a clamp that runs individually.
AI-assisted.
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.Merge
Merge the changes and update on Forgejo.