Reuse shared shader references when prewarming the pipeline list #29

Manually merged
github merged 1 commit from gh-pr/29/head into gh-pr/29/base 2026-12-05 17:22:35 +00:00
Owner

@⁠yyc160 on GitHub · 2026-12-05 15:43 UTC · original
yyc160:perf/reuse-listed-shaders → main · +90 −17 · 3 files · 1 commits · merged 2026-12-05 15:49 UTC

Different pipeline recipes frequently reference the same container. Previously the list walk rehashed its bytes and acquired the global shader-interning lock for each reference. Walk the complete on-disk records once, retain their full content hashes and memoize resolved shared shaders for the duration of the list walk. The first use still goes through the existing full-hash table. The disk bookkeeping path no longer copies container payloads just to get their names.

No changes to the cache format, pipeline keys, compiler worker count or draw scheduling. A torn final record is ignored at the same boundary as before.

Windows x64 release, based on 03efd5b:

  • The synthetic regression verified reuse of the live interned shader, missing lookups and a partially written final record.
  • In the ignored, read-only compare_listed_shader_resolution test, 88,506 recipes held 169,692 references to 19,048 stored containers. The identical input and reference order produced identical stage/hash fingerprints. Old/new/new/old: 463.59 / 84.41 / 82.12 / 391.27 ms.
  • This comparison isolates list indexing and reference resolution; it is not a measurement of whole startup time, driver shader compilation or in-game FPS. No cached shader data is included.

AI-assisted by GPT-6.2 Astra.

**@⁠yyc160** on GitHub · 2026-12-05 15:43 UTC · [original](https://github.com/gamingwithhomie/larp/pull/29) `yyc160:perf/reuse-listed-shaders` → `main` · +90 −17 · 3 files · 1 commits · merged 2026-12-05 15:49 UTC Different pipeline recipes frequently reference the same container. Previously the list walk rehashed its bytes and acquired the global shader-interning lock for each reference. Walk the complete on-disk records once, retain their full content hashes and memoize resolved shared shaders for the duration of the list walk. The first use still goes through the existing full-hash table. The disk bookkeeping path no longer copies container payloads just to get their names. No changes to the cache format, pipeline keys, compiler worker count or draw scheduling. A torn final record is ignored at the same boundary as before. Windows x64 release, based on `03efd5b`: - The synthetic regression verified reuse of the live interned shader, missing lookups and a partially written final record. - In the ignored, read-only `compare_listed_shader_resolution` test, 88,506 recipes held 169,692 references to 19,048 stored containers. The identical input and reference order produced identical stage/hash fingerprints. Old/new/new/old: 463.59 / 84.41 / 82.12 / 391.27 ms. - This comparison isolates list indexing and reference resolution; it is not a measurement of whole startup time, driver shader compilation or in-game FPS. No cached shader data is included. AI-assisted by GPT-6.2 Astra.
Hash complete container records once; resolve repeated recipe references without rehashing or locking the live shader table. Keep the existing full-hash interning and truncated cache-tail boundary.

AI-assisted by GPT-6.2 Astra.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:22:31 +00:00
github manually merged commit 5e27f49c6a into gh-pr/29/base 2026-12-05 17:22:35 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.