Skip to content

Conversation

@llvm-beanz
Copy link
Collaborator

@llvm-beanz llvm-beanz commented Oct 15, 2025

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

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.
@github-actions github-actions bot added the language-spec Issue with completed spec label Oct 15, 2025
llvm-beanz added a commit that referenced this pull request Nov 6, 2025
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]>
@llvm-beanz llvm-beanz marked this pull request as ready for review November 6, 2025 17:52
Copy link
Collaborator

@Icohedron Icohedron left a 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

Copy link
Member

@hekota hekota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +182 to +184
\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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

language-spec Issue with completed spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve inconsistencies in spec language for cbuffer declarations

3 participants