Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/459"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T21:02:33Z.
Refs #79, #357. Follow-up to #383, which gated indirect dispatches. This gates indirect draws.
The cause. Caught on preview
b3c1a1b0(M5 Pro 48 GB, Series S, headless,VICTORY_DEPTH_TWINS=0,VICTORY_PASSES_PER_BUFFER=1,VICTORY_TRACE_COMMITS=1), in 1 run of 5, at +230 s.6adfc332b21374b3/ pixel5d62a6c8f962e840).0x33800000is the same stale float another record of the run held in y and z (f4554457: [9, 864026624, 864026624]).What follows it.
Cmd queue … sleep … timed outevery 5 s, and the run ends with 43 time-outs and 1 out-of-memory.Why the memory stays stranded (#357).
in_flight=15 left=9.GPURestart type=213 s later, and the driver kept 18.75 GB until a reboot.So the stop on main gives memory back for waiting buffers, but not while the GPU is running work that never ends. Only not starting that work helps.
Change. Every indirect draw goes through the gate; counted draws, rectangle lists and mesh dispatches already did.
VICTORY_TRACE_GPU_FAILSstill shows what the GPU read.Also measured, in one clean run: #383's dispatch gate fired 25 times on other records, as read by the GPU:
8bed0aea,ffc12cdb,d8c23621);2fcb1ef0,3760b3db) and [22067255,1,1] (3214f4b1);43b08db3,71483b46,5e94fc8b,bdbb169a,52eff199).Their producers aren't identified yet. Every legitimate dispatch record seen is [n, 1, 1] (17,261 of 17,261, n ≤ 20,952).
Test: victory-metal
an_indirect_draw_past_the_most_instances_draws_nothing, which fails without the change.Checks: victory-hle, victory, victory-gpu, xtask and victory-metal tests pass (arm64). Windows clippy is clean with
-D warnings, andcargo xtask policypasses.Not done yet:
@LakshanSivakumar, this is ours, so it needs your approval and merge.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T22:03:37Z.
Verified in game: preview
b3c1a1b0+ the fatal-fault hook + this gate, 5 headless runs of 300 s each, Series S.draw 0 [3, 864026624, 0, 0], the very record that hung the Mac earlier, and the run went on and ended cleanly.Where the garbage comes from, still being traced. The record makers are correct. For example, compute
82d069c164aa731awrites x = (counter + 63) / 64 with y = z = 1. But their input counters, and sometimes whole record buffers, get foreign data: in one run, the whole 512-record buffer was overwritten in one go with vertex- or tree-like triples while a skinning/build pass ran.One host cause we found on main: heap buffer views held by one pool run aren't mirrored again when the title maps other pages under the same address. More than 2,048 such views really moved in one run. Following them didn't stop every garbage record, though, so we don't claim it as the fix yet. More soon.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-27T23:55:09Z.
@LakshanSivakumar merged current main (
86cefd22) into this branch; the code merged without conflict. One note on the docs: the86cefd22merge dropped the "most groups a record may ask for" paragraph of "ExecuteIndirect on the native host" (the #383 dispatch gate, whose code and tests are still on main). This branch restores it, updated for draws. Checked on the merge: victory-gpu and victory-metal tests pass (arm64), Windows clippy-D warningsclean,cargo xtask policyok. Ready for your review.