Implement support for groupshared arg attribute#8013
Conversation
get compiler to error when types aren't exactly the same + arg not groupshared bug fix fix test disallow groupshared param in export/noinline funcs first check if there are attrs remove accidental change tests
update tests to show new mangling
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
hekota
left a comment
There was a problem hiding this comment.
Mostly looks good, I just have a few comments and suggestions/nits.
|
Please add something to https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/ReleaseNotes.md as appropriate. |
| Diag(pAttr->getLoc(), diag::err_hlsl_usage_not_on_parameter) | ||
| << pAttr->getName() << pAttr->getRange(); | ||
| result = false; | ||
| } else if (isGroupShared) { |
There was a problem hiding this comment.
Is it guaranteed that groupshared will be processed/specified before inout?
Otherwise, we might need to handle the opposite case above
There was a problem hiding this comment.
Looking at the cases for inout and for groupshared I think it is handled regardless of order, but good point and I think this points to a test is missing for this.
| - GetGroupWaveCount: New intrinsic for Compute, Mesh, Amplification and Node | ||
| shaders which returns the total number of waves executing within the thread | ||
| group. | ||
| - Added support for `long long` and `unsigned long long` compile-time constant evaluation, fixes [#7952](https://github.com/microsoft/DirectXShaderCompiler/issues/7952). |
There was a problem hiding this comment.
Is this the right note? Doesn't seem related to this PR. I don't think it is related to experimental SM 6.10 either, so should probably go in the Other Changes section.
There was a problem hiding this comment.
oh no i didn't see this was changed and this comment before i pushed merge. i will fix this in follow up now. I guess the conflict resolution for this file didn't go correctly.
As a follow up to #8013 and issue #7969, add support for the use of the groupshared parameter attribute in templates. Adds new tests showing codegen and updates existing Sema tests to show relevant errors produced. ``` template<typename T> T fn(groupshared T A) { return A; } ``` --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Implements support for groupshared argument attribute.
Closes #7969