Repository navigation
Conversation
|
Note: I couldn't run |
…es no attachment of its pass leaves fb_prepare after one look Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Snapshots: a draw that samples no attachment of its pass leaves fb_prepare after one look; the tile plan looks textures up only for attachments fb_prepare and fb_tile_plan looked up every fragment texture binding of every draw (a lock and a texture each, with a retain and release in the plan). A first pass over the bindings' serials under one lock returns for draws that sample none of the pass's attachments, and the plan takes a texture only for a binding that names one. Mac, BotW, snapshots on: about 12,020 -> 11,930 instructions a draw (11,030 with DM_NVN_FB_SNAP=0). On the depth rule (PR seedds#1917): the look names the colour attachments only, as fb_depth_rule settles the depth attachment before it; it keeps g_fb_dwrote, and a draw the depth rule gave a copy takes the long way. The instruction counts are from before the depth rule and were not measured again.
|
Rebased onto main (2e6edda) without conflicts, retitled to the Checked on this commit (M4 Max): host build, |
A draw that samples an attachment it writes reads the tile when it opens its pass too, not only in an open one: Breath of the Wild opens about 3.75 passes a frame with such a draw, each a full-size snapshot before (30,000 snapshots to 4 over 11,000 frames on an M4 Max) fb_tile_plan needed an open pass, since the tile-reading pipeline is named by the pass's formats, so a draw that met no pass took a snapshot: a full-size copy, where the pass it opens loads the same content into the tile. Breath of the Wild's 753d0169ae3ce4f0 and 84862343ae82c6fa read G-buffer targets they write and open their pass. The formats are now learned. The first draw of a program on a set of targets that opens its pass and samples an attachment it writes takes its snapshot, and fb_early_after notes the pass rp_begin_ex opened for it (64 entries, keyed by the two shaders and the targets). Later ones plan the tile read with those formats while no pass is open and are checked once the pass opens: a pass that differs (formats, size, slice-merged) is ended, the draw takes its snapshot through fb_prepare again and the pass reopens; three such passes and the entry plans no more. A clear still waiting becomes the pass's load action, so the tile holds the cleared content, as the snapshot does since b54968e. Where fb_depth_rule ends the pass before the plan, the draw counts as opening its pass. DM_NVN_FB_TILE_EARLY=0 turns it off. Measured on a fork that carries the change over an older main (413e880 plus the fork's commits), Breath of the Wild. M4 Max, 190% render scale, uncapped: snapshots 30,000 to 4 over 11,000 frames, GPU p50 5.99 to 5.56 ms and 6.9 to 5.9 ms in two alternated pairs, pictures the same. iPad Pro 13" M4, 120% render scale, target 120 fps: snapshots 150 a second to 0; GPU p50 10.88 to 10.77 ms and 11.62 to 10.90 ms, 75.9 to 75.6 fps and 70.7 to 74.7 fps in two alternated pairs (the iPad's runs drift with its temperature). That fork's fb_prepare returned early for a draw that samples no attachment of its pass (PR seedds#1469) and had no depth rule; here the plan itself notes only draws that sample an attachment they write. Checked: check_t_feedback, 293 checks under Metal validation, 0 failed, with new cases (nothing learned by a draw that writes no attachment it samples, the first pass-opening draw's snapshot and the noted pass, the next one's plan with no pass open and its pipeline, the GPU reading green and red that the opened pass loaded, a refused pass, the snapshot after it, no plan after three). The host builds for 01007EF00011E000, the iOS compile check has 0 of 262 failed, test_env_switches, test_docs, test_lint_c and test_architecture pass. Not run on this main: any game (regress.py check).
|
Now that this Mac has the chain lock's compiler (Xcode 27.2), regress.py check (full): CHANGEDBaseline
BOTW
|
With same-pass feedback snapshots on,
fb_prepareandfb_tile_planlooked up every fragment texture binding of every draw: a lock and a texture each, plus a retain and release in the plan.Now, before the tile plan, one pass over the bindings' serials, under a single lock, compares them with the pass's attachments. A draw that samples none of them (BotW: about 14 draws in 15) returns there with its write mask noted. Separately, the plan looks a texture up only for a binding that names an attachment the pass wrote.
Breath of the Wild, Mac bench (130%, snapshots on): about 12,020 down to 11,930 instructions a draw; no-inline profiles show
fb_prepare+fb_tile_planfalling from 187 to 131 samples. The picture is unchanged:t_feedbackpasses (193 checks), and per frame the snapshot counts (4 taken, 234 tile reads) match.