[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Wed May 1 12:59:53 PDT 2024


================
@@ -7398,6 +7398,26 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo
   }];
 }
 
+def HLSLPackOffsetDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+The packoffset attribute is used to change the layout of a cbuffer.
+Attribute spelling in HLSL is: ``packoffset( c[Subcomponent][.component] )``.
+A subcomponent is a register number, which is an integer. A component is in the form of [.xyzw].
+
+Here're packoffset examples with and without component:
----------------
damyanp wrote:

```suggestion
Here are some packoffset examples with and without component:
```

Or:

```suggestion
Examples:
```


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


More information about the cfe-commits mailing list