You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 39cd7e6
Browse filesBrowse the repository at this point in the historyBrowse files
[avio] RenderTargetCache complete keys and miss telemetry
RenderTargetConfig keyed offscreens on extent, mip count, MSAA and
depth/stencil presence only. A request for another pixel format or storage
mode could therefore reuse a cached texture of the wrong format or storage
(latent: every current caller uses the defaults, so hit rates do not
change). The key now also carries the color format, the color and resolve
storage modes, and the depth/stencil format and storage, filled from the
request (format from target_pixel_format or the context default).
RenderTarget::ToConfig fills the same fields from the textures.
The cache becomes its own meter, TRACE/timeline only:
- RenderTargetCacheMiss instant per miss: w, h, msaa, format, ds, label and
a reason: no_entry, extent_mismatch (an unleased entry differs only in
extent), all_leased, aged_out (one of the last 32 keys that aging dropped,
i.e. unused for the keep-alive number of frames), disabled;
- RenderTargetCache counter when the size changes, with patch 46u's
accounting: entries, bytes (nominal) and real_bytes.
Nothing is logged. This fixes neither measured churn mechanism (gradient
SDF snapshots, per-Canvas aging); it attributes them.
Written to be offered upstream on flutter#190613: self-contained,
no Avio-only API.
Tests (impeller_unittests, RenderTargetCacheResourceTest, no GPU):
- KeyDistinguishesPixelFormat (expected red on the base: the F16 request
received the cached RGBA8 texture)
- KeyDistinguishesStorageModes (expected red on the base)
- MissReasonClassification (new API; red as a compile failure on the base;
aged_out comes from keep-alive 0 aging)
The playground CachesUsedTexturesAcrossFrames* tests are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: AVIO_PATCHES.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ already ancestors of the selected main target under their original commits.
82
82
| 46a | One transient attachment set per key on the single graphics queue | permanent resource-lifecycle correction (restores patch 11's one-entry-per-key pool; the incoming depth/stencil dependency is upstreamable) | partial: flutter/flutter#144617 recycles one onscreen set upstream |
83
83
| 46b | A transient set lives while an existing view holds its extent | permanent resource-lifecycle owner (ships only with Avio G2, which keeps a ShellItem's view across extent changes) | none — upstream frees with the swapchain |
84
84
| 46u | Report-only render-resource accounting | permanent diagnostics (internal C++ API, no ABI change) | none |
85
+
| 47 | RenderTargetCache complete keys and miss telemetry | upstreamable bugfix + diagnostics (offer on flutter/flutter#190613) | open: flutter/flutter#190613|
85
86
86
87
Patch #5 also owns the later exact empty-frame and global-request corrections:
87
88
global requests may not be consumed by a display-scoped frame; sibling-render,
0 commit comments