2021-05-21 21:01:23 +00:00
|
|
|
struct S {
|
|
|
|
a : i32;
|
2022-01-19 18:11:17 +00:00
|
|
|
}
|
2021-05-21 21:01:23 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@group(0) @binding(0) var<storage, read_write> buf : S;
|
2021-05-21 21:01:23 +00:00
|
|
|
|
2022-01-19 22:46:57 +00:00
|
|
|
@stage(compute) @workgroup_size(1)
|
2021-05-21 21:01:23 +00:00
|
|
|
fn main() {
|
2021-07-26 22:11:58 +00:00
|
|
|
let p : ptr<storage, i32, read_write> = &(buf.a);
|
2021-05-21 21:01:23 +00:00
|
|
|
*(p) = 12;
|
|
|
|
}
|