AGENTS.md: rule 3 names the exported surface's plane texture as the second exception

The owner allowed one more exception to optimal images, exactly a plane texture of an exported
surface: a linear image on the surface's own exported memory at the export's pitch and plane
starts, and the copy form of the same call, counted and recorded as a known gap, where the device
offers no such image or cannot meet the layout. The Shared-buffer exception is kept word for word.
Checked against Device::new_exported_surface as built: in place, each plane's image is bound to
the surface's exported memory (a dma-buf's per-plane import of it, or the opaque handle's one
allocation) at SurfaceExport::planes; otherwise SurfaceForm::Copy, counted in
Metrics::surfaces_copied, its gaps in the rt README.
This commit is contained in:
Anees Iqbal committed 2026-11-19 08:09:13 -08:00
1 parent 5b782cc68c
commit 441b9dbfd2
1 file changed
+8 -4
+8 -4
View File
@@ -67,11 +67,15 @@ order, and a lower one never overrides a higher one.
attachment feedback loop (a device without it reads a render target through a counted copy of
that target, recorded as a known gap). A second form chosen by anything else is not allowed.
3. **Native-like speed.** Structure decides speed: driver-owned memory, optimal images in real
layouts, direct addresses, nothing copied that Metal would not copy. The one exception to
optimal images is a texture over a Shared buffer: a linear image on that buffer's memory, in
the device's own layout, created so its first use keeps the bytes, with the alignment the guest
layouts, direct addresses, nothing copied that Metal would not copy. Optimal images have two
exceptions. A texture over a Shared buffer: a linear image on that buffer's memory, in the
device's own layout, created so its first use keeps the bytes, with the alignment the guest
reads from Metal's minimum linear texture alignment, and where a format query offers no linear
image for the format and usage, a counted copy at commit. The exception does not grow.
image for the format and usage, a counted copy at commit. A plane texture of an exported
surface: a linear image on the surface's own exported memory, at the pitch and plane starts the
surface's export states, and where the device offers no such image or cannot meet the layout
the consumer asked for, the copy form of the same call, counted and recorded as a known gap.
The exceptions do not grow.
4. **Small.** Every cache is bounded, every feature has one form, and anything unused is deleted.
**An accuracy note is logged, never fatal.** A precision note is recorded and announced, and the