[clang] [llvm] [SPIR-V] DRAFT: Shader built-ins - no spec change (PR #116393)

Steven Perron via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 12:34:13 PST 2024


================
@@ -164,6 +164,16 @@ def HLSLBufferObj : SubsetSubject<HLSLBuffer,
                     [{isa<HLSLBufferDecl>(S)}],
                     "cbuffer/tbuffer">;
 
+def HLSLInputBuiltin : SubsetSubject<Var,
+                             [{S->hasGlobalStorage() && S->getType().isConstQualified() &&
+                               S->getStorageClass()==StorageClass::SC_Static}],
+                             "static const global variables">;
+
+def HLSLOutputBuiltin : SubsetSubject<Var,
+                             [{S->hasGlobalStorage() && !S->getType().isConstQualified() &&
+                               S->getStorageClass()==StorageClass::SC_Static}],
+                             "static const global variables">;
----------------
s-perron wrote:

```suggestion
                             "static global variables">;
```

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


More information about the cfe-commits mailing list