Skip to content
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

Add resource chapter documenting buffers and bindings #344

Merged
merged 8 commits into from
Feb 10, 2025

Conversation

pow2clk
Copy link
Member

@pow2clk pow2clk commented Oct 22, 2024

This adds a resource chapter that documents typed and raw buffers including their methods and compatible operators along with short descriptions of their functionality. It also adds a description of binding annotations for all types. Stub sections are included for constant buffers and samplers, but no information is provided as yet.

Fixes llvm/wg-hlsl#55
Fixes llvm/wg-hlsl#56

This adds a resource chapter that documents typed and raw buffers including their methods and compatible operators along with short descriptions of their functionality. It also adds a description of binding annotations for all types. Stub sections are included for constant buffers and samplers, but no information is provided as yet.

Fixes llvm/wg-hlsl#55
Fixes llvm/wg-hlsl#56
@damyanp damyanp requested a review from llvm-beanz October 22, 2024 16:56
Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

Some initial thoughts.

Strip mention of UAVs and SRVs

Remove some legacy text mistakenly left in as notes, mischaracterization of tiled memory, leftover sentences from moved or deleted segments, and elements of code examples.

Better summarize typed buffers upfront.

Add description of UDT register annotations.
Copy link
Member Author

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Responded to Damyan's comments

consolidate typed, byte-address, and structured buffers into common
sections sharing documentation of their common elements and using inheritance
and variant-specific sections to describe differences.

Make const all methods that should be

Add copy constructors to all buffer types.

Revise expressions changes.
Copy link
Member Author

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Respond to @llvm-beanz comments. The extend of the changes merging many of the buffer descriptions made me unable to respond to some of the comments directly. I used the class inheritance metaphor to represent the relation between some buffer types.

Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

I haven't fully read this yet, but I had a look through the changes that were directly in response to my previous feedback (thanks!)

In response to Damyan's comments
Corrected some mistaken syntax in buffer declarations.
Revise the description of CheckAccessFullyMapped, giving it its own section that other parts refer to.
correct sign of parameters to the subscript operator
Corrected a few parameter names and types
This led to significant rewording of the atomic operation descriptions.

Clarified unique global resource mapping.

Refactored description of aggregate resource types for purposes of binding
Copy link
Member Author

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Thanks Damyan! Responses in relation to the latest commit.

@llvm-beanz llvm-beanz added the Design Meeting Agenda item for the design meeting label Nov 12, 2024
Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

LGTM - a few nits in the comments, but I think this is pretty much ready to go in.

Copy link
Member Author

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

I checked with grammarly and copilot to verify my thinking about commas.

@damyanp damyanp requested a review from llvm-beanz November 25, 2024 23:32
@llvm-beanz llvm-beanz self-assigned this Feb 4, 2025
@pow2clk pow2clk merged commit ab91217 into microsoft:main Feb 10, 2025
3 checks passed
@pow2clk pow2clk deleted the buffer_types branch February 10, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Meeting Agenda item for the design meeting
Projects
Status: Accepted
4 participants