breakthrough
Cutting Cold Shader Startup by 3x with Direct Metal AIR
One of the biggest frustrations when running modern Windows games on a Mac is waiting minutes on a "Preparing Shaders" screen or hitting jarring frame stutters the first time a new effect appears. Today we are sharing a major breakthrough inside SuperDX, our clean-room Direct3D layer for Apple Metal 4: our own shader compiler now handles DirectX 12 shaders by default and emits binary Metal AIR libraries directly instead of compiling text shaders on the fly.
Why shaders stutter on a cold start
Every Windows DirectX game ships thousands of compiled shader programs in DirectX bytecode (DXBC for Shader Model 5 and DXIL for Shader Model 6). Before Apple Silicon can run them, a graphics layer has to translate those shaders into something Apple Metal understands.
Previously, translating a DirectX 12 shader meant bouncing it through 5 stages (4 hops), emitting thousands of lines of human-readable Metal Shading Language (MSL) text, and handing that text to macOS's shader compiler front end to parse, type-check and optimise from scratch. Even a tiny compute shader hits a 40 ms front-end compile floor through text compilation. Multiply that by ten thousand shaders in a modern AAA game and a cold launch turns into minutes of CPU-bound waiting.
Two breakthroughs working together
This month, two long-running engineering milestones landed together inside SuperDX:
- Our own clean-room DXIL front end is now the default. Instead of hopping through multi-stage external translators for DirectX 12 Shader Model 6 bytecode, SuperDX parses DXIL directly into its own intermediate representation, joining our existing clean-room DXBC front end.
- Our direct Metal AIR binary emitter is now the default. Rather than generating text source code for Metal to re-parse, SuperDX writes binary Metal AIR bitcode and packages it straight into a valid Metal library container in memory, handing binary code directly to Metal 4.
//// superdx shader pipeline
Multi‑hop text compile vs. Direct Metal AIR
In our compute-kernel prototype, loading a shader library from binary Metal AIR dropped the raw cold load floor from 40 ms down to 0.1 ms. In real games, asset loading and pipeline creation still take time, so overall cold startup improves by roughly 3x rather than 400x, while cutting the largest source of mid-level shader compile stutter when a game streams in new materials.
Measured across five real games
Before turning both paths on by default, we tested them across five demanding DirectX 12 and DirectX 11 games from a cold, empty shader cache:
- The Callisto Protocol (DirectX 12, 2560x1600): Cold startup dropped from 366 seconds on the text path down to 122 seconds on direct Metal AIR, a 3.0x speedup. SuperDX loaded 12,077 AIR libraries with zero declines, zero refusals, 62.0 FPS average gameplay at 2560x1600 and zero frames over 100 ms.
- Death Stranding (DirectX 12): Loaded 7,692 direct Metal AIR libraries seamlessly across gameplay.
- Red Dead Redemption 2 (DirectX 12, 1920x1200): Loaded 2,518 direct Metal AIR libraries with zero declines, zero refusals and zero GPU errors, averaging 78.2 FPS across the run (72.6 FPS in gameplay).
- The Witcher 3 (DirectX 12 Next-Gen): Compiled 471 DirectX 12 DXIL shaders through our clean-room front end and loaded 508 direct Metal AIR libraries alongside 13,817 ray-tracing dispatches, with zero crashes and zero frames over 100 ms.
- The Elder Scrolls V: Skyrim Special Edition (DirectX 11): Loaded all 254 of its shaders as direct Metal AIR libraries with zero text shader compiles, reaching 54.2 FPS on a cold start and zero frames over 100 ms.
//// measured cold shader startup
Real game cold starts & 20‑shader burst demo
Bar length = direct Metal AIR libraries loaded per game (linear scale; small counts keep a 10 px stub).
Safe fallbacks and modern shader stages
Compatibility always beats shortcuts. Every vertex, pixel and compute shader supported by the direct emitter uses the fast binary AIR path automatically. If Metal ever rejects an AIR binary, or if a game uses specialised stages that are still being migrated (such as ray-tracing pipelines, geometry shaders, tessellation or mesh shaders), SuperDX is designed to fall back per shader automatically so games keep rendering cleanly.
What's next
Next we are expanding direct AIR coverage to the remaining shader stages, caching binary shader outputs directly to disk so warm launches are even faster, and wiring this newest SuperDX compiler build into our upcoming Apple Silicon runtime release. Stay tuned to our monthly updates on the News tab as we keep pushing towards the alpha.
Thank you
SlashArcade is an independent project. If you'd like to help it along, you can support us on Ko-fi. Every bit helps.
Stay in the loop
Follow our monthly updates and breakthrough announcements on the News tab, or add the RSS feed to your reader. Thanks for reading!