Reland "Improve matrix construction abilities in Metal codegen."

This is a reland of daa573eb91cbaea22d86c442653ccb66dc815a22

Original change's description:
> Improve matrix construction abilities in Metal codegen.
>
> GLSL (and thus SkSL) is flexible about the input parameters to a matrix
> constructor. You can mix vectors and scalars freely, and it will
> populate them into your matrix as if it was a flat list of scalars.
>
> Metal does not natively support this, and requires the proper number of
> floatNs to be passed in. However, the Metal code generator will now emit
> constructor helper functions that will fix this up automatically.
>
> Additionally, this CL simplifies the Metal codegen for single-scalar
> matrix construction. This should create a matrix with the passed-in
> scalar running along the matrix diagonal. The Metal codegen previously
> emitted a helper function to do this work on our behalf. However,
> that's not necessary; Metal already contains a single-argument matrix
> constructor that will do this work automatically for us.
>
> Change-Id: I76901bfe167502797aa4cb98d0e8986d9ebc51e5
> Bug: skia:10280
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292477
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:10280
Change-Id: If5591392bb96e1cfb643d4e3c19a0ee4affec58d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292689
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
3 files changed