-
Notifications
You must be signed in to change notification settings - Fork 819
Implement ByteAddressBuffer AlignedLoad and AlignedStore operations
#7993
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
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
| switch (opCode) { | ||
| case hlsl::IntrinsicOp::MOP_AlignedLoad: | ||
| case hlsl::IntrinsicOp::MOP_AlignedStore: | ||
| // AlignedLoad/AlignedStore require SM 6.2+ (DXIL 1.2+) for |
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.
This is probably okay, but I do just want to call out that drivers have never been tested seeing an alignment value here that doesn't match the size of the data being loaded, as far as I know. There was a while where WARP used the alignment value to determine the data size instead of looking at the LLVM type (I don't know why...). If we do a spot check of modern drivers across the ecosystem and they seem okay with larger alignment values, I'm fine keeping this as a retro-enablement for SM6.2, but we should do the due diligence before lighting this up for customers.
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.
Understood. As this was still WIP, I was mostly demonstrating that this feature could be retroactively allowed on SM6.2+. The final determination is TBD.
Implement ByteAddressBuffer
AlignedLoadandAlignedStoreproposal:https://github.com/microsoft/hlsl-specs/blob/main/proposals/0051-byte-address-buffer-alignment.md
This PR only contains the changes necessary to implement the reduced version proposed by this PR:
microsoft/hlsl-specs#731
Included extensive positive and negative tests.