Closed dj2 closed 4 months ago
let p: ptr<storage,Particle> = &system.particles[system.active_index]
var i: i32 = 0; add_one(&i);
In section https://www.w3.org/TR/WGSL/#ref-ptr-use-cases see Example: Using a pointer as a short name for part of a variable and Example: Using a pointer as a formal parameter
Example: Using a pointer as a short name for part of a variable
Example: Using a pointer as a formal parameter
https://github.com/gpuweb/cts/blob/main/src/webgpu/shader/execution/expression/unary/address_of_and_indirection.spec.ts
let p: ptr<storage,Particle> = &system.particles[system.active_index]
)var i: i32 = 0; add_one(&i);
)In section https://www.w3.org/TR/WGSL/#ref-ptr-use-cases see
Example: Using a pointer as a short name for part of a variable
andExample: Using a pointer as a formal parameter