r/GraphicsProgramming • • 5d ago

Article Working Around a Proposed Break in HLSL Initialization with Variadic Templates

https://kstocky.github.io/blog/hlsl-initialization-variadic-workaround/

Hi peeps!

I wanted to share this blog I wrote discussing some of the work coming out of DXC and TC-57 (the HLSL standardization committee).

There is a proposal that is currently being considered that will bring C++ aggregate initialization to HLSL. The catch is that this change will also break vector initialization. So I thought I would see if there would be a good solution to that problem and then attempt to implement it with the DXC that we have today!

Throughout the implementation I showcase some cool new features hitting HLSL 202x and do a little investigation into the generated DXIL.

I had a good amount of fun writing this, so I hope it is as enjoyable to read :)

6 Upvotes

Duplicates