-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[HLSL] inout/out ABI for array parameters #106917
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
Comments
Context: Array parameters are treated as a non-decaying array types. The current We need to fix that and ensure that the code generation correctly handles the temporary values. |
looking at this |
Blocked on #109043. |
Get inout/out parameters working for HLSL Arrays. Utilizes the fix from #109323, and corrects the assignment behavior slightly to allow for Non-LValues on the RHS. Closes #106917 --------- Co-authored-by: Chris B <[email protected]>
@llvm/issue-subscribers-clang-codegen Author: Chris B (llvm-beanz)
Basic `inout` and `out` parameter support is landed, however it doesn't currently work with `ArrayParameterType` arguments.
The following code should compile successfully: void increment(inout int Arr[10]) {
for (int I = 0; I < 10; I++)
Arr[0] += 2;
}
export int call() {
int A[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
increment(A);
return A[0];
} |
@llvm/issue-subscribers-clang-frontend Author: Chris B (llvm-beanz)
Basic `inout` and `out` parameter support is landed, however it doesn't currently work with `ArrayParameterType` arguments.
The following code should compile successfully: void increment(inout int Arr[10]) {
for (int I = 0; I < 10; I++)
Arr[0] += 2;
}
export int call() {
int A[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
increment(A);
return A[0];
} |
Basic
inout
andout
parameter support is landed, however it doesn't currently work withArrayParameterType
arguments.The following code should compile successfully:
The text was updated successfully, but these errors were encountered: