# microsoft/directxshadercompiler

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/microsoft-directxshadercompiler).**

3,493 stars · 830 forks · C++ · other

## Links

- GitHub: https://github.com/microsoft/DirectXShaderCompiler
- awesome-repositories: https://awesome-repositories.com/repository/microsoft-directxshadercompiler.md

## Topics

`directx-shader-compiler` `dxil` `hlsl` `shader-programs`

## Description

DirectXShaderCompiler is an HLSL shader compiler that transforms High-Level Shader Language source code into intermediate language formats executable by GPUs. It functions as a shader bytecode validator to verify the correctness and hardware compatibility of compiled representations and as a software shader rasterizer for rendering when physical graphics hardware is unavailable.

The project includes a translation tool that converts HLSL shader code into the SPIR-V binary intermediate representation for use with cross-platform graphics APIs. It also provides capabilities for legacy shader migration by translating older shader bytecode formats into modern versions.

The toolset covers a broad range of capabilities, including cross-platform shader development and Vulkan SPIR-V integration.

## Tags

### Graphics & Multimedia

- [Shader Cross-Compilation Pipelines](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/shaders/shader-cross-compilation-pipelines.md) — Transforms High-Level Shader Language source code into intermediate formats for execution by graphics drivers. ([source](https://cdn.jsdelivr.net/gh/microsoft/directxshadercompiler@main/README.md))
- [Cross-Platform Shader Compilers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/shaders/cross-platform-shader-compilers.md) — Transforms unified shader code into platform-specific binaries to ensure visual consistency across different hardware. ([source](https://cdn.jsdelivr.net/gh/microsoft/directxshadercompiler@main/README.md))
- [Multi-API Shader Compilations](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/shaders/cross-platform-shader-compilers/multi-api-shader-compilations.md) — Generates GPU kernel code for multiple graphics APIs from a single HLSL shader source.
- [Software Rasterizers](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/graphics-apis-bindings/graphics-rendering-apis/dynamic-pixel-renderers/software-rasterizers.md) — Provides a software-based rasterizer to render shaders when physical graphics hardware is unavailable or unsupported.
- [Bytecode Migration](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/shaders/shader-cross-compilation-pipelines/runtime-shader-compilers/shader-transpilation/bytecode-migration.md) — Translates older shader bytecode formats into modern versions for compatibility with new graphics drivers.

### Programming Languages & Runtimes

- [SPIR-V Translation Tools](https://awesome-repositories.com/f/programming-languages-runtimes/spir-v-translation-tools.md) — Translates HLSL shader constructs directly into the cross-platform SPIR-V binary format.
- [SPIR-V Translators](https://awesome-repositories.com/f/programming-languages-runtimes/spir-v-translators.md) — Translates HLSL shader code into SPIR-V binary intermediate representation for use with cross-platform graphics APIs.
- [Common Intermediate Languages](https://awesome-repositories.com/f/programming-languages-runtimes/common-intermediate-languages.md) — Generates platform-independent instruction sets as a portable representation before native GPU compilation.
- [Intermediate Representations](https://awesome-repositories.com/f/programming-languages-runtimes/compiler-interpreter-internals/compiler-infrastructure/intermediate-representations.md) — Employs multiple internal data structures to decouple language parsing from final hardware target generation.
- [LLVM-Based Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/llvm-based-compilers.md) — Utilizes the LLVM toolchain as a backend to generate optimized machine-level intermediate bytecode.
- [Shader Bytecode Versioning](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/webassembly/bytecode-translators/shader-bytecode-versioning.md) — Translates older shader bytecode formats into modern versions to maintain compatibility with current drivers. ([source](https://cdn.jsdelivr.net/gh/microsoft/directxshadercompiler@main/README.md))

### Security & Cryptography

- [Static Bytecode Validations](https://awesome-repositories.com/f/security-cryptography/identity-access-management/access-control/digital-signature-validators/bytecode-validators/static-bytecode-validations.md) — Performs static analysis on compiled binary shaders to ensure they meet hardware specification requirements.

### Testing & Quality Assurance

- [Shader Validation](https://awesome-repositories.com/f/testing-quality-assurance/shader-validation.md) — Verifies that compiled shader intermediate representations are correct and compatible with the target hardware. ([source](https://cdn.jsdelivr.net/gh/microsoft/directxshadercompiler@main/README.md))
