Repository navigation
Commit 17bbe19
authored
GPU: reach global memory through the generic address space on Metal (#15936)
GPUglobalref() expanded to device, which is what the OpenCL 1 port needed. It no
longer matches the code: since the constant address space was dropped, the
objects the kernels work on are reached through a generic `this`, so a member
pointer or the address of a member is a generic pointer, and MSL will not pass
one where a device pointer is wanted.
MSL 4.1's generic address space spans device, threadgroup and thread, so leaving
the annotation off is correct for every one of these. This mirrors the OpenCL C++
branch, where GPUglobalref() is likewise empty and GPUgeneric() carries the
annotation. GPUsharedref() and GPUconstantref() stay explicit: threadgroup is
still worth pinning where it is known, and constant is not reachable through a
generic pointer at all.1 parent 7c19dff commit 17bbe19
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
0 commit comments