d3d12: log what indirect mesh records hold #568
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/568"
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 brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T03:57:51Z.
Log-only, for anyone chasing mesh-draw losses (#232). Refs #533 (claimed there). It has run twice on a GPU, in
cpumode.Records of indirect mesh draws go to the host unbounded (
indirect.rsexecute_indirectchecks only that the buffer range fits), while the directdispatch_meshchecks the 65,535-per-dimension and 2^22 limits. I don't know that the title ever writes one out of range.What it does. With
TUXBOX_TRACE_MESH_RECORDS, it logs histograms of X, Y, Z per pipeline, stride and MaxCommandCount, out-of-range and all-ones counts, the first raw records, and the kinds in batches not seen complete at a device loss.1copies records after each draw,beforeahead of it,cpureads title memory once the batch has run and records no GPU work. Off, nothing is recorded.What it would show: Y or Z of 0, or an over-limit or all-ones count, would be a credible fault cause; a run through the loss with all three at zero, and little unread, would be evidence against it.
1andbeforebreak the host render pass and add barriers around each traced draw, so a run that doesn't fault in those modes says nothing; repeat it withcpu.Existing evidence, weakly against: an earlier trace of ours in eight runs had 89,452 ring entries, none out of range, and 137 GPU copies with Y = Z = 1. Those cover only the first 13,000 or so draws.
Result of two runs on an RTX 5090
10de:2b85, 620.70.10, GE-Proton11-14,cpumode. In the second the GPU was lost about 11 minutes into the world (Xid 13) while the records were being read: 393,498 of 211 kinds, none unread and none clipped, Y and Z 1 in every one, X at most 923, nothing out of range, all ones or odd, including the batches in flight at the loss. The first (84a, no loss, 216,633 records) says the same. So the records aren't the cause of that loss, at least as the title's memory held them when read;cpumode reads title memory after the batch, which a later write could have changed.Tested
12 unit tests, one on a device (llvmpipe);
python tuxbox.py check --no-gpupassed (10 of 10). The submit hook and the reading thread haven't been run.Not run: AMD in the game. At most 256 records per execution are copied; beyond that is counted as clipped.
Full
python tuxbox.py checkof568d3a8c(rebased ontoe5d2e913; no change in behaviour): RTX 5090 (10de:2b85, 620.70.10) 200 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 199 pass, 0 fail. GE-Proton11-14.Evidence: TuxBox check of
568d3a8c5c, no uncommitted changes, GPU 10de:2b85: 16 passed, 0 failed, 0 not runEvidence: TuxBox check of
568d3a8c5c, no uncommitted changes, GPU 1002:13c0: 16 passed, 0 failed, 0 not run🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:03Z.
Heads-up: main just landed a large cleanup (up to
e5d2e913), so this PR needs a rebase.rustfmt.toml).unwrap(), lossyascasts and undocumentedunsafeoutside tests.cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.The least painful way is to format your branch first, so the rebase only shows real changes:
Then run
python tuxbox.py check --no-gpu, which now includes the format step.If clippy flags something new:
Fromfor widening,TryFromfor narrowing, and a mask for bit fields.unwrap(): use?, orexpectwith the reason it can't fail.unsafeblock: it needs a// SAFETY:comment.CONTRIBUTING's "Code checks" section lists the commands. Thanks!
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T09:33:36Z.
Thanks, this was useful work: it answered its question. In your runs the result was negative, which rules this theory out for #232.
That's also why I'm holding it rather than merging. On main it would be about 1,100 lines plus hooks in a hot path (the submit path), for a diagnostic that has already said what it can and that nobody needs right now. The branch keeps it available: anyone chasing #232 can merge it locally, and if a new loss points back at this, we'll merge it then.
Feel free to turn it into a draft so it stays findable. I'll leave it open.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T14:50:22Z.
Closing: it answered its question with a negative result for #232, and the hot-path diagnostics aren't wanted on main. The branch stays available if it's needed again.
Pull request closed