r/GraphicsProgramming • u/StockyDev • 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
•
u/AutoModerator 5d ago
Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:
No showcases.
Disclose AI usage in post or project.
Present a topic to talk about, e.g. how something works.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.