Expand description
Pass: scalar .xxx swizzle broadcast โ vec constructor.
Functionsยง
- rewrite_
scalar_ ๐swizzle - HLSL allows
<scalar>.xxxto broadcast a scalar to afloat3(and.xxtofloat2, etc.). WGSL has no swizzle on scalars โ naga rejects withinvalid field accessor 'xxx'or strangerexpected ')'; found 'x3'tokenisation. Rewrite to a constructor callfloatN(<scalar>); the regexreplace_typespass then lowers thefloat3tovec3<f32>. - walk_
block_ ๐for_ scalar_ swizzle - walk_
expr_ ๐for_ scalar_ swizzle - walk_
stmt_ ๐for_ scalar_ swizzle