<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/runtime/src/heavy_pipeline_cache.h, branch docs/pso-cache-scope-note</title>
<subtitle>[no description]</subtitle>
<id>https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note</id>
<link rel='self' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/atom?h=docs%2Fpso-cache-scope-note'/>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/'/>
<updated>2026-11-25T22:10:37+00:00</updated>
<entry>
<title>d3d12: retry a failed heavy cache write and never publish a VK_INCOMPLETE snapshot</title>
<updated>2026-11-25T22:10:37+00:00</updated>
<author>
<name>Claude</name>
<email>noreply@anthropic.com</email>
</author>
<published>2026-11-25T22:10:37+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=aab7653566e4ecf80a8026cfbd48e74966a4d04c'/>
<id>urn:sha1:aab7653566e4ecf80a8026cfbd48e74966a4d04c</id>
<content type='text'>
Review of RT-HEAVY-PIPELINE-CACHE:
- The writer thread marked a generation written even when the save failed, so the
  cache stayed unsaved until teardown. A failed save now keeps the cache dirty and
  is retried after a bounded backoff (5 s, doubling, capped at 2 min), so a write
  that keeps failing does not spin. WriteSchedule::failed() holds that decision and
  heavy_pipeline_cache_test checks it.
- save_heavy_pipeline_cache accepted VK_INCOMPLETE and published the truncated blob
  over a complete file. It now requires VK_SUCCESS, like the session cache, and
  keeps the previous file; the next try queries a fresh size.

Changes made by Claude Code (AI-assisted).

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
</content>
</entry>
<entry>
<title>heavy pipeline cache: a write covers what was noted before it started, counted, not timed; teardown keeps fast builds too</title>
<updated>2026-11-25T15:57:43+00:00</updated>
<author>
<name>kawaii-shakal</name>
<email>deusex1998@gmail.com</email>
</author>
<published>2026-11-25T15:57:43+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=e4c413a3a5fe18b99ede727d02b9a561fc8ca56e'/>
<id>urn:sha1:e4c413a3a5fe18b99ede727d02b9a561fc8ca56e</id>
<content type='text'>
GetTickCount64 moves in 10-16 ms steps, so a slow build noted during a write in the write's own tick was taken
as written. The schedule now counts notes. And without an offline seed every build goes to the heavy cache:
fast ones never schedule a write, so teardown writes the cache whenever any build went into it, which is what
pipeline_cache.session.bin used to keep.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>d3d12: a pipeline cache for the offline cache's misses, written while the game runs (RT-HEAVY-PIPELINE-CACHE)</title>
<updated>2026-11-25T15:40:23+00:00</updated>
<author>
<name>kawaii-shakal</name>
<email>deusex1998@gmail.com</email>
</author>
<published>2026-11-25T15:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://upleb.uk/npub1w4dsu3e6hzjehh7l3c9njhtwwtgk9g209ylqf4tvdn2m07xjq06se9ett9/Leonida/commit/?id=9f1f5bf9a653d6cd4568a879887b4483f37ad465'/>
<id>urn:sha1:9f1f5bf9a653d6cd4568a879887b4483f37ad465</id>
<content type='text'>
pipeline_cache.session.bin can't keep what a crashed run compiled: it is written at device teardown only, and
a cache seeded from the multi-GiB corpus returns the whole corpus, over its write limit. So the slow builds
the corpus misses (the pipeline library's compute programs, 3 to 7 s each on an RTX 5070 Ti) are compiled
again on every boot.

Each graphics and compute build now first asks the corpus cache with
VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT. A miss is built against a second cache, seeded from
pipeline_cache.heavy.bin next to pipeline_cache.bin, so that cache holds only the misses.

A build of at least LEONIDA_HEAVY_PIPELINE_CACHE_MS (500 by default) schedules a write. A thread of its own
writes the cache 3 s after the newest slow build and no later than 20 s after the first unwritten one,
through the session cache's staging file and rename. At teardown it writes what is left. 0 turns it off,
and with it pipelineCreationCacheControl unless LEONIDA_PIPELINE_COMPILE=cache-only asks for it.

Measured with vk_pipeline_check on the RTX 5070 Ti (617.42): a cache-only create of four library compute
programs the corpus lacks returns VK_PIPELINE_COMPILE_REQUIRED in under 1 ms.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
