
PearlCache persists compiled ShaderC SPIR-V and the Vulkan VkPipelineCache to disk, and pre-sizes RenderPearl's dynamic GPU buffers so they never grow at runtime. It is a client-side Fabric mod for Minecraft's Vulkan renderer.
PearlCache is an independent project and is not affiliated with RenderPearl.
Why PearlCache?
- Shader compile time cut by 82.4%:
2,270 ± 394 ms→399 ± 68 mson warm launches (n=5 vs n=5,p_holm = 0.002, 402/402 cache hits). - Zero runtime buffer resizes:
18.6 ± 0.9→0per run, including the very first cold boot. - No steady-state FPS cost:
168.5 ± 20.3vs177.9 ± 15.3FPS, a difference within noise (p = 0.43).
Quick Start
- Install Fabric Loader 0.20.0 or newer.
- Download PearlCache from Modrinth.
- Drop the JAR into your
modsfolder and launch with Java 25 or newer.
PearlCache has no keybinds or commands. It works automatically; the first launch fills the cache and later launches reuse it. Fabric API is not declared as a dependency.
Features
| Feature | What it does |
|---|---|
| ShaderC SPIR-V disk cache | SHA-256 key over format version, shader name, stage, backend flags, #defines, source and all transitive #include contents (depth up to 16). |
Persistent VkPipelineCache | Replaces VK_NULL_HANDLE in VulkanRenderPipeline.compile with a driver-backed cache keyed by vendor + GPU + driver. |
| Buffer pre-sizing | Raises initial capacity of Chunk Sections Command Buffer (4096), Chunk Sections (2048), Dynamic Transforms (64) and Terrain UBO (8) buffers. |
Cache safety
| Safeguard | Behavior |
|---|---|
| Atomic writes | Unique per-process temp file, then ATOMIC_MOVE; safe with several game instances. |
| Corruption check | SPIR-V magic 0x07230203, length of at least 20 bytes and 4-byte alignment are validated. Bad files are deleted and recompiled. |
| Driver rejection | A VkPipelineCache the driver rejects resets to an empty cache. |
| Size limits | .spv capped at 256 MiB (LRU eviction to 80% on startup); .vkcache files over 128 MiB are not used. Stale .tmp files older than 5 minutes are removed. |
Performance
Single machine: Ryzen 5 4500, RTX 3050 6 GB (driver 621.47), Windows 11, Minecraft 26.3. Not yet tested on AMD or Intel GPUs, or on Linux.
| Metric (n=5 alternating) | Without | With PearlCache |
|---|---|---|
| ShaderC compile/read | 2,270 ± 394 ms | 399 ± 68 ms |
| Buffer resizes | 18.6 ± 0.9 | 0 |
| Average FPS | 168.5 ± 20.3 | 177.9 ± 15.3 (n.s.) |
| 1% low FPS | 52.4 ± 6.1 | 52.2 ± 5.8 (n.s.) |
In a heavy 150-mod stack (n=5, warm) there were 0 SPIR-V misses and 0 buffer resizes, with no detectable FPS change (48.2 ± 5.7 vs 48.5 ± 2.6). PearlCache does not raise FPS once shaders and buffers are already warm.
Configuration
There is no config file. Caches live in <game dir>/pearlcache/spv and <game dir>/pearlcache/vk; delete them to reset. To disable the mod, add the JVM argument -Dpearlcache.disabled=true.
Showcase
Steady-State FPS & Frame Pacing Check (n=5 vs n=5 Solo)

No detectable steady-state FPS cost in standalone Vulkan or 150-mod stack (all p>=0.38 ns); real benefit is ~1.9 s warm startup savings and 0 GPU buffer resizes.
Compatibility
| Minecraft | Loader | Java | Side |
|---|---|---|---|
| 26.3 | Fabric (Loader ≥ 0.20.0) | 25+ | Client only |
| 26.4 (snapshots, pre-releases, rc and release) | Fabric (Loader ≥ 0.20.0) | 25+ | Client only |
Forge and NeoForge are not supported. It targets the Vulkan renderer with RenderPearl's dynamic buffers.
Building from Source
Requires JDK 25.
./gradlew build --no-daemon
License
Released under the MIT License.