🔧 The animation probe forces layer promotion rather than hinting it, because the hint left the instrument bimodal by 24%

Component: scripts/sustained-animation-probe (host-side probe page; no device
code touched, no pathway-specific behavior).

What changed
------------
`anim.html`'s eight bands were promoted to composited layers by
`will-change: transform`, which is advisory — a compositor is free to decline
it. Ten driven macos-13 boots of one pinned binary, same snapshot, same probe,
same quiesced host, split into two tight clusters and landed nowhere between
them: 417.9-429.0 draws per presented frame against 267.7-268.5, and a
`present_hz` median of 39.1-41.7 against 49.0-50.6. Eight of ten drew the first.
Which cluster a boot drew was uncorrelated with the constant under test.

That 24% gap is larger than any device effect measured against this probe, so
the instrument could not resolve a real 17% change, and would credit the cluster
to whichever arm happened to draw it. That is not hypothetical: a cap sweep read
as a clean curve with a peak, and the repeat of one arm disagreed with itself by
more than the whole spread.

So the page stops hinting. `.band` carries `backface-visibility: hidden` and
`tick()` writes `translate3d(x%, 0, 0)` in place of `translateX(x%)`.

Both halves are load-bearing, and this is the trap in the obvious fix: `tick()`
assigns `style.transform` every frame, so a `transform: translateZ(0)` written
into the CSS rule is overwritten on the first frame and the change reads as
having been made while doing nothing. The 3D transform has to be in the JS.

Why this is the collapsed cluster's cause
-----------------------------------------
A band that is not promoted is repainted into its parent rather than composited,
which is fewer and larger draws — matching the collapsed cluster's 1.57x lower
draws per frame, its higher `draw_cover_loaded_partial_scissor` share, and its
*higher* present rate on *fewer* draws. It is the guest asking for less work per
frame, not this device delivering more.

Verification
------------
Not verified. This is a hypothesis about why the clusters exist, implemented;
the reading that confirms it is three driven macos-13 boots all landing in the
promoted cluster, and it has not been taken yet. A follow-up commit carries the
result and retracts this if the split survives.

No Rust changed, so no clippy arm, feature matrix or test run applies. Boots
taken before this commit are not comparable to boots taken after it, whichever
way the reading goes.

`drain_duty draws` over `window_publish fresh` remains the discriminator, and
AGENTS.md still says to classify a boot before comparing two — this narrows what
the classification has to reject, it does not remove the need to look.
This commit is contained in:
Anees Iqbal committed 2026-08-11 03:36:38 +03:00
1 parent b6a4e4f6dc
commit 4506c690eb
2 files changed
+47 -7

No files matched your search

+30 -3
View File
@@ -55,9 +55,36 @@ and the guest rails have no reason to have working DNS. Override the port with
Everything the page draws steps per *frame*, never per wall-clock millisecond,
so a slow boot and a fast boot draw identical content per frame number and
differ only in how many frames they complete. It loads both rails that matter:
eight `will-change` layers the window server composites separately, and a canvas
repainted every frame so texture content is uploaded rather than only
re-composited.
eight layers the window server composites separately, and a canvas repainted
every frame so texture content is uploaded rather than only re-composited.
## Layer promotion is forced, because a hint made the probe bimodal
`will-change: transform` is advisory. Ten boots of one pinned binary — same
snapshot, same probe, same quiesced host — split into two tight clusters with
nothing in between:
| | promoted | collapsed |
|---|---|---|
| draws per presented frame | 417.9 – 429.0 | 267.7 – 268.5 |
| `present_hz` median | 39.1 – 41.7 | 49.0 – 50.6 |
Eight of ten landed in the first. Which cluster a boot drew was uncorrelated
with anything under test. The **24 %** `present_hz` gap is larger than any
device effect yet measured against this probe, so a sweep that mixes clusters
cannot see a real 17 % change and will credit the cluster to whichever arm drew
it. Within a cluster the counters reproduce to a fraction of a percent, which is
what makes three boots per arm enough.
So the page no longer hints. `.band` carries `backface-visibility: hidden` and
`tick()` writes a `translate3d`, which together take the decision out of the
compositor's hands. **Both halves are load-bearing**: the CSS rule cannot carry
the 3D transform, because `tick()` overwrites the inline `transform` every
frame, and a CSS-only fix would be silently discarded.
`drain_duty draws` over `window_publish fresh` is still the discriminator, and
checking it stays worthwhile — it is how you find out this stopped working.
Boots taken before this change are not comparable to boots taken after it.
## What it does not do
+17 -4
View File
@@ -19,12 +19,23 @@
<title>reims-vgpu sustained animation</title>
<style>
html, body { margin: 0; padding: 0; background: #101014; overflow: hidden; }
/* Full-viewport bands, each a separately composited layer: `will-change`
promotes them so the window server composites N surfaces per frame rather
than repainting one. That is the shape this device serves. */
/* Full-viewport bands, each a separately composited layer, so the window
server composites N surfaces per frame rather than repainting one. That is
the shape this device serves.
Promotion is forced, not hinted. `will-change: transform` alone is advisory
and the compositor may decline it: ten boots of one binary split into two
tight clusters, ~420 draws per presented frame and ~268, with a 24 %
`present_hz` gap between them and nothing in between — larger than any
device effect measured against this probe. The collapsed cluster is bands
repainted into their parent instead of composited. `backface-visibility`
here plus the 3D transform in `tick()` take the promotion out of the
compositor's discretion. Both halves are required: this rule cannot carry a
`transform`, because `tick()` overwrites the inline one every frame. */
.band {
position: absolute; left: 0; width: 100%; height: 11%;
will-change: transform;
backface-visibility: hidden;
}
.box {
position: absolute; top: 8%; height: 84%; width: 12vh;
@@ -82,7 +93,9 @@ function tick() {
// band count so the layers never line up into one repeating composite.
const dir = b % 2 === 0 ? 1 : -1;
const x = dir * ((phase * (b + 3)) % 1) * 100;
bands[b].style.transform = `translateX(${x}%)`;
// `translate3d` and not `translateX`: the 3D form is what keeps the band on
// the composited path every frame. See the `.band` rule above.
bands[b].style.transform = `translate3d(${x}%, 0, 0)`;
}
const w = ctx.canvas.width, h = ctx.canvas.height;