Runtime docs: what keeping a render state's descriptor costs its make

Every render state now keeps its descriptor (the state drawn without the colours past its
pass's last attachment is made of it), so every make copies it and every drop frees the copy.
The README's line said what a set and a draw cost and what the kept descriptor holds alive,
but not this. It now states it: a make of a content the device already holds takes about
13,500 user-space instructions on lavapipe against about 11,800 without the keep, once a
state and never a draw.

Verified: the figures are the lane's scratch count test, release, lavapipe (llvmpipe, LLVM
23.1.1), mean of 200 calls, 5 runs each: m3-max-75974 at the branch (13,494 to 13,506) and
m3-max-75975 at development 0ae823f5e7 (11,806); read from both jobs' logs. Docs only.
This commit is contained in:
Anees Iqbal committed 2026-11-26 20:59:54 -08:00
1 parent be98ac249c
commit 6ae4d7dbaf
1 file changed
+4 -1
+4 -1
View File
@@ -4722,7 +4722,10 @@ cache is answered compile-required on both.
its pass is 140 and takes neither, nor do its draws (job m3-max-75974). Every render state keeps
its descriptor, and through it its functions' libraries, while it lives: in states-only plays of
two recorded replay streams on lavapipe, that kept no library alive that was not alive without it
(jobs m3-max-75968 and m3-max-75969). A state that names a colour its pass leaves unset between
(jobs m3-max-75968 and m3-max-75969). Keeping it costs every render state's make the
descriptor's copy, and its drop the copy's: a make of a content the device already holds takes
about 13,500 user-space instructions on lavapipe against about 11,800 without it (jobs
m3-max-75974 and m3-max-75975), once a state and never a draw. A state that names a colour its pass leaves unset between
two colour attachments stays refused (`DrawKind::AttachmentFormats`): there plain Metal writes
that colour's value into the next attachment (`pass-pipeline-color-unattached-between`, job
m3-max-75934).