<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/shader-compiler-survey-hmragio8w" -->

---
title: Shader compiler survey | daily.dev
description: A maintainer of shaderc lists ten traits an ideal shader compiler should have, then benchmarks nine real compilers against them using 368 shaders from the bgfx...
canonical: https://daily.dev/posts/shader-compiler-survey-hmragio8w
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Shader compiler survey | daily.dev
og:description: A maintainer of shaderc lists ten traits an ideal shader compiler should have, then benchmarks nine real compilers against them using 368 shaders from the bgfx...
og:url: https://daily.dev/posts/shader-compiler-survey-hmragio8w
og:image: https://api.daily.dev/og/posts/hmrAgio8w.png
og:image:alt: Shader compiler survey
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Shader compiler survey

**[Overview — bgfx 1.146.9292 documentation](https://daily.dev/sources/bkaradzic)** · 20 min read · 1 upvotes · 0 comments

## Summary

A maintainer of shaderc lists ten traits an ideal shader compiler should have, then benchmarks nine real compilers against them using 368 shaders from the bgfx examples. Naga comes out fastest and smallest (0.22s for WGSL to SPIR-V over the corpus, and as little as 1.3MB for a reader and writer) and has a public IR, but lacks an optimizer and is Rust-only. Tint is 3x slower than Naga from WGSL. The Khronos stack (Glslang, SPIRV-Tools, SPIRV-Cross) is the fastest way from HLSL to SPIR-V, FXC is a closed black box, DXC is a large DLL, and NIR has an optimizer but isn't a usable library. The author concludes no compiler meets all ten criteria.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://bkaradzic.github.io/posts/ideal-shader-compiler>

## Questions this post answers

### How much faster is Naga than Tint for translating WGSL shaders to SPIR-V?

Naga is about 3 times faster than Tint when translating WGSL to SPIR-V, compared to a 13x gap measured in 2022. Over 365 shaders both could translate, Naga totaled 221ms versus Tint's 629ms, with Naga's median per-shader time at 84 microseconds against Tint's 407 microseconds. Most of the gap comes from Tint's slower WGSL parsing and validation front-end.

_Comparing WebGPU shader toolchains? Track benchmarks like these on daily.dev before picking Naga or Tint._

### Why does Glslang need SPIRV-Tools to produce valid SPIR-V from HLSL?

Glslang's HLSL front-end emits SPIR-V that is not legal until SPIRV-Tools legalizes it, because Glslang's own documentation warns that disabling optimization 'may cause illegal SPIR-V for HLSL'. In testing, 173 of 368 shader modules failed validation before legalization and none failed after, with the legalization and optimization step taking about 81 percent of the pair's 4.96 second total compile time.

_Debugging invalid SPIR-V from an HLSL pipeline? Save benchmarks like this on daily.dev before choosing your toolchain._

### How big is dxcompiler.dll compared to other shader compiler libraries?

The DXC shader compiler, dxcompiler.dll plus dxil.dll, totals 19.7MB, making it one of the largest shader compiler binaries measured. By comparison, Naga with everything included is 3.7MB, the full Khronos stack (Glslang, SPIRV-Tools, SPIRV-Cross) is 7.0MB, and Slang's full DLL set reaches 32.3MB, while Apple's standalone Metal compiler executable is 119MB.

_Weighing binary size against capability for a shader pipeline? Compare footprints like these on daily.dev._

## Similar posts on daily.dev

- [The bgfx shader compiler, 14 years of not being a compiler](https://daily.dev/posts/the-bgfx-shader-compiler-14-years-of-not-being-a-compiler-bzzcsjzae) · Overview — bgfx 1.146.9292 documentation · 0 upvotes · 0 comments
- [RadeonSI Starts 2026 With NIR Compilation Refactoring For Better Performance, Lower GLSL Compile Times](https://daily.dev/posts/radeonsi-starts-2026-with-nir-compilation-refactoring-for-better-performance-lower-glsl-compile-tim-16qc7ddxa) · Phoronix · 0 upvotes · 0 comments
- [Developers said…2026 Shader Ecosystem Survey Results](https://daily.dev/posts/developers-said-2026-shader-ecosystem-survey-results-m62s9sidq) · Khronos · 0 upvotes · 0 comments
- [VoidZero’s Experimental Oxc Angular Compiler with Up to 20x Faster Build Performance](https://daily.dev/posts/voidzero-s-experimental-oxc-angular-compiler-with-up-to-20x-faster-build-performance-fmkzaf0ye) · InfoQ · 2 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#graphics-programming](https://daily.dev/tags/graphics-programming)

[View this post on daily.dev](https://daily.dev/posts/shader-compiler-survey-hmragio8w)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Shader compiler survey","url":"https://daily.dev/posts/shader-compiler-survey-hmragio8w","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/shader-compiler-survey-hmragio8w"},"datePublished":"2026-10-25T05:01:23.578Z","dateModified":"2026-10-25T05:01:58.080Z","description":"A maintainer of shaderc lists ten traits an ideal shader compiler should have, then benchmarks nine real compilers against them using 368 shaders from the bgfx...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Overview — bgfx 1.146.9292 documentation","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Overview — bgfx 1.146.9292 documentation","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/bkaradzic"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/shader-compiler-survey-hmragio8w","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming,graphics-programming","timeRequired":"PT20M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Overview — bgfx 1.146.9292 documentation","item":"https://daily.dev/sources/bkaradzic"},{"@type":"ListItem","position":3,"name":"Shader compiler survey"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/shader-compiler-survey-hmragio8w#faq","mainEntity":[{"@type":"Question","name":"How much faster is Naga than Tint for translating WGSL shaders to SPIR-V?","acceptedAnswer":{"@type":"Answer","text":"Naga is about 3 times faster than Tint when translating WGSL to SPIR-V, compared to a 13x gap measured in 2022. Over 365 shaders both could translate, Naga totaled 221ms versus Tint's 629ms, with Naga's median per-shader time at 84 microseconds against Tint's 407 microseconds. Most of the gap comes from Tint's slower WGSL parsing and validation front-end. Comparing WebGPU shader toolchains? Track benchmarks like these on daily.dev before picking Naga or Tint."}},{"@type":"Question","name":"Why does Glslang need SPIRV-Tools to produce valid SPIR-V from HLSL?","acceptedAnswer":{"@type":"Answer","text":"Glslang's HLSL front-end emits SPIR-V that is not legal until SPIRV-Tools legalizes it, because Glslang's own documentation warns that disabling optimization 'may cause illegal SPIR-V for HLSL'. In testing, 173 of 368 shader modules failed validation before legalization and none failed after, with the legalization and optimization step taking about 81 percent of the pair's 4.96 second total compile time. Debugging invalid SPIR-V from an HLSL pipeline? Save benchmarks like this on daily.dev before choosing your toolchain."}},{"@type":"Question","name":"How big is dxcompiler.dll compared to other shader compiler libraries?","acceptedAnswer":{"@type":"Answer","text":"The DXC shader compiler, dxcompiler.dll plus dxil.dll, totals 19.7MB, making it one of the largest shader compiler binaries measured. By comparison, Naga with everything included is 3.7MB, the full Khronos stack (Glslang, SPIRV-Tools, SPIRV-Cross) is 7.0MB, and Slang's full DLL set reaches 32.3MB, while Apple's standalone Metal compiler executable is 119MB. Weighing binary size against capability for a shader pipeline? Compare footprints like these on daily.dev."}}]}
```

