Bug 199197
| Summary: | [WHLSL] Issues with nested arrays | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> |
| Component: | WebGPU | Assignee: | Saam Barati <saam> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | dino, fpizlo, jonlee, justin_fan, mmaxfield, rmorisset |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 198414 | ||
| Bug Blocks: | |||
Saam Barati
This only works if I change memsetZero to be "value = { 0 };":
```
bool test1(device int[] buffer) {
thread int*[30] ptrs;
if (ptrs.length != 30)
return false;
for (uint i = 0; i < ptrs.length; ++i) {
thread int* ptr = ptrs[i];
if (ptr != null) {
buffer[0] = 4242;
return false;
}
}
int x = 42;
//ptrs[28] = &x;
return true;
}
```
However, this always fails, even with above change. And it fails in the loop, even though the store is below the loop. Weird.
```
bool test1(device int[] buffer) {
thread int*[30] ptrs;
if (ptrs.length != 30)
return false;
for (uint i = 0; i < ptrs.length; ++i) {
thread int* ptr = ptrs[i];
if (ptr != null) {
buffer[0] = 4242;
return false;
}
}
int x = 42;
ptrs[28] = &x;
return true;
}
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
WHLSL is no longer relevant.