ref
Function
Passes a place to a parameter declared Ref<T>, as WGSL's &x does: swap(ref(x), ref(y)).
The signature and the sentence under each name are the compiler's own text at commit c66579bf.
Syntax
declare function ref<T>(place: T): TParameters
-
placeT
Return value
T
Description
The place is a let, a const whose initializer built its value, a module variable, a read_write storage element, or a field or element of one of those. One call takes no two references to one variable when the callee writes either.