gpu: serialize short indirect argument clamps #3937
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3937"
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 Marvisak/VIctory. Originally posted by Tigoniukas on 2026-12-01T16:33:50Z.
Summary
Use a single-lane serial path when clamping 2–8 indirect argument records.
This avoids group-wide synchronization overhead for small record counts while preserving record order and budget semantics.
Performance
Synthetic D3D12 GPU benchmark (median per call):
These are GPU operation timings, not game FPS improvements.
Validation
Scope
One file changed, 32 lines added.
No benchmark instrumentation or diagnostic code included.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T17:38:37Z.
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
Base
63bcca43c6a00a758510398fa43096ce7e4f7df0, headfe464e5087304901533aa7927e21c87683fd29db.git diff --numstat→ crates/victory-gpu/src/indirect.rs 32/0.The test is new on the base:
→ no match, exit 1.
git diff --check "63bcca43..fe464e50"→ no output, exit 0.Result:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 232 filtered out; finished in 1.10s.What the test actually pins, since the shader change itself cannot run here: it works through the host-side
clampedreplica of the short path for all four record kinds and checks (a) a 1<<24 cost clamps to the budget and leaves the remaining records zeroed, (b) four records of cost 7 each fill the budget exactly, (c) 3,1,1 at budget 8 runs all eight records on the leftover, (d) the same at a 10-record list stops at the budget. The one gap worth naming: theif (records > 1 && records <= 8)branch is HLSL, so these assertions cover the host model of that branch and the barrier removal is not exercised by a device here.No title memory, no device opened; GPU/driver N/A. No game data.
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.