A recovery carries drawing and mesh pipeline states

What: a drawing state (a mesh one, and a twin of a color group, a single-sample or a factor-scaling
state among them) keeps a chain of programs per generation as a compute state does
(pipeline/carry.rs): its StateShared Deref reaches the program of the generation whose command
buffer's work the thread does, else the last; its ID, uniqueIdentifier, label and sampler numbers
stay. Each state is kept by its generation's carry registry (GraphicsState::kept at the end of a
render or mesh creation, with its color groups' twins); the recovery carries them after the compute
states (pipeline/render/carry.rs): its base variant, and its large-buffer form's, made again from
the pipelines its creation compiled or the live variants of them the new generation holds, no
translation; then, under the new generation's reach (NoticesFor::of_generation), its neutrals, its
predicted first draw's VkPipeline handed to the pool with nothing waiting for it
(make_at_creation(false)), and its depth stand-in copies. Its descriptors, keys, label and twins are
kept; its other variants, plans, settles and routings are made as its draws need them. A failed
making is counted and refused where bound (RemadeAfterRecoveryFailed) through
RenderPipelineState::bound_device, at set_render_pipeline_state (encoder, call checks, indirect
command buffer) and an argument encoder's render word; a tile state's bind now answers its kernel's
failed making the same way. A state is made again only where both generations compile alike
(compiles_alike, the profile fingerprint the memo carry checked already); else its making is refused
as failed. Docs: device/carry.rs, pipeline/carry.rs, MadeBeforeRecovery (render states no longer
listed refused) and RemadeAfterRecoveryFailed, the DeviceRecovered cost (degradation.rs and API.md,
equal), API.md's recovery entry, the runtime README; REFUSALS.md regenerated.

Why: drawing states made before a recovery were refused where bound after it; Metal's go on.

Verified: see the lane run reported with this sha (the test commit before it fails, this one
passes), with the recovery's wall time for 0, 200 compute and 200 drawing states.
This commit is contained in:
Anees Iqbal committed 2026-11-12 17:13:53 -08:00
1 parent 5ee7cb77c9
commit 6b79a77730
14 files changed
+362 -79

No files matched your search

+8 -3
View File
@@ -3652,8 +3652,8 @@ bound.
pages the `Shared` and `Managed` buffers lie in where the device's checks found a held host-page
import costs its submissions nothing and textures over such pages take what they take over its
own memory), `Private` heaps with the buffers placed in them, textures of `new_texture`,
textures over the buffers carried and views of them, and compute and tile pipeline states made
before it go on, the contents of a `Private` buffer or heap lost (it reads zero) and of a
textures over the buffers carried and views of them, and pipeline states made before it go on,
the contents of a `Private` buffer or heap lost (it reads zero) and of a
texture of `new_texture` of any storage mode (it reads as a new one) but a texture buffer over
its texels' buffer carried; the other objects made before it are refused (`MadeBeforeRecovery`),
where Metal's go on; the calls during it wait for it, and a device call the loss met while it
@@ -3672,7 +3672,12 @@ bound.
image there. Their images on the lost `VkDevice` stay with them, and keep it, until they go. A
heap's texture, one over the caller's `VkImage`, a sparse or shareable texture and one over a
buffer left are refused, with their views. A `Shared` heap, whose bytes are pooled host-visible
memory the device allocated, is refused with its buffers, as a pooled buffer is.
memory the device allocated, is refused with its buffers, as a pooled buffer is. A compute, tile,
drawing or mesh pipeline state is the same state on the new `VkDevice` (its identity, ID,
`uniqueIdentifier` and label): its base variant made again there from what its creation
compiled, with no translation, and the `VkPipeline` its creation predicted queued with no wait;
a bind of one whose making there failed is refused (`RemadeAfterRecoveryFailed`). Its objects
on the lost `VkDevice` stay with it, and keep it, until it goes.
- `metal2vulkan-degrade-private-properties-unknown` (precision). `PrivatePropertiesUnknown`: Apple's
private device properties the device has no answer for: no document describes them and nothing the
device reports maps to them. Cost: the device gives no answer for them (`PrivateAnswer::value` is