This structure mirrors the functionality LLVM provides for CPU languages, offering an IR, verifier, linker, optimizer, code generators, and a VM. The library is designed to be small enough for vendor integration and is secure when processing untrusted input.
Bento Language, the GPU language built upon Shokado, natively understands concepts like barriers, subgroups, uniformity, and uber shaders, rather than relying on bolted-on intrinsics or macros in C.
Shokado produces code targeting SPIR-V, DXIL, AIR, and GLSL without requiring any intermediate compiler. Its core components—IR, verifier, linker, optimizer, and code generators—are language agnostic.
Bento functions as a compact client built on top of this infrastructure, analogous to how clang serves as the C and C++ frontend for LLVM.
The IR supports building, editing, printing, and verification from external programs. Modules can be linked either during the build process or at runtime, and they can be incomplete or mixed with IR from various sources.
The library includes a linker, optimizer, code generator, disassembler, validator, and stripper for modules originating from any frontend. Optimization techniques such as inlining, mem2reg, scalar replacement of aggregates, CSE, and rule-driven algebraic simplification are implemented.
Shokado is stated to be competitive with spirv-opt and achieves the highest optimization level found in DXC. It utilizes one C header, with memory, file handling, and diagnostics managed via host callbacks.
"The shader situation in Vulkan and Direct3D 12 is somewhat dire and this is an attempt at trying to address it." The motivation stems from lessons learned from prior issues, emphasizing that Shokado is not a transpiler and that the library itself is prioritized.
This development aligns with a broader industry trend toward creating robust, foundational tooling to manage the increasingly complex and heterogeneous execution environments prevalent in modern graphics and compute platforms.
Why it matters
This infrastructure addresses current limitations in GPU language compilation for Vulkan and Direct3D 12. Its dependency-free design and safety features make it a robust component for platform integration and secure execution environments.





