arg_wrap

Function arg_wrap 

Source
fn arg_wrap(arg_ty: WgslType, target: WgslType, arg: &str) -> ArgWrap
Expand description

Decide how to coerce an arg of arg_ty to target (the smallest vec among the call’s args). Scalars get broadcast; larger vecs get truncated; equal vecs and unknowns mostly pass through (except for literal scalars, which we still broadcast even when type inference returned Unknown).