↑

Case studies

zdxc X Hyperion

Glide, 2,688 shader assets, DXIL and SPIR-V

HyperionEngine compiles its shaders through IDxcCompiler3: a -P preprocess call, then the compile with -HV 2021 -O3. The game is Glide. Swapping DXC's library for zdxc's is the only change.

Cook the game's shaders, end to end2.5× faster
DXC149 shaders/s
zdxc378 shaders/s
Compile throughput per worker13.9× faster
DXC36 shaders/s
zdxc504 shaders/s
Every compile, one after another14.2× faster
DXC51 shaders/s
zdxc719 shaders/s
All 17,544 calls on 24 threads5.9× faster
DXC665 calls/s
zdxc3,899 calls/s
Windows, DXIL. Ryzen 9 7900 (24 threads). DXC 1.8.2505 against zdxc. Higher is better

Before and after

The same frame of Glide, with its shaders compiled by DXC and by zdxc.

Glide's title screen over a desert canyon, zdxc
Glide's title screen over a desert canyon, DXC
DXCzdxc
Drag to compare: DXC on the left, zdxc on the right.
Glide's title screen over a desert canyon, DXC
DXC
Glide's title screen over a desert canyon, zdxc
zdxc

Results

DXC zdxc
Cook, wall time 58.9 s 23.2 s 2.5×
Compile call, median 12.6 ms 1.0 ms 12.7×
Compile call, 99th percentile 131 ms 15 ms 8.8×
Slowest compile 3.1 s 72 ms 43×
DXIL output 76.4 MB 61.5 MB
  • All shaders built with both DXC and zdxc.
  • Valid output. 8,758 of the 8,770 objects pass DXC's validator. The other 12, ray-tracing libraries, differ only in a part whose layout depends on the validator version.
  • Same picture. Glide renders the same frame with either compiler.
  • macOS, SPIR-V. On an Apple M5, the Vulkan cook takes 10–11 s with zdxc against 30–32 s with DXC, and every SPIR-V module passes spirv-val.

How it was measured

The engine's BlobStorageCookCommandlet cooks Glide from an empty shader cache, three times with each compiler, interleaved. A shim library in front of the real one times every Compile call and records it; the recording is then replayed through each compiler in one process, on one thread and on 24.