feat: VICTORY_INDIRECT_RAW=3 clamps in the prelude what it can and draws only the rest raw #308
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!308
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-308"
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?
@Skyfrye on GitHub · 2026-11-26 02:05 UTC · original
Skyfrye:nep/indirect-raw-ahead→main· +80 −12 · 1 files · 1 commits · openChange
A new value of an existing switch:
VICTORY_INDIRECT_RAW=3. With2(the launcher's set) every single indirect record goes to the card as the title wrote it. With3, a record that the list's prelude can clamp (a single record without a count buffer, which nothing the list recorded before may write: the existingclamp_aheadpath) is clamped there, and only the others are drawn raw. Without the switch, and with1and2, records go as before.The way a record goes is now one small function,
draw::route(raw, raw_ahead, rawable, aheadable)→Raw,AheadorInPlace, used byState::execute_indirect. Where a record is drawn raw whatever the answer (2), the prelude check is not asked, so2costs nothing more than before.Why: with
2, the card hung as the title entered the world in about half the runs ofmainhere:host GPU device removed after 35 submissions sent ahead (VICTORY_RELAY=1) of 275 lists, the same numbers every time,DXGI_ERROR_DEVICE_HUNG, NVIDIA event 153. Device-removed data (DRED) showed a list stopped at command 102 of 283, inside a run of 75ExecuteIndirectcommands between two barriers. With noVICTORY_INDIRECT_RAW(every record clamped) no run hung, but the frame rate fell to about 10 fps: some 2,200 records a frame were clamped ahead in the lists' preludes (one pass for many records) and 4,300 in place (a dispatch of ours between two waits each), the second kind being the cost.Verification
Windows 11 26300, Rust 1.98.1 (MSVC), RTX 5080, Ryzen 7 9800X3D, on upstream
mainatc4c93bd, fromthird_party/victory:The 3 failures are the same on
mainwithout this change:descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewed,indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slots,indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_others.New tests:
with_3_records_clamped_ahead_are_not_drawn_raw(fails without this change:routeand its mode do not exist) andwith_2_and_without_the_switch_records_go_as_before(the old routes).In the world, my copy of the game, launcher fast set, runs of 240 s with the window left alone (the player moves), all on 2026-11-26:
VICTORY_INDIRECT_RAW=2(launcher)VICTORY_INDIRECT_RAW=3, with PRs #278, #279, #291, #292, #307In the
3runs, per frame: 585-1,714 records clamped ahead, 363-390 in place, 2,581-4,060 drawn raw. The first four3runs came right after the translator changes of #277: the pipeline library was rebuilt and the driver recompiled the new shaders in the background (#307), which is what held them at 10-14 fps. The next four, with both caches warm, ran at 17.2-17.8 fps, the frame rate of2in the runs that did not hang. In all,3hung in 0 of 8 runs, where2hung in 11 of 20; no run of either had an exception in the title.What this does not do: say why the records are garbage at that moment. Whatever writes them, a record clamped ahead is bounded before the card reads it.
Not changed here: the launcher's set (
2). If this holds up, a launcher PR can move it to3.Oracle and test data
No game file. The device-removed report and counts come from my own runs of my copy of the game; no game code, address or dump is in this PR.
Checklist
E_NOTIMPL), never a fake success. (Nothing unimplemented here.)AI assistance: written with Claude Code. Claude Opus 5.5 ran the crash bisection and the device-removed captures, wrote the change and its tests, and wrote this description.
🤖 Generated with Claude Code
@mauroalvare on GitHub · 2026-11-26 02:35 UTC · original
Independent NVIDIA and WARP validation
I ran the same synthetic test-only patch at base
c4c93bdc413191a9dc909998d2d53080a3f0c880and exact PR head1afeb0e24533e4838693114a899803f20fabd3d5. Windows x64 build 26300, Rust 1.98.1 MSVC, RTX 5070 Ti driver 621.40. The probe verified DXGI vendor0x10deon the RTX and0x1414plus the software flag on WARP.The probe registers a CPU-populated indirect argument buffer and calls VIctory's
draw::State::execute_indirecttwice. The first call is a single non-indexed draw. The second uses a count buffer of 1 with room for 2 valid records.Host::executesubmits the runtime prelude and command list. The probe checksCLAMPSper call, then resolves D3D12 pipeline statistics after the fence.32(launcher default)Both adapters produced identical results. Across all 12 runs, the two queries returned 3 and 6 IA vertices and 1 and 2 primitives. The count buffer therefore limited the second call to its first record. No cases skipped. The PR's two
route_testsalso passed. GitHub Actionstestspassed at this head (run #685). The evidence here covers synthetic routing and draw output.Reproduce with the synthetic test patch
Save the diff below as
pr308-probe.patchand apply it from the repository root withgit apply pr308-probe.patch. Run fromthird_party/victory.For WARP set
$env:VICTORY_D3D12_WARP = '1'. For the controls, setVICTORY_INDIRECT_RAWto2or clear it, with a fresh process per run.QA and the synthetic reproduction were prepared with OpenAI Codex assistance.
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.