AGENTS.md: rule 2 lists unified memory and the attachment feedback loop as query-chosen forms

Owner rule 2 named five features whose query may choose a second form. The owner allowed two
more on 2026-11-18, relayed verbatim by the planner from the Telegram bot:

- "I allow it", answering whether unified memory, decided by the Vulkan device type, may be a
  query-decided form. That is the one-or-two-copies choice for Managed buffers that
  Device::has_unified_memory answers. It is decided by the physical device type alone, never by
  a vendor or device ID. The earlier sixth form (explicit pitch) stays dropped.
- "Wait never mind, copying is fine if the gpu/driver genuinely doesn't support it", reversing
  the typed refusal for attachment reads on a driver without the feedback-loop features. On
  such a device a draw that reads its own render target goes through a counted copy of the
  target, as the last form there, reported as a known gap. The Copies rule is unchanged: this
  is not leave for a copy on any device that has the feature.

The rt test that enforces rule 2 (tests::one_path) forbids identity names, environment reads
and policy types. It does not list the allowed queries, so it does not change.
This commit is contained in:
Anees Iqbal committed 2026-11-18 07:23:04 -08:00
1 parent e549310f7d
commit f0df30b6ba
1 file changed
+6 -3
+6 -3
View File
@@ -60,9 +60,12 @@ order, and a lower one never overrides a higher one.
limit and memory-type queries. Product code holds no vendor, device or driver ID, and no
runtime policy switch. A test enforces this for `metal2vulkan-rt`. One form means one form per
Vulkan capability: where the floor cannot require a feature, that feature's query may choose a
second form, for five features only: 16-bit floats, storage-image reads without a format,
64-bit atomics, 64-bit floats, and SIMD groups (the subgroup size range with its stages and
operations, and maximal reconvergence). A second form chosen by anything else is not allowed.
second form, for seven only: 16-bit floats, storage-image reads without a format, 64-bit
atomics, 64-bit floats, SIMD groups (the subgroup size range with its stages and operations,
and maximal reconvergence), unified memory (decided by Vulkan's physical device type alone:
one copy of a Managed buffer on an integrated or CPU device, two elsewhere), and the
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