HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
KhronosGroup
glslang
C++2016–2024
KhronosGroup / glslang

glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.

5Distinct people
6Mentions
0Explicit recommenders
3.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2016-07-19 15:48:14 UTC to 2024-09-02 23:48:54 UTC.

0122016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

6 sources
Newer editions of Computer Organization and Design: The Hardware Software Interface covers GPUs [1] Multiflow still has some relevant ideas [2] Programming on Parallel Machines: GPU, Multicore, Clusters and More. Gives you a look at some of the issues [3] SPIRV-VM is a virtual machine for executing SPIR-V shaders [4] NyuziRaster: Optimizing Rasterizer Performance and Energy in the Nyuzi Open Source GPU [5] Ocelot is a modular dynamic compilation framework for heterogeneous systems, providing various backend targets for CUDA programs and analysis modules for the PTX virtual instruction set. [6] glslang is the Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator. [1]: https://www.goodreads.com/book/show/83895.Computer_Organizat... [2]: https://en.wikipedia.org/wiki/Multiflow [3]: http://heather.cs.u
Read the rest
In Ask HN: Resources for GPU Compilers?
Generic types are probably one of the biggest ones. GLSL has generic builtins, but you can't define your own. But besides that, HLSL's support and management of buffers and bindings is a great deal saner than GLSL's. Especially the new syntax for loading structures from a ByteAddressBuffer. Beats the craziness that is SSBOs and image load/store. GLSL's upbringing with integrated texture/samplers is a bit ridiculous in a separable texture/sampler world, like in Vulkan. You need to create an integrated texture/sampler with the sampler2D constructor, and then immediately use it. The GLSL spec specifically says you can't pass it to your own user-created functions, I'm guessing because they didn't trust platform vendors to write working compilers? But glslang checks for it too, despite being the only GLSL compiler in the toolchain: https://git
Read the rest
hub.com/KhronosGroup/glslang/blob/bd97b6f9f2132fa... You also can't put any binding object like texture2D in a struct, even though you can pass it between functions? The whole enterprise really feels like it was limitations in baby's-first-compiler that added a bunch of weird restrictions. HLSL is a C++-esque derivative that supports quite a bit more functionality than you probably imagine, and a lot less of the goofy limitations, given that it has a single compiler stack made by a company with competent compiler engineers.
In Implementing WebGPU in Gecko
I have an actual real-world use case for this :) Shader-cross-compilation for 3D frameworks: https://floooh.github.io/2017/05/15/oryol-spirv.html I'm hooking python scripts as custom-build-jobs into C/C++ projects which (for instance) takes care of compiling GLSL shader code into HLSL (D3D), MSL (Metal) and various GLSL versions (for GLES2, GLES3 and desktop GL). Khronos provides C++ projects which help with this stuff: https://github.com/KhronosGroup/glslang https://github.com/KhronosGroup/SPIRV-Cross So I'm using Python to hook my custom build jobs into the C/C++ build system (via cmake), but I still need to invoke native command line tools (or DLLs) which wrap around those Khronos libraries. Currently this means building (at least) 3 executables for Windows, macOS and Linux, and "distribute" those precompiled exes with my python code.
Read the rest
It looks like with this python+wasmer solution, I can instead compile the Khronos libraries into WASM modules, and the result runs "anywhere" where wasmer runs (e.g. also Raspberry Pi, BSDs etc...). That's really cool stuff :)
In Wasmer: A Python library for executing WebAssembly binaries

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.