[clang] [HLSL] Support packoffset attribute in AST (PR #89836)
    Chris B via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon Apr 29 08:15:55 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].
----------------
llvm-beanz wrote:
What about `.rgba`? https://godbolt.org/z/z814668Pd
https://github.com/llvm/llvm-project/pull/89836
    
    
More information about the cfe-commits
mailing list