Antonio Maiorano | 08d9279 | 2024-01-11 20:51:50 +0000 | [diff] [blame] | 1 | fn deref() { |
2 | var a : vec3<i32>; | ||||
3 | let p = &a; | ||||
4 | var b = (*p).x; | ||||
5 | (*p).x = 42; | ||||
6 | } | ||||
7 | |||||
8 | fn no_deref() { | ||||
9 | var a : vec3<i32>; | ||||
10 | let p = &a; | ||||
11 | var b = p.x; | ||||
12 | p.x = 42; | ||||
13 | } | ||||
14 | |||||
15 | @compute @workgroup_size(1) | ||||
16 | fn main() { | ||||
17 | deref(); | ||||
18 | no_deref(); | ||||
19 | } |