Indirect: raise the list budget from 2^27 to 2^30 (valid records were emptied in 248 of 509 s of play) #72
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/trustno1-coder--VIctory-NVIDIA!72
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-72"
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?
@exotiquee on GitHub · 2026-11-27 16:14 UTC · original
exotiquee:indirect-budget-2-30→main· +51 −21 · 4 files · 1 commits · openThe per-list indirect budget (
BUDGET = 1u << 27in the clamps inindirect.rsandindirect/batch.rs) empties valid draws and dispatches in normal play. This PR raises it to1u << 30.Evidence
Measured on an RTX 5080 with a Ryzen 7 9800X3D, using a downstream build that has the same clamp shaders and a per-second counter of records emptied by the budget (the same data as
BUDGET_NOTES[0]inhost.rs):Why 2^30 is still safe
The budget is a hang guard for records the title never wrote. It is not a console limit, since the console runs every record. The per-record limits already empty the known garbage before the budget is involved: 2^23 vertices per instance, 2^26 per draw, 2^20 groups per dispatch, and unfilled window slots.
At 2^30, a list that spends its whole budget on garbage is about 1,000 million vertex-instances or threads. That is roughly 0.2-0.5 s of card time, still under the 2 s TDR limit. The 32-bit sums in the clamps stay safe:
next + cis only computed afterBUDGET - next >= cholds.Changes
BUDGETgoes from1u << 27to1u << 30in both clamp shaders (indirect.rsSOURCE,indirect/batch.rsSOURCE).draw.rscomment and the diagnostics log line (2^27->2^30) are updated to match.indirect/bench.rsOLD_SOURCEis left as it is, because it is the old clamp the benchmark compares against.BUDGET(plusMOST_RECORD = 1 << 26). A new test checks that both shader sources are compiled with that value.warp_budget_saturates_without_wraparound_and_preserves_draw_fields:BUDGET / 2^26records are kept instead of 2.host_list_budget_starts_empty_at_each_submission: now usesBUDGET / 2^26records of 1024x1024 groups, which fill the budget exactly. The test no longer depends onVICTORY_INDIRECT_REST.warp_batch_charges_every_execution: the cases are scaled to the new budget. The over-budget single-record case expectsBUDGETwithVICTORY_INDIRECT_REST=1and 0 without it, so the test passes either way. This overlaps with #67, which fixes the same two tests by forcing REST on. Either approach works, and I'm happy to rebase on whichever lands first.Not verified here
I could not run the test suite on this machine. The changed tests are WARP / host D3D12 tests in
victory-gpu, so please runcargo test -p victory-gpu indirect::before merging. The runtime change is the two shader constants.To check this in play, use the existing "records a frame ran empty for want of their list's budget" figure in the frame line (
BUDGET_NOTES). With 2^30 it should stay at 0. If a title ever asks for more, the "largest cost" figure next to it shows by how much.🤖 Generated with Claude Code
@Dukestar69 on GitHub · 2026-11-27 16:30 UTC · original · approved these changes
LGTM — verified on Windows (RTX 5090 + WARP):
cargo test -p victory-gpu --lib indirect::passed (30/30, includingthe_clamps_are_compiled_with_the_tests_budget,host_list_budget_starts_empty_at_each_submission, andwarp_batch_charges_every_execution)cargo xtask policypassed (279 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@FIJI1299 on GitHub · 2026-11-27 16:37 UTC · original
Tested commit
96fc904with 0 errors on theindirect::test suite.System Specifications
Test Suite Results (
cargo test --locked -p victory-gpu indirect::)All 30 unit / WARP / host D3D12 tests in
indirect::passed:(Note: Verification was limited to the
indirect::test suite; in-game testing was not performed.)🤖 Generated with Gemini
@exotiquee on GitHub · 2026-11-27 17:54 UTC · original
Correction to the evidence above: the 248-of-509-seconds figure was measured on a downstream tree with different defaults (1440p scene, water light on), not on this repo's defaults. On a run of this repo's main with its default settings (RTX 5080), the existing counter reads
0.00 indirect records a frame ran empty (2^27)in every one-second line. So on current defaults the budget does not appear to be hit; the raise only matters for configurations that render more indirect work (e.g.VICTORY_WATER_LIGHT=1). Happy to close this if you prefer to keep 2^27 until someone reproduces run-outs on this tree.@1tsethan on GitHub · 2026-11-27 23:00 UTC · original
Independent Windows validation of PR #72.
Tested commit:
96fc90418897864ad56911eb9e978b616aabb872.cargo test --locked -p victory-gpu indirect:: -- --nocapture --test-threads=1Exit: 0.
Independent verification with OpenAI Codex assistance. Windows 11 Pro build 26200; Rust 1.98.1 MSVC; Windows SDK libraries from Microsoft.Windows.SDK.CPP.x64 10.0.28000.2957. Test harness used an RTX 3070 Ti / AMD integrated-GPU host; adapter identity was not captured for every test. These are focused checks on the stated PR commit, not gameplay, FPS, or a merged-main integration result.
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.