1Why zdxc?
Why the hell are you doing this?
Because changing a shader should mean seeing the result, not taking a break while the compiler catches up.
A small shader edit can turn into thousands of compilations once an engine adds materials, platforms, and permutations. That waiting time adds up every time you try an idea. zdxc is built to make that loop shorter.
It should also be easy to put a shader compiler in your engine. A small library, a small C API, and the DXC entry points your engine already calls. HLSL in, DXIL or SPIR-V out. Open source, MIT licensed, and small enough to read and understand.
Why is zdxc so freaking fast?
A compiler built for this job
zdxc implements HLSL 2021 from scratch. Its front end, intermediate representation, and DXIL and SPIR-V backends live in one codebase, without LLVM or Clang as dependencies. That gives it a focused path from shader source to output and control over the work done at each step.
Less allocation between compiles
Engines compile shaders in batches. The DXC-compatible interface keeps a compile arena per thread and reuses its memory between calls, up to a retention limit. Temporary compiler data can be reset together instead of rebuilding the allocator's working storage for every shader.
Keep the workers compiling
The batch compiler can run multiple jobs in one process. Its job path keeps file I/O off the compile threads, so those threads can spend their time compiling. This is a separate benefit from the speed of an individual compile; the case study measures both.
Measure the whole loop
On Hyperion's Windows shader cook, the measured compile step took 17.4 seconds of summed worker time with zdxc, against 241.3 seconds with DXC: about 14× faster. The complete cook went from 58.9 seconds to 23.2 seconds, about 2.5× faster. Include handling and the engine's other work still take time.
Those measurements show the combined result of the implementation. They don't assign a speedup to each design choice, and faster compilation doesn't by itself mean faster GPU execution.
Try it in your engine
Start with the DXC drop-in, or link the C API directly. The manual covers building, integration, and batch compilation.