rt README: the no-copy imports have no read-only form; the ledger lists Metal's bit 24 as that gap

The planner's ruling on Metal's private read-only no-copy option (bit 24 of MTLResourceOptions):
no options word, no new Gap. Instead, one README sentence in Imported blocks and a ledger row
citing it.

Each clause was checked before it was written:
- import_host_memory's safety contract takes "host memory mapped readable and writable"
  (import.rs).
- Vulkan's host-pointer import (VkImportMemoryHostPointerInfoEXT: sType, pNext, handleType,
  pHostPointer) and its fd import carry no access of their own; the spec's Host External Memory
  section defines no read-only import.
- MTLResource.h's MTLResourceOptions has no bit 24: its fields are the CPU cache mode at shift 0,
  the storage mode at 4 and hazard tracking at 8.
- Over imported pages a GPU write reaches them (the import is the pages, no copy), where Metal
  drops it (host_pages.rs, the M3 Max recordings).

The rows: host-page-writes-kernel-store-read-only and host-page-writes-visibility-read-only, both
refused at case/host-buffer with the Side's Unavailable naming the call with bit 24, venue *. The
same answer was held on all eight runs: lavapipe m3-max-52171; XTX, 2080 and 780M m3-max-52173;
780M and 3090 m3-max-52172; Iris Xe m3-max-52174; RX 550 m3-max-52305.
This commit is contained in:
Anees Iqbal committed 2026-11-19 07:05:23 -08:00
1 parent 0c2826fb09
commit d4d1b5ff05
2 files changed
+10

No files matched your search

@@ -1823,3 +1823,8 @@ vertex-format-uint4 * refused case/MTLVertexFormatUInt Err(Error::Unsupported("a
vertex-format-uint4 * refused case/MTLVertexFormatUInt2 Err(Error::Unsupported("a render pass with NoAttachment is not built")) Gap::RenderPass (NoAttachment): the rt README, Known gaps of render encoders, "Refused by `Gap::RenderPass`, naming its `RenderPassKind`: ... and a pass with no attachment".
vertex-format-uint4 * refused case/MTLVertexFormatUInt3 Err(Error::Unsupported("a render pass with NoAttachment is not built")) Gap::RenderPass (NoAttachment): the rt README, Known gaps of render encoders, "Refused by `Gap::RenderPass`, naming its `RenderPassKind`: ... and a pass with no attachment".
vertex-format-uint4 * refused case/MTLVertexFormatUInt4 Err(Error::Unsupported("a render pass with NoAttachment is not built")) Gap::RenderPass (NoAttachment): the rt README, Known gaps of render encoders, "Refused by `Gap::RenderPass`, naming its `RenderPassKind`: ... and a pass with no attachment".
#
# Metal's private read-only no-copy option (MTLResourceOptions bit 24), which the no-copy imports
# have no form of, refused alike on every venue run.
host-page-writes-kernel-store-read-only * refused case/host-buffer Err(Unavailable({call: "newBufferWithBytesNoCopy:length:options:deallocator: with MTLResourceOptions bit 24"})) No read-only no-copy import (MTLResourceOptions bit 24): the rt README, Imported blocks, "The no-copy imports have no read-only form: ... over pages a consumer imports, a GPU write reaches them, where Metal drops it."
host-page-writes-visibility-read-only * refused case/host-buffer Err(Unavailable({call: "newBufferWithBytesNoCopy:length:options:deallocator: with MTLResourceOptions bit 24"})) No read-only no-copy import (MTLResourceOptions bit 24): the rt README, Imported blocks, "The no-copy imports have no read-only form: ... over pages a consumer imports, a GPU write reaches them, where Metal drops it."
Can't render this file because it is too large.
+5
View File
@@ -364,6 +364,11 @@ first, and what to do where both refuse, is the consumer's.
Each call returns the block and the index of the memory type it imported into, and refuses before
any allocation is attempted.
The no-copy imports have no read-only form: `import_host_memory` takes pages mapped readable and
writable, and Vulkan defines no read-only import. Metal's private read-only option (bit 24 of
`MTLResourceOptions`, not in the public header) so has no counterpart here: over pages a consumer
imports, a GPU write reaches them, where Metal drops it.
The two rules differ because a failed dma-buf import is not harmless: on NVIDIA's Linux driver
(620.70.06, an RTX 3090) one failed dma-buf import into a later type the query offered broke every
later allocation of that type, the Shared type among them, so the dma-buf rule attempts nothing it