One work packet, landed as 2 commits (6e5d7acfc7..6c8a857d8b on archive/development-linear-2026-10-28), in order:
* Take IdPlacement::Outside for a texture over the caller's VkImage
`Device::new_texture_with_vk_image` now accepts `IdPlacement::Outside`,
the runtime extension `Device::new_texture` already takes for a caller's
helper texture: the placement check is skipped for Outside, and
`Texture::made` (already handed `IdUse::Program(placement)`) takes no ID
and holds no slot. The wrapped path otherwise behaves as before; it still
takes no device sampler ID at any placement.
Why: the consumer wraps its swapchain images with this call. Refused at
Outside, it had to give them `Any`, so they took texture resource IDs and
a guest's textures' `gpuResourceID` and `uniqueIdentifier` started past
them while a window was open: the guest's answers depended on whether a
window existed. At Outside the program's textures are numbered as with
no window.
Docs: `IdPlacement::Outside`, the resource-ID module docs,
`check_texture_placement`, `Problem::OutsidePlacement`,
`TextureDescriptor::placement`, the call's own doc (which now says it is
a runtime extension and how it places the texture), docs/API.md and the
runtime README. docs/REFUSALS.md regenerated (the OutsidePlacement row's
wording). No public signature moved (`signatures.py --check` passes).
RUNTIME_VERSION 1647: a call that was refused now makes a texture, which
the version's rule ("a refusal or its class") counts as a behaviour
change. runtime-sources.sha256 follows the edited runtime files.
Test: `presenting::a_callers_image_placed_outside_takes_no_id` (device
lane). After a reservation of 20000, a plain texture takes 20001 on a
device with no caller's texture; a caller's texture placed Any takes
20001 itself and moves the plain texture to 20002; one placed Outside
answers 0 and the plain texture takes 20001. Placed Outside before the
reservation it starts no space (the plain texture still takes 20001),
and a clear of it is what a blit copy of it reads.
Verified, on this Mac (Apple M3 Max, MoltenVK, --cfg m2v_gpu, under
the shared GPU lock): the new test passes and prints "the plain texture
after a reservation of 20000 answers 20001 with no caller's texture;
(Some(20001), 20002) after one placed Any; (Some(0), 20001) after one
placed Outside". With the old unconditional placement check put back it
fails: new_texture_with_vk_image returns
Invalid(OutsidePlacement). Also passing in the same run: every
presenting test, resource_ids::an_outside_texture_takes_no_id, and the
runtime-sources guard. clippy -D warnings for metal2vulkan-runtime
(all targets, all features) plain, and for metal2vulkan-runtime and
metal2vulkan-validation under --cfg m2v_gpu; runtime rustdoc with
-D warnings; the refusal_surface, api_surface and api_signatures tests.
* Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
One work packet, landed as 2 commits (86ec320bae..8485bc6865 on archive/development-linear-2026-10-28), in order:
* Take sampled textures over host pages in place where the device's check passes
A 2D texture (or array) over host pages is now a linear image aliasing those pages, with no shadow,
when all of these hold:
- its declared usage only samples or reads it (no RenderTarget, ShaderWrite or ShaderAtomic);
- the pages are a no-copy buffer's, imported by their pointer or as dma-bufs, or a buffer the
runtime placed in fresh pages;
- a startup check shows that, on this device, the image's first move keeps every byte while the
CPU writes beside it.
Vulkan makes such an image start UNDEFINED (VUID-VkImageCreateInfo-pNext-01443) and lets the move
read and write every byte bound to it. Relying on the driver here, once checked, is the owner's
ruling ("In place, trusting the driver"): a deliberate, scoped exception, recorded in FAST-PATHS.
The switch is DevicePolicy::host_page_textures:
- HostPageTexturePolicy::InPlace is the default.
- HostPageTexturePolicy::Shadow is the exact form, which exact_answers() selects. Under it every
such texture stays a shadow and no check runs.
The check (in_place_check.rs):
- It runs on a thread of its own, started by the first texture that asks, per class of pages:
pointer imports, fresh pages and dma-buf imports. On a Unix target the dma-buf class uses an
exported allocation of the device's own.
- Each class tries 11 shapes, 3 rounds each, through the product's own Buffer::new_texture:
- packed rows of 1, 2, 4, 8 and 16-byte texels;
- rows with bytes between them, for the same texel sizes;
- one 3840x2160 surface.
A shape the device makes no image of is skipped, as the product makes none either.
- A writer thread writes the pattern's complement through texels, the bytes between rows and the
bytes after the image while the move runs. Every byte is then compared.
- The pattern is a 4099-byte prime period, so it lines up with no row, page or texel. The window
is filled by copies and compared written bytes first, then a period at a time. That makes the
33 MB surface cost about 11 ms a round in release.
The verdicts are kept as one record in the shader cache's content store:
- The record is named by vendor, device, driver ID, version, name and info, the UUID, the check's
kind and version, and RUNTIME_VERSION.
- It is checksummed. A bad, partial or other-version record counts as none: the check reruns and
overwrites it.
- With no cache directory, the check runs once per process.
- A forced failure (DeviceOptions::fail_in_place_check, a hidden test hook) keeps nothing.
Every texture that still takes a shadow announces why (shadowed-texture) and is counted by cause:
- the policy;
- usage that renders or writes;
- check pending, failed or unchecked;
- refused: rows, detached, image, pitch, placement, the dma-buf source, other dma-buf reasons.
WorkCounts also counts the in-place textures by class and pitched images, and the check's runs and
verdicts.
How an image in place is made, used and visible:
- Pointer and fresh pages take a linear image made for host allocations at Metal's pitch, or a
DRM_FORMAT_MOD_LINEAR image at an explicit pitch over the host allocation where the driver makes
one. Dma-buf pages take the modifier image over a dma-buf of the texture's own pages.
- A rebind remakes these images like the others.
- A write or pass beyond the declared usage goes through the existing usage shadow and attachment
stand-in.
- A CPU write reaches the image's commands as it reaches the buffer's (Host Write Ordering
Guarantees).
RUNTIME_VERSION 1643 -> 1644. The runtime-sources pin is left for the landing.
Check duration, Apple M3 Max on MoltenVK 1.4.2:
- 75-78 ms in release: Pointer and Fresh passed; DmaBuf unchecked, as there are no dma-bufs on
macOS.
- 1.76 s in a debug build.
- The first version took 4.1-4.2 s in debug, almost all of it the 3840x2160 shape's per-byte
hashed fill (240 ms) and compare (461 ms) per round, times 3 rounds and 2 classes; the GPU move
itself took 0.15-3 ms.
- Nothing was dropped from the check. The 64x64/256 shape became 64x16/256, and packed shapes of
each texel size were added, because MoltenVK takes no padded pitch: the first version made only
4-byte images there.
Verified on the M3 Max (debug lanes, --cfg m2v_gpu):
- in_place_textures, all five tests:
- the path follows the check, and an event-held CPU write after the commit is read;
- a kernel write and a pass beyond the usage go through their shadows and keep the image;
- a forced failure keeps the shadow and no record; the next device runs the check, and the one
after recalls three verdicts and checks nothing;
- the costs.
- first_use_writes under both settings: 1920x1080/7680 in place, 0 of 542 writes undone.
- no_copy_textures read/write under both settings: ShaderRead-only textures in place at packed
rows, the rest shadows.
- pitched_surfaces, including the new _in_place variants of the only-reads and read-only-pages
tests.
- The runtime and translator suites passed (4971 tests), with clippy plain and under --cfg m2v_gpu.
Cost on the M3 Max, release, median GPU time per command buffer, in place against shadow:
- 3840x2160, one pass reading a 32-row strip: 492 against 553 us.
- 1920x1080 strip: 457 against 452 us.
- 1920x1080 whole: 393 against 466 us.
- 1920x1080, three whole passes: 566 against 545 us.
Untested here: RADV, lavapipe and the dma-buf class, which follow; ANV and NVIDIA have no venue
now.
* Re-pin the runtime sources at the landing tip
The landed packet changed a runtime-sources input, so the committed digest no
longer described the sources and `the_runtime_sources_are_the_committed_ones`
would fail. Recomputed over the same inputs and committed by land-pkt.sh.
The steps this packet landed as, in order:
- Re-pin the runtime sources at the landing tip
Content: the tree of `development` at ae7ed9fa17, unchanged.
The steps this packet landed as, in order:
- Bless the surface and the API guide for the kernel's narrowed inputs
- Re-pin the runtime sources at the landing tip
Content: the tree of `development` at 3eefc94c48, unchanged.
The steps this packet landed as, in order:
- Bless the surface for the shared-queue counter and correct three doc claims
Content: the tree of `development` at 087149c5b8, unchanged.
The steps this packet landed as, in order:
- Write a creation's shader cache entries on the device's cache thread
Content: the tree of `development` at 1ff199a2eb, unchanged.
The steps this packet landed as, in order:
- Name BGRA4Unorm's packed-16 attachment and its color input in the API guide
Content: the tree of `development` at ebd18b3408, unchanged.
The steps this packet landed as, in order:
- Hold docs/API.md's degrade-notice catalogue to the notices' declarations
- Bound how far a refused IOSurface plane's rows overlap
Content: the tree of `development` at 3e9ba52013, unchanged.
The steps this packet landed as, in order:
- Give a render command for a buffer of dispatches beside draws, as Metal does
Content: the tree of `development` at aec2582c90, unchanged.
The steps this packet landed as, in order:
- Hold a heap texture's offset to Metal's alignment where its image lies apart
- Read each pipeline's own loop notice, and Metal's own pitch for a turned plane
- Take Metal's depth denormal as a zero where the device announces the loss
- Expect the memory notice and allow a late calibration one on a discrete chip
- Recompute the runtime-sources pin for the heap, derivation and lane wave
Content: the tree of `development` at 3d3c01150f, unchanged.
The steps this packet landed as, in order:
- Say in the ledger that the ASTC heap size query answers
- Make the holding rule a named function and hold it to a table
Content: the tree of `development` at 74da346075, unchanged.
The steps this packet landed as, in order:
- Hold the fresh-pages test to the runtime's per-class rule
- Re-derive the generated documents for the ledger edits
Content: the tree of `development` at 2be69bf102, unchanged.
The steps this packet landed as, in order:
- Say in the refusal surface what a 16-bit depth copy really waits on
- Copy a multisampled 16-bit depth, which plain Metal copies exactly
Content: the tree of `development` at 688b62deab, unchanged.
The steps this packet landed as, in order:
- Keep a compile that the specialized read refuses, and sweep the fixtures
- Regenerate the refusal surface for the moved plan_one line numbers
- Say correctly which arguments may_write rules out
- Say which AIR field the writability answer actually reads
- Answer a state's texture-slot accesses from its slot writes, and stop keeping refusals
Content: the tree of `development` at 117a9ddbf7, unchanged.
The steps this packet landed as, in order:
- Say in the lane's docs which notice announces the subgroup gap
- BREAK: flip the grouping assertion to prove it fails
- Restore the grouping assertion, and say what a narrow subgroup answers
- Measure what the clamp-to-zero columns read just below zero
- Flush a subnormal coordinate on a constexpr border axis, as Metal does
- Flush the coordinate on every path a sampling reads it
- Record the extended-range sibling of the subnormal flush, and doc the rule
- Bump SEMANTICS_VERSION for the subnormal flush
- Re-bless the golden tables after the subnormal border flush
Content: the tree of `development` at dad3270155, unchanged.
The steps this packet landed as, in order:
- Regenerate the refusal surface at its own commit
Content: the tree of `development` at d7c4cec847, unchanged.
The steps this packet landed as, in order:
- Count only hex pairs as bytes the surface-fill runs compared
- Fail the suite where a conflict marker reaches the tree
- Write the unordered mesh draws down as an accepted difference, and compare the attachment
Content: the tree of `development` at 724b552b30, unchanged.
The steps this packet landed as, in order:
- The zero-screen-width case is behavioural now, and its ledger row is gone
- Make the zero-screen-width map through the runtime, refusing only what Metal cannot survive
- Regenerate the refusal surface at this branch, and name the ledger row's type
- Hold the zero-extent map on the device, and pin the new public constant
Content: the tree of `development` at 438c844920, unchanged.
The steps this packet landed as, in order:
- Keep the screen a rate-mapped pass took through a reset to another screen
- Bump the runtime version for the fifteenth stack
- Pin the runtime sources of the fifteenth stack
Content: the tree of `development` at ea7b7cf4a4, unchanged.
The steps this packet landed as, in order:
- Regenerate docs/REFUSALS.md after the one- and two-channel sRGB fetch
Content: the tree of `development` at 7cad8e47f1, unchanged.
The steps this packet landed as, in order:
- Bump the semantics, artifact format and runtime versions for the thirteenth stack
- Pin the runtime sources and bless the golden table over the thirteenth stack
Content: the tree of `development` at 57bfb2c4d6, unchanged.
The steps this packet landed as, in order:
- Announce a provoking mode past 1 at the draws Metal's third way draws otherwise
Content: the tree of `development` at 107929f7b9, unchanged.
The steps this packet landed as, in order:
- Answer Metal's getters for an indirect draw of primitive type 7, 8 or 9
Content: the tree of `development` at 987448bf48, unchanged.
The steps this packet landed as, in order:
- Regenerate docs/REFUSALS.md over the twelfth stack
- Pin the runtime sources and bless the golden table over the twelfth stack
Content: the tree of `development` at 6ca8b9005a, unchanged.
The steps this packet landed as, in order:
- Bump the semantics, artifact format and runtime versions for the eleventh stack
Content: the tree of `development` at 02c396984e, unchanged.
The steps this packet landed as, in order:
- Stop a running predicated loop at the GPU's recovery from a fault or a hang
- Resolve multisampled extended-range targets by Metal's measured rules
- Run the emulation's indirect mesh draws with an object function
Content: the tree of `development` at 60cf488339, unchanged.
The steps this packet landed as, in order:
- Say whether the multisampled sparse lane ran on a sparse image
- Answer per indirect command buffer whether its identifier is unmeasured
- Bump the semantics, artifact format and runtime versions for the ninth stack
- Pin the runtime sources of the ninth stack
Content: the tree of `development` at 9e2387685c, unchanged.
The steps this packet landed as, in order:
- Expect Metal's refusal of a second-source blend without its output in the extended-range test
- Blend a fetched four-channel sRGB attachment as Metal does
- Regenerate docs/REFUSALS.md after the sRGB blend and Metal's second-source refusal
Content: the tree of `development` at e2db96d3b2, unchanged.
The steps this packet landed as, in order:
- List the mesh_object_grid fixture in the engine inventory and AIR printouts, and re-bless the opened chains
Content: the tree of `development` at c81b828f80, unchanged.
The steps this packet landed as, in order:
- Read a YCbCr texture's 2D-array view as Metal's, and drop packed 4:4:4 writes
- Name bfloat attachments in the unreached-tiles notice
- Let go of each predicated loop run's sets and uploads once the run completed
- Check that a lent descriptor arena takes every set and reuses its reset pools
- Bump the semantics, artifact format and runtime versions for the eighth stack
- Pin the runtime sources of the eighth stack
- Bless the golden hash tables over the eighth stack
Content: the tree of `development` at ee0b90d176, unchanged.
The steps this packet landed as, in order:
- Answer a size query at a level as Metal does, past the level count too
Content: the tree of `development` at d5c9aaabd0, unchanged.
The steps this packet landed as, in order:
- Run any object grid Metal runs, in pieces within the task stage's limits
- Upload a folded object draw's fold when it launches nothing too
- Run an unfolded object stage's direct grid as Metal does when its threads wrap
- Bump the semantics, artifact format and runtime versions for the seventh stack
- Pin the runtime sources of the seventh stack
- Bless the golden hash tables over the seventh stack
Content: the tree of `development` at a6f6b269ad, unchanged.
The steps this packet landed as, in order:
- Give the private-writes fixture its golden printout and inventory rows
- Draw an indirect render command's private primitive types as the encoder's draws of them
- Count an injected page fault or hang toward a queue's revocation, as the error it stands for
- Drop a unit's ungated dispatches at its unbalanced first record, as Metal does
Content: the tree of `development` at 8e08f4d248, unchanged.
The steps this packet landed as, in order:
- Start a predicated loop's check thread through the exit guard
- Make a predicated loop check's command pool inside an exit-guard section
- Run an endless predicated loop on after its queue is let go, as Metal does
Content: the tree of `development` at f6e7e87687, unchanged.
The steps this packet landed as, in order:
- Give a device heap's compressed multisample texture its own lossless reason
- Plan a heap multisample texture's sample moves per copy, from a queue's pool
Content: the tree of `development` at 936672b44c, unchanged.
The steps this packet landed as, in order:
- Regenerate docs/REFUSALS.md after the second-source blend of a fetched attachment
- Bind the generic blend lane's buffers at a u32 index
Content: the tree of `development` at d556610e9d, unchanged.
The steps this packet landed as, in order:
- Run an executed command's mesh draw with the object threadgroup lengths it set
- Expect the untiled heap layout notice in the ID lanes where images lie in the driver's layout
Content: the tree of `development` at df4df1719c, unchanged.