-
Notifications
You must be signed in to change notification settings - Fork 52
[Lang] Update and restructure cbuffer spec #684
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
base: main
Are you sure you want to change the base?
Conversation
This change pulls the cbuffer section into the Declarations chapter instead of the Resources chapter since it defines a declaration type, and updates the grammar and specification language based on the updates to proposal 37. The updated language avoids nesting of cbuffers and namepaces in cbuffers to simplify semantic validation. The updated langauge also adds additional language around storage durations which is referenced in the updated specification language.
This slightly scales back the proposal to restricting namespaces in cbuffers and restricting nesting of cbuffers. This is likely a safe change for HLSL 202x, and we'll consider more significant changes in subsequent language updates. This conclusion came out of the language design meeting discussion from 10/13/2025. The language spec updates are posted in a draft as #684. --------- Co-authored-by: Helena Kotas <[email protected]>
Icohedron
left a comment
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.
Reads good to me! LGTM
hekota
left a comment
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.
LGTM!
| \p Declarations within a cbuffer declaration that declare names, declare their | ||
| names in the scope containing the cbuffer declaration. The cbuffer declaration | ||
| itself does not declare a declaration scope. A cbuffer declaration may not |
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.
| \p Declarations within a cbuffer declaration that declare names, declare their | |
| names in the scope containing the cbuffer declaration. The cbuffer declaration | |
| itself does not declare a declaration scope. A cbuffer declaration may not | |
| \p The cbuffer declaration itself does not declare a declaration scope. | |
| Declarations within a cbuffer declaration that declare names, declare their names | |
| in the scope containing the cbuffer declaration. A cbuffer declaration may not |
I think it would read better if the first two sentences are flipped.
This change pulls the cbuffer section into the Declarations chapter instead of the Resources chapter since it defines a declaration type, and updates the grammar and specification language based on the updates to proposal 37.
The updated language avoids nesting of cbuffers and namepaces in cbuffers to simplify semantic validation. The updated langauge also adds additional language around storage durations which is referenced in the updated specification language.
Resolves #671