Share via


Last Week on DirectX Shader Compiler (2017-04-25)

This was a very forward-looking week.

  • SM 6.1, DXIL 1.1 and HLSL 2017.
  • Disabled CSE. Doing the optimization is straightforward; undoing it for profit is hard. We're leaving this to back-ends, where knowledge of register pressure can be applied.
  • More tests, more test fixes == improved driver conformance.
  • Much prep work for libraries.

I want to spend an extra minute talking about versioning. SM 6.1 is a bump because there are new capabilities we will be introducing. DXIL 1.1 is a bump in some more fundamental aspects like the ability to have functions with parameters rather than the more aggressive inlining required in DXIL 1.0 (if nothing else, these will be necessary to describe libraries to some degree, even if these aren't part of DXIL proper for a while).

HLSL 2017 is distinct for those; the new language need not target new features (and so, you can use HLSL 2017 to target SM 6.0 for example). We're revving the language to bring some aspects closer to C++; we'll be talking more about what's changing in more detail in future posts.

Enjoy!

Edit: the original version of this post said 'Disabled DCE' rather than 'Disabled CSE'. Thanks to @aras_p for spotting that. Dead code elimination is always goodness (even for compile-time performance!) and yes, we'll run that during our optimization phases. Common subexpression elimination can save computation but it can also extend lifetimes.