Skip to content

AcceptedOwner sparkles:shadersReviewed 2026-10-26

sparkles:shaders — Toolchain and platforms ​

The pinned compiler and tools, and where they run. The requirements are the accepted contract of 2026-10-16; the compiler pin itself belongs to the toolchain specification, which every Sparkles target shares. This page is part of the specification.

SHT1: Pinned compiler. The device compiler is the LDC of the toolchain's TC1, built on the LLVM of TC2. It must provide dcompute's Vulkan target (ldc-developers/ldc#5132) and the stages of Entry points, and its LLVM must carry the SPIR-V backend with the Vulkan fixes of llvm/llvm-project#216919 and this project's changes (signed integers by module flag with struct member names; 32-bit access-chain indices; buffer device addresses by module flag, with the access chains, strides and alignment Vulkan requires; no Int8 for a resource's name; a terminating discard; and merge blocks for nested conditions that share an exit), whose upstreaming is tracked in #647. A change to either pin must pass the acceptance suite of testing.md before it lands.

SHT2: Pinned SPIR-V tools. SPIR-V Tools, SPIRV-Cross and glslang must be pinned. The pinned versions are 1.4.357.0, 1.4.357.0 and 16.4.0.

Rationale: Their versions shape the output: a newer spirv-opt rewrote one branch of a generated shader. The pin is part of the output's definition.

SHT3: Reproducibility. (Revised.) With the toolchain of SHT1–SHT2, the same inputs must produce byte-identical GLSL and SPIR-V on every supported platform and in every directory. (The stamp records paths relative to the package, which can differ.)

SHT4: Platforms. The device toolchain must be available on x86_64 Linux, aarch64 Linux and aarch64 macOS. The host side, the vocabulary and every default configuration, must build on every platform the D compilers support, Windows included. Device toolchains for other platforms are an open question (decisions.md).