[clang] [llvm] [HLSL] Implement explicit layout for default constant buffer ($Globals) (PR #128991)

Alex Sepkowski via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 12 09:44:04 PDT 2025


================
@@ -58,9 +60,15 @@ namespace CodeGen {
 // classes) and calls layoutField to converts each field to its corresponding
 // LLVM type and to calculate its HLSL constant buffer layout. Any embedded
 // structs (or arrays of structs) are converted to target layout types as well.
+//
+// When Packoffsets are specified the elements will be placed based on the
+// user-specified offsets. Not all elements must have a packoffset/register(c#)
+// annotation though. For those that don't, the Packoffsets array will constain
----------------
alsepkow wrote:

nit: typo, 'contain'

https://github.com/llvm/llvm-project/pull/128991


More information about the cfe-commits mailing list