-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[HLSL] Fix resource kind for RasterizerOrderedStructuredBuffer #116700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -480,8 +480,8 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
|
||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, | ||
ResourceKind::TypedBuffer, | ||
/*IsROV=*/false, /*RawBuffer=*/false) | ||
ResourceKind::TypedBuffer, /*IsROV=*/false, | ||
/*RawBuffer=*/false) | ||
.addArraySubscriptOperators() | ||
.completeDefinition(); | ||
}); | ||
|
@@ -503,8 +503,7 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
.Record; | ||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::SRV, ResourceKind::RawBuffer, | ||
/*IsROV=*/false, | ||
/*RawBuffer=*/true) | ||
/*IsROV=*/false, /*RawBuffer=*/true) | ||
.addArraySubscriptOperators() | ||
.completeDefinition(); | ||
}); | ||
|
@@ -514,8 +513,7 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
.Record; | ||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, ResourceKind::RawBuffer, | ||
/*IsROV=*/false, | ||
/*RawBuffer=*/true) | ||
/*IsROV=*/false, /*RawBuffer=*/true) | ||
.addArraySubscriptOperators() | ||
.completeDefinition(); | ||
}); | ||
|
@@ -526,8 +524,7 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
.Record; | ||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, ResourceKind::RawBuffer, | ||
/*IsROV=*/false, | ||
/*RawBuffer=*/true) | ||
/*IsROV=*/false, /*RawBuffer=*/true) | ||
.completeDefinition(); | ||
}); | ||
|
||
|
@@ -537,8 +534,7 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
.Record; | ||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, ResourceKind::RawBuffer, | ||
/*IsROV=*/false, | ||
/*RawBuffer=*/true) | ||
/*IsROV=*/false, /*RawBuffer=*/true) | ||
.completeDefinition(); | ||
}); | ||
|
||
|
@@ -547,9 +543,8 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { | |
.addSimpleTemplateParams(*SemaPtr, {"element_type"}) | ||
.Record; | ||
onCompletion(Decl, [this](CXXRecordDecl *Decl) { | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, | ||
ResourceKind::TypedBuffer, /*IsROV=*/true, | ||
/*RawBuffer=*/true) | ||
setupBufferType(Decl, *SemaPtr, ResourceClass::UAV, ResourceKind::RawBuffer, | ||
/*IsROV=*/true, /*RawBuffer=*/true) | ||
Comment on lines
+546
to
+547
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When would we ever want RawBuffer to be false and ResourceKind to be something other than RawBuffer? Or are we going to be removing one of these in the future? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.addArraySubscriptOperators() | ||
.completeDefinition(); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this reformatted? I think there's no change here other than formatting - I thought we had something that enforced clang-format conformance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format
was complaining about the line I actually changed and I noticed that all of these looked funny. Seems like there's a "comment at the beginning of a line" heuristic that stops clang-format from messing with these, but if you collapse them to a single line and then run clang-format it does something pretty reasonable.