| Issue |
174071
|
| Summary |
[HLSL][Sema] Add semantic validation for unbounded resource array accesses exceeding register slot number limit
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
bob80905
|
Consider this shader:
```
RWBuffer<float> A[] : register(u4294967294);
RWStructuredBuffer<float> Out;
[numthreads(4,1,1)]
void main() {
Out[0] = A[0][0];
Out[0] = A[1][0];
Out[0] = A[2][0];
}
```
It declares an unbounded resource array starting right below the maximum threshold of UINT32_MAX, but there are accesses in the main function that would require resources bound past this limit.
We need to decide whether such accesses should be detected and diagnosed.
We could look at all uses of a resource, and see if its offset added to the starting register slot exceeds the limit.
It is unclear what ought to be done, because currently DXC nor clang check for this behavior.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs