Implement ByteAddressBuffer AlignedLoad and AlignedStore operations#7993
Implement ByteAddressBuffer AlignedLoad and AlignedStore operations#7993mapodaca-nv wants to merge 13 commits intomicrosoft:mainfrom
AlignedLoad and AlignedStore operations#7993Conversation
|
✅ 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.
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.
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.