[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 21 10:20:13 PST 2024
================
@@ -531,6 +531,16 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
.addArraySubscriptOperators()
.completeDefinition();
});
+
+ Decl = BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "ByteAddressBuffer")
+ .Record;
+ onCompletion(Decl, [this](CXXRecordDecl *Decl) {
+ setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, ResourceKind::RawBuffer,
+ /*IsROV=*/true,
+ /*RawBuffer=*/true)
----------------
hekota wrote:
The resource attributes are wrong - `ByteAddressBuffer` is `SRV` (read-only) and `IsROV` should be false. Please refer to the Attributes table in this PR: https://github.com/llvm/wg-hlsl/pull/76.
https://github.com/llvm/llvm-project/pull/116699
More information about the cfe-commits
mailing list