Games by Mason's glslang_zig updated to master
  • C++ 81.8%
  • POV-Ray SDL 8.7%
  • Zig 5.9%
  • C 3.4%
  • Pawn 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
stacksmash 1c9d32396c Build with Zig master
- b.args is gone: the run steps pass arguments through with
  Run.addPassthruArgs.
- minimum_zig_version is the Zig master this was tested with,
  0.17.0-dev.2377+b6896c430, and the fork has its own fingerprint.
- The README says what the fork is.
2026-09-29 15:07:25 -04:00
generated Updates to 1.4.309 2025-03-31 16:16:44 -07:00
.gitignore Explains Zig version, adds zig-pkgs to gitignore 2026-04-15 00:01:39 -07:00
build.zig Build with Zig master 2026-09-29 15:07:25 -04:00
build.zig.zon Build with Zig master 2026-09-29 15:07:25 -04:00
LICENSE Initial commit 2024-07-04 04:17:12 -07:00
README.md Build with Zig master 2026-09-29 15:07:25 -04:00

glslang_zig

This is a fork of Games by Mason's glslang_zig whose zig-master branch carries only build.zig changes, so it builds with Zig master (tested with 0.17.0-dev.2377+b6896c430). Glslang, SPIRV-Tools and SPIRV-Headers are the upstream versions pinned in build.zig.zon, unchanged.

Glslang ported to the Zig build system. If you're compiling shaders from the build system, see also mr_glsl.

Contributions or bug reports are welcome if behavior differs from official build system.

Zig Version

See build.zig.zon for the current Zig version. For support for previous versions of Zig, see releases.

Usage

See mr_glsl for example usage.

Version

See build.zig.zon for current version info of the form $PACKAGE_VERSION+$GLSLANG_VERSION.

Known Differences

  • The official build process has a web target for the glslang artifact, but this project does not. Contributions are welcome.
  • The official build process symlinks glslang to glslangValidator. This build outputs glslangValidator instead of glslang and does not provide a symlink because the library artifact is already named glslang.
  • The tests are not built.
  • Compiler flags for exceptions, rtti, etc are not configurable (see build.zig for current values.)

How To Change the Glslang Version

The version of glslang is set in build.zig.zon.

Glslang depends on SPIRV-Headers, and SPIRV-Tools. When changing the glslang version you may need to update these dependencies, to find out if this is necessary check your glslang's known-good.json.

Glslang and SPIRV-Tools' official build processes generate headers at compile time. These are cached in the generated directory, and can be regenerated via the official build processes.