Repository navigation
Conversation
…e was still being built: Ocarina of Time drops 222 over the first 1,200 frames after a load, where its foliage shows white mesh_tasks_draw leaves a draw out when mtk_pso returns nil, which it does until the background build of that pipeline finishes (nvn_geometry.inc, "its draws are left out until it is ready"). The sibling path counted and reported the same thing through mtl_geomesh_stats, but g_mtk_wait was only incremented, never read: nothing in the log said a frame was missing geometry, or how much. It is now reported beside the geometry mesh line, marked [RED] in the intervals that dropped a draw. Measured on an M1 Max, Ocarina of Time 0400486024DEC000 v131072, chain 3ee52af3ca18: 222 draws dropped over the first 1,200 frames, 4 by frame 1,500, 2 at a new area near frame 2,700, and 0 for the rest of a 5,100-frame run, while that run's 62 task / mesh pipelines took 57 ms to 5,356 ms each to build. The window matches when the foliage shows white after a load and when it stops; a depth pre-pass and a colour pass are separate pipelines and become ready at different times, so a pre-pass that is ready writes depth for geometry whose colour draw was dropped. That those pixels are these draws is not shown yet and the game note keeps it open. Checked: the host builds, test_docs.py, test_nsp_chain.py. No regress.py check --games run: this adds a log line and an accessor and changes no behaviour, and the harness has no baseline on this machine (regress.py list: three games, none recorded), so building one would have cost hours of shader builds for a change with no code path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Correction and credit: the paragraph above about mesh pipelines bypassing the pipeline archive reads as a finding of this PR. It is not. #1583 already documents it, and its
That settles the question this PR left open, that the fix is possible at all: Two more things a reviewer may want beside this:
This PR still only reports the drops. Nothing here changes behaviour, and the fix is left for the work on the archive path. |
…build-before-first-use a draw is dropped only when its pipeline fails, which is what g_mtk_wait now counts
What and why
mesh_tasks_drawleaves a draw out whenmtk_psoreturns nil, which it does until the background build of that pipeline finishes (dm/gfx/nvn/nvn_geometry.inc, "its draws are left out until it is ready"). The sibling geometry-mesh path counts and reports the same thing throughmtl_geomesh_stats, butg_mtk_waitwas only incremented, never read: nothing in the log said a frame was missing geometry, or how much of it. A whole-repo grep finds it at its declaration and its increment and nowhere else.This adds
mtl_mtk_statsand reports it beside the geometry mesh line, marked[RED]in the intervals that dropped a draw.What it measured, on an M1 Max, Ocarina of Time
0400486024DEC000v131072, chain3ee52af3ca18:That run built 62 task / mesh pipelines, each taking 57 ms to 5,356 ms. The window matches when this game's foliage shows white shapes after a load and when it stops: a depth pre-pass and a colour pass are separate pipelines and become ready at different times, so a pre-pass that is ready writes depth for geometry whose colour draw was dropped.
That those white pixels are these draws is not shown.
DM_NVN_SKIP_MESH=1cannot decide it — dropping both passes removes the depth write too, so the frame is simply short of foliage either way. Showing it needs the near-white share of shots taken inside the window (white.pyin this game's work folder, which was not available on the test machine). The game note keeps it open.Related, found on the way and not addressed here: mesh pipelines never look in the pipeline archive.
nvn_geometry.inc:434and:585build straight on the device, while the other path triesg_arch4/g_arch4pfirst, so these pipelines are rebuilt on every run and the window exists every time.Game note:
dm/games/0400486024DEC000/README.md, under Open. No reference entry: the mechanism is reported, not yet explained.Checked
dm/tools/tests/test_docs.py(11),dm/tools/tests/test_nsp_chain.py(17), and the host builds (make -C dm/host GAME=0400486024DEC000)0400486024DEC000v131072, about 15 minutes on the Mac over a 5,100-frame run, reading the new log line against thetask / mesh pipelinebuild times in the same logapplegpu_g13sscripts/regress.py check --gamesreport. This adds a log line and an accessor and changes no behaviour or code path.regress.py liston this machine shows three games, allbaselines: none, green: never recorded, so a run would first have to build baseline and candidate shader trees — hours per game. Flagging it rather than omitting it; say the word if it should be run anyway.Docs
python3 dm/tools/docs_symptoms.pywas run (no change: no reference entry was added)🤖 Generated with Claude Code