[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 10:39:35 PDT 2024
================
@@ -6155,6 +6155,63 @@ class BTFTagAttributedType : public Type, public llvm::FoldingSetNode {
}
};
+class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode {
+public:
+ struct Attributes {
+ // This is where data gathered from HLSL resource attributes are stored,
+ // such as resource class, is_rov, dimension, is_array, is_feedback
+ // or is_multisample. The values will be accessed individually via fields
+ // on the embedded struct. The Data alias is used for the AST type
+ // serialization.
+ union {
+ struct {
+ uint8_t ResourceClass; // maps to llvm::dxil::ResourceClass
+ uint8_t IsROV : 1;
+ // FIXME: add additional resource properties here
+ };
+ unsigned Data;
+ };
----------------
hekota wrote:
Thanks for letting me know, I was not aware of this!
https://github.com/llvm/llvm-project/pull/106181
More information about the cfe-commits
mailing list