ScalarizeVecAndMatConstructors: also handle scalar constructors In WGSL you cannot "construct" a scalar from a non-scalar (vec or mat). This modifies ScalarizeVecAndMatConstructors to handle scalar constructors as well, indexing and swizzling the argument to select the first element of the nonscalar. This makes dEQP-GLES2.functional.shaders.conversions.vector_to_scalar.* pass (except those that use bool uniforms which are still unsupported). Bug: angleproject:42267100, angleproject:395659799 Change-Id: Ibaa3dc14f36fecb384bfb6e7f226c6d5f377dd5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6777199 Reviewed-by: Geoff Lang <geofflang@chromium.org>