GPU: allow VICTORY_INDIRECT_GATHER=1 to work standalone without VICTORY_INDIRECT_WINDOW=1 #1068
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1070"
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 Claudinhomerq on 2026-11-25T18:25:26Z.
Summary
Allow
VICTORY_INDIRECT_GATHER=1(andalt) to batch single indirect draw records into the list's prelude even whenVICTORY_INDIRECT_WINDOW=0.Motivation
Right now
draw.rstieslist.gather_close()andlet gathered = ...directly towindowed(which includeswindows()):VICTORY_INDIRECT_WINDOW=0, every draw immediately closes gathering on the list andgathers()can never run.VICTORY_INDIRECT_WINDOW=1clamps ahead across consecutive argument slots, some titles/scenes (e.g., GTA VI interior cells) prefer keepingVICTORY_INDIRECT_WINDOW=0while still benefitting from batching individual indirect draws in a single prelude compute pass (VICTORY_INDIRECT_GATHER=1).What changed
eligible: non-dispatch,max == 1, no count buffer, no buffer-storing shaders) fromwindowed = windows() && eligibleincrates/victory-gpu/src/draw.rs(+5/-5 lines).list.gather_close()on!eligibleandgatheredonhit.is_none() && eligible && gathers().VICTORY_INDIRECT_WINDOW=1is unchanged: window hits still take precedence and any ineligible command closes gathering identically.Validation
cargo test -p victory-gpu --lib -- gathered_records warp_gathered_records --test-threads=1(2/2 passed on WARP)cargo check -p victory-gpuandcargo check -p victory-gpu --features diagnostics(0 errors)cargo xtask policy(asset policy: 181 files ok)VICTORY_INDIRECT_WINDOW=0+VICTORY_INDIRECT_GATHER=1: gathered up to 953 single indirect draws/frame in prelude (no_fit 0,too_many_bufs 0,set_full 0,no_buf 0), 0 crashes/TDR, 0 missing walls/geometry.Imported from fxceless/victory-fork. Originally posted by Dathinel on 2026-11-25T20:57:18Z.
One diagnostics issue for the proposed standalone mode at
6ce8cac: withVICTORY_INDIRECT_WINDOW=0,why_notis alwaysusize::MAX. A failed gather (or an ineligible dispatch) can then executeindirect::bound, but the subsequentwhy_not < WINDOW_WHY.len()guard skips the counter. Consequently the “a pass of ours for” total can read zero while inline clamp dispatches are still being recorded. This matters if comparing standalone gather with windows + gather.For a reproducible counter check, use a list with one eligible record and then one indirect dispatch with aligned arguments. With diagnostics on and window checking off, compare the gather hits and the independent “indirect commands bounded” counter. A separate count of successful inline clamps when windows are disabled would keep the denominator comparable without calling those commands window misses.
I applied the PR diff to our Series S test tree and built the diagnostics GPU tests on Windows.
gathered_records_must_fit_the_clamppassed. The counter observation is from the recording path; I have no standalone FPS measurement. AI-assisted (Codex).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.