Skip to content

DX Compiler for December 2021 with HLSL 2021 Preview

Compare
Choose a tag to compare
@hekota hekota released this 08 Dec 22:38
· 8 commits to release-1.6.2112 since this release
770ac0c

DirectX Compiler Release for December 2021.

Includes a preview of new HLSL 2021 language features. For details, see Announcing HLSL 2021.

Here are some highlights:

  • template functions and data types
  • overloadable operators for user defined data types
  • bitfield members

HLSL 2021 also introduces more subtle changes that we think will make shader authoring in HLSL more familiar and productive, but it might have unexpected impact in existing shaders:

  • Strict casting rules for user defined data types
  • Logical operator short-circuiting for scalar types
  • C++ for loop scoping rules

The new features are available by passing -HV 2021 flag to the compiler. The HLSL 2021 will become the default language version in a future release.

The package includes dxc.exe, dxcompiler.dll, corresponding lib and headers, and dxil.dll. The new DirectX 12 Agility SDK is required to run shader model 6.6 shaders.

SPIR-V: Per community request the SPIR-V backend of the compiler has been enabled in this release. Please note that Microsoft does not perform testing/verification of the SPIR-V backend.